Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request - Profile / Workspace - Allow avatar editing via cropping, rotation and zooming #8511

Merged
merged 136 commits into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
8e50db8
Initial implementation
vitalii-tb Apr 6, 2022
442a74d
Cleanup
vitalii-tb Apr 6, 2022
aef2bbc
Add crop for web & native
vitalii-tb Apr 9, 2022
992b14e
Add prototypes
vitalii-tb Apr 10, 2022
680b8fc
Organize imports
vitalii-tb Apr 10, 2022
9223aa1
Add jsdoc
vitalii-tb Apr 10, 2022
129bc8c
Downgrade react-native-gesture-handler
vitalii-tb Apr 11, 2022
24cb09c
Fix image upload ios/android
vitalii-tb Apr 11, 2022
d0374ef
Upgrade react-native-gesture-handler to 2.4
vitalii-tb Apr 16, 2022
0cb85f6
Cleanup
vitalii-tb Apr 16, 2022
64f1455
Revert COCOAPODS
vitalii-tb Apr 16, 2022
166b754
Improve image initializing
vitalii-tb Apr 16, 2022
d9246be
Add lodashGet to AvatarWithImagePicker
vitalii-tb Apr 16, 2022
9f24b31
Improve initializing
vitalii-tb Apr 16, 2022
944140d
Typo fixes
vitalii-tb May 1, 2022
8168cff
Fix jsdoc indentation
vitalii-tb May 1, 2022
62f4c17
Rename onCrop to onSave
vitalii-tb May 1, 2022
cd566c8
Remove extra function & comments
vitalii-tb May 1, 2022
2d35561
Update jsDocs of imageManipulator functions
vitalii-tb May 1, 2022
5ec2d1f
Fix typo
vitalii-tb May 1, 2022
4df9d96
Add comments to AvatarCropModal
vitalii-tb May 2, 2022
12c1895
Add useWorkletCallback hook
vitalii-tb May 2, 2022
4fe2a84
Add comments
vitalii-tb May 2, 2022
9049201
Update comment
vitalii-tb May 2, 2022
e691dd5
Rename radius to apothem
vitalii-tb May 2, 2022
d2ca9af
Fix comments
vitalii-tb May 2, 2022
642e60e
Add es localization
vitalii-tb May 2, 2022
490446c
Revert changes to imageStyle
vitalii-tb May 2, 2022
a685632
Add onLayout
vitalii-tb May 12, 2022
5841f3f
Fix styles
vitalii-tb May 12, 2022
e8b7c0c
Sort Expensicons
vitalii-tb May 12, 2022
6b3c9f3
Merge branch 'main' into feature/#6301_Avatar-edit-modal
vitalii-tb May 12, 2022
4093be5
Add comments and move constants
vitalii-tb May 20, 2022
5b6318b
Remove memo
vitalii-tb May 20, 2022
4b7dd67
Rename image crop prop name
vitalii-tb May 20, 2022
4aeb20b
Rename ImageCropView prop
vitalii-tb May 20, 2022
603325f
Rename functions
vitalii-tb May 20, 2022
a0be8cd
Move styles to useAnimatedStyle
vitalii-tb May 20, 2022
6311ff3
Rename function name
vitalii-tb May 20, 2022
3b70a4f
Rename functions
vitalii-tb May 26, 2022
1429902
Fix styles
vitalii-tb May 26, 2022
61f1c8d
Fix warnings
vitalii-tb May 26, 2022
d052a54
Fix image size on small devices
vitalii-tb May 26, 2022
aecc7d5
Fix image dissapear after closing modal
vitalii-tb May 26, 2022
23c6159
Fix initial image size
vitalii-tb May 26, 2022
f3c05a6
Fix modal corners
vitalii-tb May 26, 2022
4332186
Fix styles
vitalii-tb May 26, 2022
5ce457d
Bind this to updateAvatarImage & openAvatarCropModal
vitalii-tb Jun 7, 2022
c67eb14
Update folder structure
vitalii-tb Jun 7, 2022
c5f6c5a
Add comment to slider
vitalii-tb Jun 7, 2022
427d696
Remove extra space between curly braces
vitalii-tb Jun 7, 2022
dc7f0d9
Fix comment's indentation
vitalii-tb Jun 7, 2022
1332fd2
Add/fix comments to initializing hook
vitalii-tb Jun 7, 2022
74fb971
Add comments to CONST
vitalii-tb Jun 7, 2022
ef965a1
Fix typo
vitalii-tb Jun 7, 2022
e087f3b
Move imageManipulator to utils
vitalii-tb Jun 7, 2022
ff273a6
Fix theme colors
vitalii-tb Jun 7, 2022
c14e851
Add gestureHandlerPropTypes
vitalii-tb Jun 7, 2022
c02cdce
Cleanup AvatarCropModal props
vitalii-tb Jun 7, 2022
7de027a
Fix typo
vitalii-tb Jun 7, 2022
3b2f9a2
Fix typo
vitalii-tb Jun 7, 2022
5913421
Fix typo
vitalii-tb Jun 7, 2022
de4133e
Fix typo
vitalii-tb Jun 7, 2022
45b2622
Fix modal styles
vitalii-tb Jun 7, 2022
9813d82
Add getImageCropViewStyle to StyleUtils
vitalii-tb Jun 7, 2022
13a624c
Cleanup
vitalii-tb Jun 7, 2022
77b3431
Fix typo
vitalii-tb Jun 7, 2022
01d72dc
Add getAvatarCropSliderStyle to StyleUtils
vitalii-tb Jun 7, 2022
0109e3a
Fix AvatarCropModal styles
vitalii-tb Jun 8, 2022
f321380
Merge branch 'main' into feature/#6301_Avatar-edit-modal
vitalii-tb Jun 8, 2022
f70ce52
Merge branch 'main' into feature/#6301_Avatar-edit-modal
vitalii-tb Jun 8, 2022
96e5c49
Fix linter's warnings
vitalii-tb Jun 8, 2022
c61259c
Fix StyleUtils comments
vitalii-tb Jun 10, 2022
8dbec7a
Merge branch 'Expensify:main' into feature/#6301_Avatar-edit-modal
vitalii-tb Jun 10, 2022
fdde6ee
Fix gestureHandlerPropTypes warning on web
vitalii-tb Jun 16, 2022
779fde1
Fix indentation
vitalii-tb Jun 18, 2022
2a4eed0
Fix top safearea padding on android
vitalii-tb Jun 18, 2022
13be32c
Add a resolution validation
vitalii-tb Jun 18, 2022
d58cbc5
Fix the animation on the modal show/hide
vitalii-tb Jun 22, 2022
b9aa950
Fix comments
vitalii-tb Jun 22, 2022
1ea7fd9
Fix display of sizeExceeded modal
vitalii-tb Jun 22, 2022
5da0f79
Cleanup
vitalii-tb Jun 26, 2022
c43efd0
Update tooSmallResolution en
vitalii-tb Jun 26, 2022
256090d
Merge branch 'main' into feature/#6301_Avatar-edit-modal
vitalii-tb Jun 26, 2022
69382f2
Fix comment
vitalii-tb Jul 16, 2022
95f6623
Fix comment
vitalii-tb Jul 16, 2022
e5e3ea3
Fix comment
vitalii-tb Jul 16, 2022
7848cd6
Update isValidResolution size check
vitalii-tb Jul 16, 2022
c7ba3d8
Fix formating
vitalii-tb Jul 16, 2022
f5cd8c1
Call resetState onModalHide
vitalii-tb Jul 16, 2022
92845ad
Add color to ActivityIndicator
vitalii-tb Jul 16, 2022
abb1ada
Fix comment
vitalii-tb Jul 16, 2022
8eaf0f1
Fix comment
vitalii-tb Jul 16, 2022
6b88285
Remove extra array in Slider
vitalii-tb Jul 16, 2022
3e2b15c
Update gestureHandlerPropTypes
vitalii-tb Jul 16, 2022
54e01a4
Update isValidResolution function
vitalii-tb Jul 16, 2022
77497a2
rename showAvatarCropModal
vitalii-tb Jul 16, 2022
03e4839
Add hideAvatarCropModal to AvatarWithImagePicker
vitalii-tb Jul 16, 2022
d0fc97e
Fix comment
vitalii-tb Jul 16, 2022
29b8416
Merge branch 'main' into feature/#6301_Avatar-edit-modal
vitalii-tb Jul 16, 2022
b7ccae8
Add styles variables
vitalii-tb Jul 18, 2022
95c5358
Fix AvatarWithImagePicker bindings
vitalii-tb Jul 18, 2022
62e51dd
Remove extra promise in imageManipulator.js
vitalii-tb Jul 18, 2022
18ef9db
Remove extra Views in ImageCropView
vitalii-tb Jul 18, 2022
f572292
Revert "Fix top safearea padding on android"
vitalii-tb Jul 18, 2022
bdfe404
Fix top padding on android
vitalii-tb Jul 18, 2022
f416d9e
Fix indentation
vitalii-tb Jul 18, 2022
81a22ac
Replace rotate image component with button
vitalii-tb Jul 18, 2022
2db5413
Improve error logic
vitalii-tb Jul 18, 2022
362d60a
Fix linter errors
vitalii-tb Jul 18, 2022
ad9cfa5
Fix linter errors
vitalii-tb Jul 19, 2022
51fac62
Fix linter errors
vitalii-tb Jul 27, 2022
6b05899
Fix control button aligning and modal display
vitalii-tb Jul 27, 2022
cd93804
Preserve image name
vitalii-tb Jul 27, 2022
f958f8d
Fix jsdoc format
vitalii-tb Jul 27, 2022
623bdbb
Rename onGestureEventHandler
vitalii-tb Jul 27, 2022
2655321
Update translation
vitalii-tb Jul 27, 2022
7f56634
Merge branch 'main' into feature/#6301_Avatar-edit-modal
vitalii-tb Jul 27, 2022
46c11b3
Update src/components/AvatarCropModal/AvatarCropModal.js
vitalii-tb Jul 30, 2022
ddf639f
Fix propTypes warning
vitalii-tb Jul 30, 2022
f1cb6cd
Fix incorrect position of the slider's knob
vitalii-tb Jul 30, 2022
e6ad281
Update src/components/AvatarCropModal/AvatarCropModal.js
vitalii-tb Jul 30, 2022
79086d9
Fix avatarCropModalContainer
vitalii-tb Jul 30, 2022
a14f2c1
Merge branch 'main' into feature/#6301_Avatar-edit-modal
vitalii-tb Jul 30, 2022
7180aa6
Update src/languages/en.js
vitalii-tb Aug 3, 2022
87911fb
Fix AvatarCropModal indentation
vitalii-tb Aug 3, 2022
aab18b9
Remove todo
vitalii-tb Aug 3, 2022
48352a2
Rename sine cosine
vitalii-tb Aug 3, 2022
cd7b746
Rename cropOrRotateImage lib
vitalii-tb Aug 3, 2022
c9ab62a
Add comment
vitalii-tb Aug 3, 2022
196dcaf
Add variables and comments
vitalii-tb Aug 3, 2022
df54822
Fix top sliderKnob offset
vitalii-tb Aug 3, 2022
f495fd9
Add comment to rotateCanvas
vitalii-tb Aug 3, 2022
6400d68
Add comments to gestureHandlerPropTypes
vitalii-tb Aug 3, 2022
fa6f000
Merge branch 'main' into feature/#6301_Avatar-edit-modal
vitalii-tb Aug 4, 2022
e4b326a
Fix react-native-reanimated jest mock
vitalii-tb Aug 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions assets/images/image-crop-mask.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions assets/images/rotate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions assets/images/zoom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,8 @@ PODS:
- React-Core
- react-native-flipper (0.117.0):
- React-Core
- react-native-image-manipulator (1.0.5):
- React
- react-native-image-picker (4.7.3):
- React-Core
- react-native-netinfo (8.0.0):
Expand Down Expand Up @@ -558,7 +560,7 @@ PODS:
- Firebase/Performance (= 8.4.0)
- React-Core
- RNFBApp
- RNGestureHandler (1.9.0):
- RNGestureHandler (2.4.0):
- React-Core
- RNPermissions (3.0.1):
- React-Core
Expand Down Expand Up @@ -662,6 +664,7 @@ DEPENDENCIES:
- react-native-config (from `../node_modules/react-native-config`)
- react-native-document-picker (from `../node_modules/react-native-document-picker`)
- react-native-flipper (from `../node_modules/react-native-flipper`)
- "react-native-image-manipulator (from `../node_modules/@oguzhnatly/react-native-image-manipulator`)"
- react-native-image-picker (from `../node_modules/react-native-image-picker`)
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
- react-native-pdf (from `../node_modules/react-native-pdf`)
Expand Down Expand Up @@ -793,6 +796,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-document-picker"
react-native-flipper:
:path: "../node_modules/react-native-flipper"
react-native-image-manipulator:
:path: "../node_modules/@oguzhnatly/react-native-image-manipulator"
react-native-image-picker:
:path: "../node_modules/react-native-image-picker"
react-native-netinfo:
Expand Down Expand Up @@ -933,6 +938,7 @@ SPEC CHECKSUMS:
react-native-config: 6502b1879f97ed5ac570a029961fc35ea606cd14
react-native-document-picker: 772d04a4bc5c35da9abe27b08ac271420ae3f9ef
react-native-flipper: cd9eabd8917104c1bbdca2621717cdca3b2addef
react-native-image-manipulator: db28c0cc09d89e740974c9bb2f13175eb48f1ef2
react-native-image-picker: ae1202414bd5c37c00b2a701daa5b6194a06b7d9
react-native-netinfo: 0124c0695373fce63cea24aeebb97ab2d237947a
react-native-pdf: 4b5a9e4465a6a3b399e91dc4838eb44ddf716d1f
Expand Down Expand Up @@ -965,7 +971,7 @@ SPEC CHECKSUMS:
RNFBApp: 64c90ab78b6010ed5c3ade026dfe5ff6442c21fd
RNFBCrashlytics: 1de18b8cc36d9bcf86407c4a354399228cc84a61
RNFBPerf: e3a7269f573a4787810a32de51647cdcbe08dfb4
RNGestureHandler: 9b7e605a741412e20e13c512738a31bd1611759b
RNGestureHandler: 50e6ffee79932d14ea747d4ea4cc99aac0f24e86
RNPermissions: eb94f9fdc0a8ecd02fcce0676d56ffb1395d41e1
RNReactNativeHapticFeedback: b83bfb4b537bdd78eb4f6ffe63c6884f7b049ead
RNReanimated: da3860204e5660c0dd66739936732197d359d753
Expand Down
48 changes: 12 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@formatjs/intl-locale": "^2.4.21",
"@formatjs/intl-numberformat": "^6.2.5",
"@formatjs/intl-pluralrules": "^4.0.13",
"@oguzhnatly/react-native-image-manipulator": "^1.0.5",
"@onfido/react-native-sdk": "^2.2.0",
"@react-native-async-storage/async-storage": "^1.15.5",
"@react-native-community/cli": "6.2.0",
Expand Down Expand Up @@ -80,7 +81,7 @@
"react-native-config": "^1.4.5",
"react-native-document-picker": "^8.0.0",
"react-native-fast-image": "^8.5.11",
"react-native-gesture-handler": "1.9.0",
"react-native-gesture-handler": "2.4.0",
"react-native-google-places-autocomplete": "git+https://github.com/Expensify/react-native-google-places-autocomplete.git#3bbd17d63e6c38d38d857b50f6037c1c0376ff06",
"react-native-haptic-feedback": "^1.13.0",
"react-native-image-pan-zoom": "^2.1.12",
Expand Down
Loading