[Manager McTest] Tooltip Centered Incorrectly - Fix#59609
Conversation
|
@DylanDylann Please 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] |
|
@DylanDylann have you had a change to take a look at this? 🙏 |
|
I will complete my reviewing on the early Tuesday |
| setElementTop(isSmallScreenWidth ? e.nativeEvent.layout.height + 10 : e.nativeEvent.layout.height - (variables.tabSelectorButtonHeight - 8)); | ||
| setElementTop( | ||
| isSmallScreenWidth | ||
| ? e.nativeEvent.layout.height - (variables.tabSelectorButtonHeight - 10) |
There was a problem hiding this comment.
@JKobrynski Why do we need to change this line?
There was a problem hiding this comment.
Because the tooltip was overlapping the text on small screens, this places is right below the buttons, exactly like on big screens 😄 you can check out the recording!
It is a good idea. Appreciate it |
| const handleResize = () => { | ||
| if (!isResizing) { | ||
| setIsResizing(true); | ||
| } | ||
| debouncedSetIsResizing(); | ||
| }; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2025-04-08.at.15.18.28.movMacOS: DesktopScreen.Recording.2025-04-08.at.15.19.38.mov |
grgia
left a comment
There was a problem hiding this comment.
Thank you for the speedy fixes!!
|
✋ 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/grgia in version: 9.1.25-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.1.25-4 🚀
|
Explanation of Change
Tooltip position on small screen was wrong because the calculation was wrong. To make sure the tooltip position is right after resize I created a
useIsResizinghook to track when user is resizing the window. I used this hook to hide the tooltip when user starts resizing the window, and rerender it when the resize is finished.Fixed Issues
$ #58657
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
Same as Tests section above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
MacOS: Chrome / Safari
web-compressed.mov