-
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
Migrate notification preference #47577
Migrate notification preference #47577
Conversation
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.
Preliminary review for changes in /src
, i have had fixes for many failed IOUTests in https://github.com/ishpaul777/App/tree/fix/ioutest
Fix/ioutest
Co-authored-by: Ishpaul Singh <104348397+ishpaul777@users.noreply.github.com>
Co-authored-by: Ishpaul Singh <104348397+ishpaul777@users.noreply.github.com>
is this ready for a review, if so could you mark it as open for review? |
There are Conflicts |
@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] |
@ishpaul777 Can you start testing this? |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
I'll focus on this over weekend, this is only task i'll left with this week |
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! only minor NAB comment
@@ -556,11 +556,10 @@ const isChannelMuted = (reportId: string) => | |||
key: `${ONYXKEYS.COLLECTION.REPORT}${reportId}`, | |||
callback: (report) => { | |||
Onyx.disconnect(connection); | |||
const notificationPreference = report?.participants?.[currentUserAccountID]?.notificationPreference; |
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.
Can we use getReportNotificationPreference from Reportutils ?
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 really. Since this will create circular dependency.
Also there are conflicts.. |
Resolved |
} | ||
|
||
/** | ||
* Get the notification preference given a report |
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.
* Get the notification preference given a report | |
* Get the notification preference given a report for the current user |
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.
NAB but I think this is a bit more clear.
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
Any updates @puneetlath @shubham1206agra |
QA was testing it. Looks like it's all good, so going to merge. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
@puneetlath Anything to QA here? |
Yes, all tests in test rail related to notification preference. |
@@ -1016,7 +1020,7 @@ function navigateToAndOpenReport( | |||
undefined, | |||
undefined, | |||
undefined, | |||
CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, | |||
CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, |
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.
@shubham1206agra Sorry, I wonder why we need to update it "always"?
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.
With these changes, when we initiate a conversation with a new user (FAB > Start chart > Type new email in search input > Choose that user), the notificationPreference
in the optimistic data will be set to always
, but the backend returns it as hidden
.
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.
Last I checked, BE was returning always too. Thats why I changed 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.
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.
Maybe it was a bug at that time, and I updated the preference.
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 do you mean by "and I updated the preference."?
Details
Fixed Issues
$ #46835
Tests
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