From f3134bbe9b8bc84a906ca1dac46959b360dd243f Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Wed, 16 Jun 2021 01:58:59 -0700 Subject: image cropper dump --- ios/Podfile | 1 + ios/Podfile.lock | 37 +++++++++++++++++++++++++------------ 2 files changed, 26 insertions(+), 12 deletions(-) (limited to 'ios') diff --git a/ios/Podfile b/ios/Podfile index 4eca4100..58c388c2 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -5,6 +5,7 @@ platform :ios, '10.0' target 'Frontend' do config = use_native_modules! + pod 'react-native-image-crop-tools', :path => '../node_modules/react-native-image-crop-tools' use_react_native!(:path => config["reactNativePath"]) target 'FrontendTests' do diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 7d6ce3a8..eec8a988 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -134,24 +134,24 @@ PODS: - GoogleUtilities/Environment (~> 7.2) - nanopb (~> 2.30907.0) - PromisesObjC (~> 1.2) - - GoogleUtilities/AppDelegateSwizzler (7.4.0): + - GoogleUtilities/AppDelegateSwizzler (7.4.1): - GoogleUtilities/Environment - GoogleUtilities/Logger - GoogleUtilities/Network - - GoogleUtilities/Environment (7.4.0): + - GoogleUtilities/Environment (7.4.1): - PromisesObjC (~> 1.2) - - GoogleUtilities/Logger (7.4.0): + - GoogleUtilities/Logger (7.4.1): - GoogleUtilities/Environment - - GoogleUtilities/MethodSwizzler (7.4.0): + - GoogleUtilities/MethodSwizzler (7.4.1): - GoogleUtilities/Logger - - GoogleUtilities/Network (7.4.0): + - GoogleUtilities/Network (7.4.1): - GoogleUtilities/Logger - "GoogleUtilities/NSData+zlib" - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (7.4.0)" - - GoogleUtilities/Reachability (7.4.0): + - "GoogleUtilities/NSData+zlib (7.4.1)" + - GoogleUtilities/Reachability (7.4.1): - GoogleUtilities/Logger - - GoogleUtilities/UserDefaults (7.4.0): + - GoogleUtilities/UserDefaults (7.4.1): - GoogleUtilities/Logger - libevent (2.1.12) - nanopb (2.30907.0): @@ -337,6 +337,11 @@ PODS: - React-Core - react-native-document-picker (5.1.0): - React-Core + - react-native-image-crop-tools (1.3.6): + - React + - TOCropViewController (= 2.5.3) + - react-native-image-picker (4.0.3): + - React-Core - react-native-image-resizer (1.4.4): - React-Core - react-native-netinfo (6.0.0): @@ -478,7 +483,7 @@ PODS: - React - RNVectorIcons (7.1.0): - React - - TOCropViewController (2.6.0) + - TOCropViewController (2.5.3) - Yoga (1.14.0) - YogaKit (1.18.1): - Yoga (~> 1.14) @@ -527,6 +532,8 @@ DEPENDENCIES: - react-native-contacts (from `../node_modules/react-native-contacts`) - react-native-date-picker (from `../node_modules/react-native-date-picker`) - react-native-document-picker (from `../node_modules/react-native-document-picker`) + - react-native-image-crop-tools (from `../node_modules/react-native-image-crop-tools`) + - react-native-image-picker (from `../node_modules/react-native-image-picker`) - react-native-image-resizer (from `../node_modules/react-native-image-resizer`) - "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)" - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) @@ -631,6 +638,10 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native-date-picker" react-native-document-picker: :path: "../node_modules/react-native-document-picker" + react-native-image-crop-tools: + :path: "../node_modules/react-native-image-crop-tools" + react-native-image-picker: + :path: "../node_modules/react-native-image-picker" react-native-image-resizer: :path: "../node_modules/react-native-image-resizer" react-native-netinfo: @@ -721,7 +732,7 @@ SPEC CHECKSUMS: glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3 GoogleAppMeasurement: c542a2feaac9ab98fd074e8f1a02c3585bbfbd47 GoogleDataTransport: 8b0e733ea77c9218778e5a9e34ba9508b8328939 - GoogleUtilities: 284cddc7fffc14ae1907efb6f78ab95c1fccaedc + GoogleUtilities: f8a43108b38a68eebe8b3540e1f4f2d28843ce20 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 nanopb: 59221d7f958fb711001e6a449489542d92ae113e OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b @@ -741,6 +752,8 @@ SPEC CHECKSUMS: react-native-contacts: 931baebf460125c5a7bbce1c4521a96c69795123 react-native-date-picker: 2dfef0fcb6c36d078bc62f5de3ca79eff7f42486 react-native-document-picker: f2f73db94328c84e22144e369fb4a3ede47bc1f5 + react-native-image-crop-tools: 5d254e217773e75bfc09b2c372a8b6a027f0628b + react-native-image-picker: 474cf2c33c2b6671da53d293a16c97995f0aec15 react-native-image-resizer: 13ac4af788f88af36d0353a1324401ebabd04fe4 react-native-netinfo: e849fc21ca2f4128a5726c801a82fc6f4a6db50d react-native-safe-area-context: f0906bf8bc9835ac9a9d3f97e8bde2a997d8da79 @@ -772,10 +785,10 @@ SPEC CHECKSUMS: RNShare: 4df87d1791f50a2c7b1d89432fb9bbb7c02a9c9a RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f RNVectorIcons: bc69e6a278b14842063605de32bec61f0b251a59 - TOCropViewController: 3105367e808b7d3d886a74ff59bf4804e7d3ab38 + TOCropViewController: 20a14b6a7a098308bf369e7c8d700dc983a974e6 Yoga: 7d13633d129fd179e01b8953d38d47be90db185a YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: e24412577971b52c81c348785bf01cb915155d6d +PODFILE CHECKSUM: 33ee4093aebb548655b60536fb24108b5ca0d547 COCOAPODS: 1.10.1 -- cgit v1.2.3-70-g09d2 From 1c84e16b3fc9ea891d8ed11c65aa904e637ea434 Mon Sep 17 00:00:00 2001 From: Brian Kim Date: Sat, 19 Jun 2021 03:03:46 +0900 Subject: Got photo manip tool working --- ios/Podfile.lock | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ios') diff --git a/ios/Podfile.lock b/ios/Podfile.lock index eec8a988..d668122e 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -346,6 +346,9 @@ PODS: - React-Core - react-native-netinfo (6.0.0): - React-Core + - react-native-photo-manipulator (1.2.4): + - React + - WCPhotoManipulator (~> 2.0.4) - react-native-safe-area-context (3.2.0): - React-Core - react-native-splash-screen (3.2.0): @@ -484,6 +487,7 @@ PODS: - RNVectorIcons (7.1.0): - React - TOCropViewController (2.5.3) + - WCPhotoManipulator (2.0.4) - Yoga (1.14.0) - YogaKit (1.18.1): - Yoga (~> 1.14) @@ -536,6 +540,7 @@ DEPENDENCIES: - react-native-image-picker (from `../node_modules/react-native-image-picker`) - react-native-image-resizer (from `../node_modules/react-native-image-resizer`) - "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)" + - react-native-photo-manipulator (from `../node_modules/react-native-photo-manipulator`) - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) - react-native-splash-screen (from `../node_modules/react-native-splash-screen`) - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) @@ -593,6 +598,7 @@ SPEC REPOS: - OpenSSL-Universal - PromisesObjC - TOCropViewController + - WCPhotoManipulator - YogaKit EXTERNAL SOURCES: @@ -646,6 +652,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native-image-resizer" react-native-netinfo: :path: "../node_modules/@react-native-community/netinfo" + react-native-photo-manipulator: + :path: "../node_modules/react-native-photo-manipulator" react-native-safe-area-context: :path: "../node_modules/react-native-safe-area-context" react-native-splash-screen: @@ -756,6 +764,7 @@ SPEC CHECKSUMS: react-native-image-picker: 474cf2c33c2b6671da53d293a16c97995f0aec15 react-native-image-resizer: 13ac4af788f88af36d0353a1324401ebabd04fe4 react-native-netinfo: e849fc21ca2f4128a5726c801a82fc6f4a6db50d + react-native-photo-manipulator: e44c14a28bf7c9b7657a0e0ac79327c1a4d8fe2c react-native-safe-area-context: f0906bf8bc9835ac9a9d3f97e8bde2a997d8da79 react-native-splash-screen: 200d11d188e2e78cea3ad319964f6142b6384865 React-RCTActionSheet: 53ea72699698b0b47a6421cb1c8b4ab215a774aa @@ -786,6 +795,7 @@ SPEC CHECKSUMS: RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f RNVectorIcons: bc69e6a278b14842063605de32bec61f0b251a59 TOCropViewController: 20a14b6a7a098308bf369e7c8d700dc983a974e6 + WCPhotoManipulator: 45b7be19b75c9edf6d2b44f2f61dbc3673862a8f Yoga: 7d13633d129fd179e01b8953d38d47be90db185a YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -- cgit v1.2.3-70-g09d2 From 543bc0eb5fb39bdc69145da3a75c0c683e2f30d2 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh <37447613+shravyaramesh@users.noreply.github.com> Date: Tue, 22 Jun 2021 12:06:17 -0700 Subject: Remove unused library --- ios/Podfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ios') diff --git a/ios/Podfile b/ios/Podfile index 58c388c2..d8324a6d 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -5,7 +5,6 @@ platform :ios, '10.0' target 'Frontend' do config = use_native_modules! - pod 'react-native-image-crop-tools', :path => '../node_modules/react-native-image-crop-tools' use_react_native!(:path => config["reactNativePath"]) target 'FrontendTests' do @@ -34,4 +33,4 @@ end # add the Firebase pod for Google Analytics pod 'Firebase/Analytics' # add pods for any other desired Firebase products -# https://firebase.google.com/docs/ios/setup#available-pods \ No newline at end of file +# https://firebase.google.com/docs/ios/setup#available-pods -- cgit v1.2.3-70-g09d2 From cf41c3c6ce894de3a0cf090bc5c1cb9cfd01ed93 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Tue, 22 Jun 2021 13:37:38 -0700 Subject: Update pod, Adjust display size for iPhone 8 etc --- ios/Podfile.lock | 13 +++------- src/components/moments/MomentPost.tsx | 46 +++++++++++++++++++++-------------- 2 files changed, 31 insertions(+), 28 deletions(-) (limited to 'ios') diff --git a/ios/Podfile.lock b/ios/Podfile.lock index d668122e..ba0f4456 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -337,9 +337,6 @@ PODS: - React-Core - react-native-document-picker (5.1.0): - React-Core - - react-native-image-crop-tools (1.3.6): - - React - - TOCropViewController (= 2.5.3) - react-native-image-picker (4.0.3): - React-Core - react-native-image-resizer (1.4.4): @@ -486,7 +483,7 @@ PODS: - React - RNVectorIcons (7.1.0): - React - - TOCropViewController (2.5.3) + - TOCropViewController (2.6.0) - WCPhotoManipulator (2.0.4) - Yoga (1.14.0) - YogaKit (1.18.1): @@ -536,7 +533,6 @@ DEPENDENCIES: - react-native-contacts (from `../node_modules/react-native-contacts`) - react-native-date-picker (from `../node_modules/react-native-date-picker`) - react-native-document-picker (from `../node_modules/react-native-document-picker`) - - react-native-image-crop-tools (from `../node_modules/react-native-image-crop-tools`) - react-native-image-picker (from `../node_modules/react-native-image-picker`) - react-native-image-resizer (from `../node_modules/react-native-image-resizer`) - "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)" @@ -644,8 +640,6 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native-date-picker" react-native-document-picker: :path: "../node_modules/react-native-document-picker" - react-native-image-crop-tools: - :path: "../node_modules/react-native-image-crop-tools" react-native-image-picker: :path: "../node_modules/react-native-image-picker" react-native-image-resizer: @@ -760,7 +754,6 @@ SPEC CHECKSUMS: react-native-contacts: 931baebf460125c5a7bbce1c4521a96c69795123 react-native-date-picker: 2dfef0fcb6c36d078bc62f5de3ca79eff7f42486 react-native-document-picker: f2f73db94328c84e22144e369fb4a3ede47bc1f5 - react-native-image-crop-tools: 5d254e217773e75bfc09b2c372a8b6a027f0628b react-native-image-picker: 474cf2c33c2b6671da53d293a16c97995f0aec15 react-native-image-resizer: 13ac4af788f88af36d0353a1324401ebabd04fe4 react-native-netinfo: e849fc21ca2f4128a5726c801a82fc6f4a6db50d @@ -794,11 +787,11 @@ SPEC CHECKSUMS: RNShare: 4df87d1791f50a2c7b1d89432fb9bbb7c02a9c9a RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f RNVectorIcons: bc69e6a278b14842063605de32bec61f0b251a59 - TOCropViewController: 20a14b6a7a098308bf369e7c8d700dc983a974e6 + TOCropViewController: 3105367e808b7d3d886a74ff59bf4804e7d3ab38 WCPhotoManipulator: 45b7be19b75c9edf6d2b44f2f61dbc3673862a8f Yoga: 7d13633d129fd179e01b8953d38d47be90db185a YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 33ee4093aebb548655b60536fb24108b5ca0d547 +PODFILE CHECKSUM: 506904e1c9d422356d8a7be45ae9115719e4d7be COCOAPODS: 1.10.1 diff --git a/src/components/moments/MomentPost.tsx b/src/components/moments/MomentPost.tsx index e069089c..9fe8d904 100644 --- a/src/components/moments/MomentPost.tsx +++ b/src/components/moments/MomentPost.tsx @@ -59,7 +59,6 @@ const MomentPost: React.FC = ({ const [visible, setVisible] = useState(false); const [drawerVisible, setDrawerVisible] = useState(false); const [hideText, setHideText] = useState(false); - const [isFullScreen, setIsFullScreen] = useState(false); const [fadeValue, setFadeValue] = useState>( new Animated.Value(0), @@ -121,18 +120,23 @@ const MomentPost: React.FC = ({ [moment.moment_id], ); + /* + * Determines if an image is 9:16 to set aspect ratio of current image and + * determine if image must be displayed in full screen or not + */ useEffect(() => { Image.getSize( moment.moment_url, (w, h) => { - const isFS = Math.abs(w / h - 9 / 16) < 0.01; setAspectRatio(w / h); - setIsFullScreen(isFS); }, (err) => console.log(err), ); }, []); + /* + * To animate tags display + */ useEffect(() => { const fade = async () => { Animated.timing(fadeValue, { @@ -172,17 +176,19 @@ const MomentPost: React.FC = ({ <> - + + + {visible && ( = ({ renderTextWithMentions({ value: moment.caption, styles: styles.captionText, - partTypes: mentionPartTypes('white'), + partTypes: mentionPartTypes('white', 'caption'), onPress: (userLocal: UserType) => navigateToProfile( state, @@ -275,10 +281,14 @@ const MomentPost: React.FC = ({ const styles = StyleSheet.create({ image: { - width: SCREEN_WIDTH, - marginBottom: '3%', zIndex: 0, - position: 'absolute', + }, + imageContainer: { + height: SCREEN_HEIGHT, + width: SCREEN_WIDTH, + flexDirection: 'column', + justifyContent: 'center', + overflow: 'hidden', }, text: { marginHorizontal: '5%', -- cgit v1.2.3-70-g09d2