-
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/33760 doubled display name on search page #33966
Fix/33760 doubled display name on search page #33966
Conversation
@madmax330 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] |
Does this require C+ review? |
reviewing |
Hey, just a heads up: there is a PR I was working on – it's already approved, and I think this PR will break it, as we were accounting for the |
const shouldDisplayLastActorName = lastAction && lastAction.actionName !== CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW && lastAction.actionName !== CONST.REPORT.ACTIONS.TYPE.IOU; | ||
|
||
if (shouldDisplayLastActorName && lastActorDisplayName && lastMessageTextFromReport) { | ||
lastMessageText = `${lastActorDisplayName}: ${lastMessageTextFromReport}`; |
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.
Let's define util function whether to add prefix or not and use it in both here and SidebarUtils
Lines 401 to 402 in 3ee24ec
} else if (lastAction?.actionName !== CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW && lastActorDisplayName && lastMessageTextFromReport) { | |
result.alternateText = `${lastActorDisplayName}: ${lastMessageText}`; |
We should make alternateText
consistent between LHN and search page.
reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.CREATED && | ||
reportAction.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE, | ||
); | ||
visibleReportActionItems[reportID] = reportActionsForDisplay[reportActionsForDisplay.length - 1]; |
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 code is also duplicated with SidebarUtils.
Let's try to avoid duplication as much as possible
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.
yes, but I think that the whole code for generating could be extracted to a separate function - we would not need a separate function for getting lastActorDisplayName then. I even wanted to do this in this PR, but it's a lot of changes, so I wanted to fix the issue this way, then take care of this refactor in a follow-up. Let me know what you think about that cc @mountiny
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.
In this case I agree to handle this in a follow up PR to get the fix in and limit chances of regressions. Will you handle the follow up @koko57 ?
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.
yeah, of course! 😊
My latest changes kind of restore the previous logic excluding only IOUs and report previews. Tested with your change - it works fine |
Making a build for a quick test |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / Safariweb.mov |
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.
Thank you tests well!
✋ 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/mountiny in version: 1.4.24-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.24-3 🚀
|
Details
Fixed Issues
$ #33760
Tests
Offline tests
n/a
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)/** comment above it */
this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.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
n/a
Android: mWeb Chrome
n/a
iOS: Native
n/a
iOS: mWeb Safari
n/a
MacOS: Chrome / Safari
MacOS: Desktop