-
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
Dont show hidden notif pref in profile page #33387
Conversation
@ 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] |
@@ -133,7 +133,8 @@ function ProfilePage(props) { | |||
|
|||
const navigateBackTo = lodashGet(props.route, 'params.backTo', ROUTES.HOME); | |||
|
|||
const notificationPreference = !_.isEmpty(props.report) ? props.translate(`notificationPreferencesPage.notificationPreferences.${props.report.notificationPreference}`) : ''; | |||
const shouldShowNotificationPreference = !_.isEmpty(props.report) && props.report.notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN; | |||
const notificationPreference = shouldShowNotificationPreference ? props.translate(`notificationPreferencesPage.notificationPreferences.${props.report.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.
It looks like a redundant condition here. The only place notificationPreference
is used is in the title={notificationPreference}
and the only way that will show is if shouldShowNotificationPreference
is true
anyway. So, defaulting to an empty string is not needed.
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.
hidden
doesn't currently have a translation since it doesn't show up anywhere on the app. So I wanted to add the conditional so that props.translate doesn't have a warning since hidden
doesn't exist.
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 ok I think I see what you are saying now. But what does it show instead? Do we need some fallback?
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 believe so, I wrote similar code to here which is in the report settings page. Since hidden
is more of a tool to hide reports than an actual notification preference, I think we should treat hidden
reports as reports that the user does not yet have access too. And in that case they would see nothing in the notification preferences section.
Change LGTM. Do we need to test on native or desktop? Noticed those were skipped (I typically don't skip them unless there is some reason like the code flows are not used on these platforms or something). |
Got it, I didn't know if we need to since the changes followed the same structure as the report settings page which was already implemented. But that makes sense, it doesn't hurt to test for native platforms. I added in desktop and ran an ad hoc build for the native devices. |
This comment has been minimized.
This comment has been minimized.
Builds failed, rerunning them |
Does this require C+ review? |
Maybe for testing and the reviewer checklist? Up to @marcaaron I believe. |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
1 similar comment
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
Hey @marcaaron, for some reason the ios build seems to keep failing on the adhoc build. Does the build work locally for you? |
merge main for ios build
Merged main and re-ran build to hopefully fix iOS build. |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
Just a heads up. I'm not merging this yet because it will fail QA. If we want to assign a C+ we can. However, it's not ready to test yet I think because we need the Auth changes so we should put a HOLD on it. |
"QA Steps" section should also be filled out. Looks like the steps we will ask QA to do would be different than what you might ask someone who can build Auth to do. |
Hm, I think the Auth PR should be held on this one? Because the Auth PR introduces the hidden notification preference to DMs. And once the Auth PR is deployed, if you:
So, we need this PR to be deployed first before the Auth PR? I'll also add QA steps to make sure we're not breaking anything and then make sure to test it again after the Auth PR PR is deployed. So the QA steps for before the Auth deploy would be:
And the QA steps for after the Auth deploy would be (which will be included in the Auth PR):
|
Sounds fine. Mostly I am trying to avoid QA returning this PR during regression testing because it can't be tested without the Auth changes. |
✋ 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.23-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.23-4 🚀
|
Details
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/330506
PROPOSAL:
Tests
Test with this Auth PR
Comment out these lines to make testing easier. Taking out these lines will show empty chats in the LHN which makes it easier to detect whether or not the hidden notification preference is set.
Offline tests
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop