-
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
Hide engagement modal for anonymous user #37714
Conversation
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | ||
(currentRoute && currentRoute.name !== NAVIGATORS.BOTTOM_TAB_NAVIGATOR && currentRoute.name !== NAVIGATORS.CENTRAL_PANE_NAVIGATOR) || | ||
Session.isAnonymousUser() |
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.
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | |
(currentRoute && currentRoute.name !== NAVIGATORS.BOTTOM_TAB_NAVIGATOR && currentRoute.name !== NAVIGATORS.CENTRAL_PANE_NAVIGATOR) || | |
Session.isAnonymousUser() | |
!!(currentRoute && currentRoute.name !== NAVIGATORS.BOTTOM_TAB_NAVIGATOR && currentRoute.name !== NAVIGATORS.CENTRAL_PANE_NAVIGATOR) || | |
Session.isAnonymousUser() |
We can use double negation !!
to fix the eslint error.
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.
@fedirjh Updated this.
Reviewer Checklist
Screenshots/VideosAndroid: NativeCleanShot.2024-03-05.at.13.33.25.mp4Android: mWeb ChromeCleanShot.2024-03-05.at.13.36.55.mp4iOS: NativeSimulator.Screen.Recording.-.iPhone.15.Pro.-.2024-03-05.at.12.54.50.mp4iOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.15.Pro.-.2024-03-05.at.12.57.23.mp4MacOS: Chrome / SafariCleanShot.2024-03-05.at.12.58.14.mp4MacOS: DesktopCleanShot.2024-03-05.at.13.41.36.mp4 |
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 to me.
@@ -47,7 +48,8 @@ function BottomTabBar({isLoadingApp = false}: PurposeForUsingExpensifyModalProps | |||
// When we are redirected to the Settings tab from the OldDot, we don't want to call the Welcome.show() method. | |||
// To prevent this, the value of the bottomTabRoute?.name is checked here | |||
bottomTabRoute?.name === SCREENS.WORKSPACE.INITIAL || | |||
(currentRoute && currentRoute.name !== NAVIGATORS.BOTTOM_TAB_NAVIGATOR && currentRoute.name !== NAVIGATORS.CENTRAL_PANE_NAVIGATOR) | |||
!!(currentRoute && currentRoute.name !== NAVIGATORS.BOTTOM_TAB_NAVIGATOR && currentRoute.name !== NAVIGATORS.CENTRAL_PANE_NAVIGATOR) || |
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 a !!
? Can it be removed?
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.
@marcaaron As this comment #37714 (comment), we added this to avoid ts error.
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.
What was the error? Can we cast it to a Boolean instead with Boolean()
?
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.
@typescript-eslint/prefer-nullish-coalescing
It has this error.
Can we cast it to a Boolean instead with Boolean()
Tested and we can do this, I updated.
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!
@marcaaron looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
I think the label was incorrectly applied? All the tests passed AFAICT. |
✋ 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/marcaaron in version: 1.4.49-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.4.50-5 🚀
|
Details
Hide engagement modal for anonymous user
Fixed Issues
$ #35131
PROPOSAL: #35131 (comment)
Tests
Offline tests
None
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label 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
Screen.Recording.2024-03-05.at.14.58.11.mp4
Android: mWeb Chrome
Screen.Recording.2024-03-05.at.14.50.53.mov
iOS: Native
Screen.Recording.2024-03-05.at.15.00.06.mp4
iOS: mWeb Safari
Screen.Recording.2024-03-05.at.14.49.13.mov
MacOS: Chrome / Safari
Screen.Recording.2024-03-05.at.14.47.26.mov
MacOS: Desktop
Screen.Recording.2024-03-05.at.14.55.38.mov