-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add tooltip to rotate image button and zoom slider #16920
Conversation
@arosiclair @eVoloshchak One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-04-05.at.15.24.18.movMobile Web - ChromeScreen_Recording_20230405-152818_Chrome.mp4Mobile Web - SafariScreen.Recording.2023-04-05.at.15.26.02.movDesktopScreen.Recording.2023-04-05.at.15.28.46.moviOSScreen.Recording.2023-04-05.at.16.08.44.movAndroidScreen_Recording_20230405-153027_New.Expensify.mp4 |
@@ -22,6 +26,8 @@ const defaultProps = { | |||
|
|||
// This component can't be written using class since reanimated API uses hooks. | |||
const Slider = (props) => { | |||
const [enableTooltipView, setEnableTooltipView] = useState(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const [enableTooltipView, setEnableTooltipView] = useState(true); | |
const [tooltipIsVisible, setTooltipIsVisible] = useState(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than this small change, everything looks good and tests well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eVoloshchak Updated state variable name as per request. Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and tests well!
cc: @arosiclair
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good just a translation update
src/languages/en.js
Outdated
@@ -149,6 +149,8 @@ export default { | |||
avatarCropModal: { | |||
title: 'Edit photo', | |||
description: 'Drag, zoom, and rotate your image to your preferred specifications', | |||
rotateImage: 'Rotate', | |||
zoomImage: 'Zoom', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these two are just the generic words "rotate" and "zoom", can we move these to the common object? (common.rotate
and common.zoom
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/languages/es.js
Outdated
@@ -148,6 +148,8 @@ export default { | |||
avatarCropModal: { | |||
title: 'Editar foto', | |||
description: 'Arrastra, haz zoom y rota tu imagen para que quede como te gusta.', | |||
rotateImage: 'Girar', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rotateImage: 'Girar', | |
rotateImage: 'Rotar', |
Heard back from our people on this translation. Let's use "Rotar".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/languages/es.js
Outdated
@@ -18,6 +18,8 @@ export default { | |||
resend: 'Reenviar', | |||
save: 'Guardar', | |||
saveChanges: 'Guardar cambios', | |||
rotateImage: 'Rotar', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rotateImage: 'Rotar', | |
rotate: 'Rotar', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/languages/es.js
Outdated
@@ -18,6 +18,8 @@ export default { | |||
resend: 'Reenviar', | |||
save: 'Guardar', | |||
saveChanges: 'Guardar cambios', | |||
rotateImage: 'Rotar', | |||
zoomImage: 'Zoom', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zoomImage: 'Zoom', | |
zoom: 'Zoom', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@arosiclair @eVoloshchak Correction done as per your request. Also updated screenshot and pr description accordingly. Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for the changes
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/arosiclair in version: 1.2.96-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.2.96-4 🚀
|
@eVoloshchak @arosiclair PR is ready for review.
Details
Tooltip is missing on Rotate image button and Slider knob on avatar crop modal. So in this PR we added tooltip for both.
Note: Tooltip is applicable for Web and Desktop only. I added screenshot for all platform to make sure there is not any side effect.
Fixed Issues
$ #15941
PROPOSAL: #15941 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Chrome En
Web-Chrome-En.mp4
Chrome Es
Web-Chrome-ES.mov
Safari En
Web-Safari-En.mp4
Safari Es
Web-Safari-ES.mov
Mobile Web - Chrome
En
MWeb-Chrome-En.mp4
Es
MWeb-Chrome-Es.mp4
Mobile Web - Safari
En
MWeb-Safari-En.mp4
Es
MWeb-Safari-Es.mp4
Desktop
En
Desktop-En.mp4
Es
Desktop-ES.mov
iOS
En
iOS-En.mp4
Es
iOS-Es.mp4
Android
En
Android-En.mp4
Es
Android-Es.mp4