Invisible view on FAB using refactored modal fix#57536
Invisible view on FAB using refactored modal fix#57536mountiny merged 2 commits intoExpensify:mainfrom
Conversation
|
@shawnborton @eh2077 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] |
|
I suppose this is my PR since this is a fix for this PR which I reviewed |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromeandroid-web.moviOS: Nativeios.moviOS: mWeb Safariios-web.movMacOS: Chrome / Safariweb.movMacOS: Desktopweb.mov |
| const [isTransitioning, setIsTransitioning] = useState(false); | ||
| const [deviceWidth, setDeviceWidth] = useState(() => Dimensions.get('window').width); | ||
| const [deviceHeight, setDeviceHeight] = useState(() => Dimensions.get('window').height); | ||
| const handleRef = useRef<number>(); |
There was a problem hiding this comment.
Interesting fix
And sorry for the stupid question 😅
But could you explain in more detail where the invisible view came from
And how it fixed it?
There was a problem hiding this comment.
Sure!
react-native-modal library which this code originates from was originally using InteractionManager, but during my refactor it caused some problems so I removed it, which didn't create any regressions.
The problem was that recently a change was made in E/App here that caused the FAB to rely specifically on the InteractionManager in our modals. Since we didn't have it anymore in the refactored version this caused the issue the QA team has found.
There was a problem hiding this comment.
After adding the InteractionManager back I've tested if any of the problems I faced before also appeared, but it seems like they may have been happening due to some other bugs.
There was a problem hiding this comment.
Oh
Now I get it
Thanks for the detailed explanation !
|
LGTM ! |
mountiny
left a comment
There was a problem hiding this comment.
Thanks for the fix, lets try it out!
|
✋ 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/mountiny in version: 9.1.7-1 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.1.7-2 🚀
|
| setIsTransitioning(false); | ||
| setIsContainerOpen(false); | ||
| if (handleRef.current) { | ||
| InteractionManager.clearInteractionHandle(handleRef.current); |
Explanation of Change
Recently we refactored modal code that was used everywhere across E/App here the goal was to implement it in all bottom docked modals, starting with FAB. After merging the PR we found an issue where if you went through a specific flow there would be an invisible view on top of FAB preventing user from being able to press it, this PR fixes that problem.
Fixed Issues
$ #49354
Tests
This PR affects just the FAB modal on native & mWeb platforms.
I think testing should go like this:
To test the issue I've described in Explanation of Change section follow these steps:
FAB should be responsive and open up the modal again after step 5.
Offline tests
N/A - nothing should change in this case
QA Steps
Same as in the Tests section
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
Android: Native
android.mov
Android: mWeb Chrome
android.mweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios.mweb.mov
MacOS: Chrome / Safari
MacOS: Desktop