-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Invisible view on FAB using refactored modal fix #57536
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
Invisible view on FAB using refactored modal fix #57536
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 |
@@ -41,6 +41,7 @@ function BottomDockedModal({ | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh
Now I get it
Thanks for the detailed explanation !
LGTM ! |
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.
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 🚀
|
onModalShow(); | ||
}, [onModalShow]); | ||
|
||
const onCloseCallBack = useCallback(() => { | ||
setIsTransitioning(false); | ||
setIsContainerOpen(false); | ||
if (handleRef.current) { | ||
InteractionManager.clearInteractionHandle(handleRef.current); |
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.
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
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