fix lhn and copying message content#49177
Conversation
|
@allgandalf 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] |
mountiny
left a comment
There was a problem hiding this comment.
Thanks for the quick PR, its nice to see it being refactored like this.
I believe we need to make some small changes though to bring the copy to clipboard and LHN sidebar aligned with how we handle these elsewhere in app.
You can test it out by sending a message to someone with a mention who has or does not have display name and observer the LHN + check how its copied
src/libs/ReportActionsUtils.ts
Outdated
| const assignee = shouldRenderHTML ? `<mention-user accountID=${assigneeAccountID}></mention-user>` : assigneeDetails?.displayName ?? assigneeDetails.login ?? ''; | ||
| const link = shouldRenderHTML | ||
| ? `<a href='${environmentURL}/${ROUTES.SETTINGS_WALLET}'>${Localize.translateLocal('cardPage.expensifyCard')}</a>` | ||
| : Localize.translateLocal('cardPage.expensifyCard'); |
|
I will complete the checklist tomorrow |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-09-16.at.7.56.15.PM.movMacOS: Chrome / SafariScreen.Recording.2024-09-15.at.2.45.20.PM.movMacOS: DesktopScreen.Recording.2024-09-15.at.2.50.28.PM.mov |
|
Screen.Recording.2024-09-15.at.3.04.20.PM.mov |
|
@koko57 can you test on small screen devices? i am able copy paste the username too on macOS web and desktop, but it fails to copy the username/email on both ios and android |
|
@allgandalf fixed! |
allgandalf
left a comment
There was a problem hiding this comment.
Looks good to get shipped 🚀 , all yours @mountiny
|
✋ 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: 9.0.36-0 🚀
|
|
🚀 Deployed to production by https://github.com/grgia in version: 9.0.36-2 🚀
|
| return ''; | ||
| } | ||
| }; | ||
| const shouldShowAddMissingDetailsButton = action?.actionName === CONST.REPORT.ACTIONS.TYPE.CARD_MISSING_ADDRESS && missingDetails && isAssigneeCurrentUser; |
There was a problem hiding this comment.
The condition we used here is wrong, we should had checked !isAssigneeCurrentUser instead, this caused #50233.
nitpick @allgandalf 😅 , should had looked more carefully
| const assigneeAccountID = (reportAction?.originalMessage as IssueNewCardOriginalMessage)?.assigneeAccountID; | ||
| const assigneeDetails = PersonalDetailsUtils.getPersonalDetailsByIDs([assigneeAccountID], currentUserAccountID ?? -1)[0]; | ||
|
|
||
| const assignee = shouldRenderHTML ? `<mention-user accountID="${assigneeAccountID}"/>` : assigneeDetails?.firstName ?? assigneeDetails.login ?? ''; |
There was a problem hiding this comment.
coming from #65337, the card could be unavailable, we need to check if the card is available









Details
Fixed Issues
$ #49149
PROPOSAL:
Tests
PREREQUISITES:
Offline tests
QA Steps
same as above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop