-
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
Upgrade react-navigation to 6.x #3078
Upgrade react-navigation to 6.x #3078
Conversation
Only problem we have right now is that opening modals in web and desktop hides chat window in the background. It shows gray background instead. I'm trying to resolve it now. |
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 like there are conflicts, any luck fixing the backgrounds on web and desktop?
Yes @Jag96 after couple of hours of debugging, I was finally able to resolve that issue by adding |
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.
@@ -178,6 +178,7 @@ class AuthScreens extends React.Component { | |||
// a header will briefly open and close the keyboard and crash Android. | |||
// eslint-disable-next-line react/jsx-props-no-multi-spaces | |||
keyboardHandlingEnabled={false} | |||
detachInactiveScreens={false} |
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.
Hmm I am not sure if we want this. Doesn't this mean that we are missing out on memory savings?
https://reactnavigation.org/docs/stack-navigator/#detachinactivescreens
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.
When I don't set this prop, chat window view in the background doesn't work for modal views on web. We just have gray background.
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, @tugbadogan how did you determine that setting that prop to false would fix the issue? Just wondering if there are alternate solutions since this has the side effect @marcaaron mentioned above.
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.
I found this by accident while looking at the documentation. But, we don't need this anymore as I fixed the issue by upgrading react-native-screens package version to >3.0.0 as required by react-navigation 6.x and used presentation: 'transparentModal'
for modal screen options.
Hey @marcaaron , I fixed the lint errors and empty chat issue on web, can you do another review? |
I updated screen recordings for web, desktop and mobile web. I also added QA steps. |
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.
This is testing good for me on web now.
Although, the animations look slightly different on web. I'm not sure if we want to roll with them or make sure they stay the same as they are on production/staging? Any thoughts on this @Jag96 @shawnborton?
After / New
https://user-images.githubusercontent.com/32969087/121085080-232e2c00-c77d-11eb-8679-2e52d29d287f.mp4
Before / Old
https://user-images.githubusercontent.com/32969087/121085092-25908600-c77d-11eb-8fd9-372417b7fe5a.mp4
@@ -166,6 +166,7 @@ class AuthScreens extends React.Component { | |||
animationEnabled: true, | |||
gestureDirection: 'horizontal', | |||
cardOverlayEnabled: true, | |||
presentation: 'transparentModal', |
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.
Why do we need this? Can we add some comment maybe?
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.
This option is required to make previous screen visible underneath the modal screen
https://reactnavigation.org/docs/6.x/stack-navigator#transparent-modals
Adding a comment to the code now 👍
borderColor: themeColors.border, | ||
} | ||
: { | ||
height: '100%', | ||
height: windowHeight, |
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.
I'm confused about this change. Why does this not work with 100%
but does work with an absolute value?
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.
I don't know TBH. This might be related to some components we're using for layout management (maybe ScreenWrapper)
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.
Ok cool no worries I just like to understand the changes, but if they work they work.
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.
Although, the animations look slightly different on web. I'm not sure if we want to roll with them or make sure they stay the same as they are on production/staging?
I see the difference as well, it looks like it now behaves the same way as iOS does. I don't see any issue with using the updated animations. @shawnborton is OOO this week so going to tag @michelle-thompson to weigh in here in case there's some context I'm missing.
Otherwise, this looks good and works well for me 👍
Nice I feel the same. They look more consistent so it's a net positive just unexpected 🙃 |
Looks good to me as 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.
LGTM
🚀 Deployed to staging in version: 1.0.65-2🚀
|
🚀 Deployed to production in version: 1.0.68-4🚀
|
@marcaaron @parasharrajat
Details
Upgrade react-navigation to 6.x and reanimated library to 2.x to resolve issues caused by legacy drawer and animation implementations.
Fixed Issues
Fixes #2180 and #2447
Tests
Tested navigating between chats and other pages like settings, search and made sure they work as expected.
On mobile devices changed device orientation and observed that the components are positioned properly.
QA Steps
Try to reproduce these issues as instructed in the issue descriptions
Tested On
Screenshots
Web
Screen.Recording.2021-06-06.at.22.52.33-3.mov
Mobile Web
Screen.Recording.2021-06-06.at.22.56.58.mov
Desktop
Untitled.mp4
iOS
Screen.Recording.2021-05-22.at.17.06.10-2.mov
Android
Screen.Recording.2021-05-22.at.17.34.32-3.mov