-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Only bold user display name when it's unread in search page #37306
Only bold user display name when it's unread in search page #37306
Conversation
@abdulrahuman5196 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] |
Nice! And just to confirm, when you go to create a new chat from the global create menu, the names always appear in bold because it is a list of contacts and not chats, right? |
Yes, the name is always in bold in new chat page |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-02-29.at.12.09.10.AM.mp4Android: mWeb ChromeScreen.Recording.2024-02-29.at.12.16.10.AM.mp4iOS: NativeScreen.Recording.2024-02-29.at.12.03.01.AM.mp4iOS: mWeb SafariScreen.Recording.2024-02-29.at.12.07.24.AM.mp4MacOS: Chrome / SafariScreen.Recording.2024-02-28.at.11.54.09.PM.mp4MacOS: DesktopScreen.Recording.2024-02-28.at.11.59.02.PM.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.
Changes looks good and works well. Reviewers checklist is also complete.
All yours. @neil-marcellini
🎀 👀 🎀
C+ Reviewed
Gentle Ping @neil-marcellini |
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.
Great thanks
@@ -86,7 +86,7 @@ function UserListItem({ | |||
textStyles={[ | |||
styles.optionDisplayName, | |||
isFocused ? styles.sidebarLinkActiveText : styles.sidebarLinkText, | |||
styles.sidebarLinkTextBold, | |||
item.isBold !== false && styles.sidebarLinkTextBold, |
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: Why do we need !== false if it's a 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.
Can we fix that with a default prop 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.
It could be undefined. item
is an object, I'm not sure if we can set a default value for an object attribute.
@@ -55,6 +55,9 @@ type ListItem = { | |||
/** Whether this option is disabled for selection */ | |||
isDisabled?: boolean; | |||
|
|||
/** List title is bold by default. Use this props to customize it */ |
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: Use this props to customize it
=> Use this prop to customize it
@bernhardoj to keep things moving I'll merge this. If you want to fix the NAB comments please create a follow up PR. |
✋ 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/neil-marcellini in version: 1.4.47-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.4.47-10 🚀
|
@@ -93,7 +94,7 @@ function SearchPage({betas, reports, isSearchingForReports}) { | |||
|
|||
if (recentReports.length > 0) { | |||
newSections.push({ | |||
data: recentReports, | |||
data: _.map(recentReports, (report) => ({...report, isBold: report.isUnread})), |
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 caused inconsistency with LHN where the bold style was applied based on other factors too (the notification preference of the report)
const textUnreadStyle = optionItem?.isUnread && optionItem.notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.MUTE ? [textStyle, styles.sidebarLinkTextBold] : [textStyle]; |
Details
We want to bold user display name in search page when it's unread.
Fixed Issues
$ #36075
PROPOSAL: #36075 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
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-02-27.at.22.32.47.mov
Android: mWeb Chrome
Screen.Recording.2024-02-27.at.22.33.53.mov
iOS: Native
Screen.Recording.2024-02-27.at.22.31.48.mov
iOS: mWeb Safari
Screen.Recording.2024-02-27.at.22.27.01.mov
MacOS: Chrome / Safari
Screen.Recording.2024-02-27.at.22.20.14.mov
MacOS: Desktop
Screen.Recording.2024-02-27.at.22.22.06.mov