-
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
Fix notification preference by defaulting to hidden #48887
Fix notification preference by defaulting to hidden #48887
Conversation
@ishpaul777 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] |
This comment has been minimized.
This comment has been minimized.
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
@puneetlath Could you help test this internally i was not able to reproduce this issue so not able to test it to be sure that it is gone. |
@shubham1206agra Jest test failing |
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 am very confused for the changes in this file, and most things are not self explantory, please provide summary of changes and how our changes are affecting this tests. I see test 'orders IOU reports by displayName if amounts are the same' is completly removed i am not sure why
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.
Since the test is wrong, and does not make sense 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.
please provide summary of changes and how our changes are affecting this tests.
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.
Added the details section.
NETWORK: 'network', | ||
IS_LOADING_REPORT_DATA: 'isLoadingReportData', | ||
} as const; | ||
jest.mock('@src/hooks/useResponsiveLayout'); |
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.
Not sure why we need this now, but not before, How our changes affect this
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.
Since I used full Onyx keys from ONYXKEYS file.
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 meant that usage of mock '@src/hooks/useResponsiveLayout'
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.
Its just to fix a bug in Rendering SidebarLinks correctly.
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.
how does our change affect this
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.
Since the earlier test was wrong actually. And I need mimic shouldUseNarrowLayout
to false to include the hidden IOU report if the active report ID is IOU report ID.
Please add tests from testrail that you have tested for this in PR tests section. and complete videos |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2024-09-12.at.8.04.04.PM-1.movMacOS: Desktop |
I tested on one of my High traffic account that there are no chats in my LHN, that i am not a member of, so this LGTM! Screen.Recording.2024-09-12.at.8.04.04.PM-1.mov |
…rence Fix notification preference by defaulting to hidden (cherry picked from commit 4d0c30d) (CP triggered by luacmartins)
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 9.0.33-4 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/luacmartins in version: 9.0.33-4 🚀
|
Details
In
getReportNotificationPreference
, we are defaulting to notification preference of hidden since not doing that will cause fantom unread report to show up where we didn't even join the chat. One such example would be public rooms.I have changed the test since we need to mock Sign In with the user before the test since we uses logged in user account ID to determine the notification preference. And we have fixed some old tests too.
Fixed Issues
$ #46835
Tests
Please see tests from TestRail and verify you don't see any report in LHN where you haven't joined report.
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop