-
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
[Mentions v2] Support mentions in editing comments #40565
[Mentions v2] Support mentions in editing comments #40565
Conversation
return; | ||
} | ||
|
||
reportIDToNameMap[report.reportID] = report.reportName ?? report.displayName ?? report.reportID; |
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 sure if we should fallback to id, but we did it before so should be fine
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, I think it makes sense to fallback to reportID. And if we would prefer reportID to empty string ""
, then we can use logical OR ||
and add comment to disable lint check
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
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.
Out of curiosity, do you know when displayName
is filled?
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.
tbh I don't know 😅 It's useful for the users but I'm not sure about the rooms
# Conflicts: # src/libs/ReportUtils.ts
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.
LGTM, lets wait for the expensify-common
PR merge.
and the task on which we are holding :D
@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] |
# Conflicts: # src/pages/tasks/NewTaskDetailsPage.tsx
I am assuming this PR is on hold. Do let me know otherwise or once it comes to review |
# Conflicts: # src/libs/ReportUtils.ts
# Conflicts: # src/libs/ReportUtils.ts # src/pages/tasks/TaskDescriptionPage.tsx
@abdulrahuman5196 PR is ready for review :) |
# Conflicts: # src/components/LHNOptionsList/OptionRowLHN.tsx # src/hooks/useCopySelectionHelper.ts # src/hooks/useHtmlPaste/index.ts # src/pages/PrivateNotes/PrivateNotesEditPage.tsx # src/pages/RoomDescriptionPage.tsx # src/pages/home/report/ContextMenu/ContextMenuActions.tsx # src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx # src/pages/home/report/ReportActionItemMessageEdit.tsx # src/pages/tasks/TaskDescriptionPage.tsx # src/pages/workspace/taxes/NamePage.tsx
@eh2077 I've just merged the main and all issues should be fixed 🎉 It's ready for review now :) |
I'm working on the checklist |
Reviewer Checklist
Screenshots/VideosAndroid: Native0-android.mp4Android: mWeb Chrome0-mobile-chrome.mp4iOS: Native0-ios.mp4iOS: mWeb Safari0-mobile-safari.mp4MacOS: Chrome / Safari0-web.mp4MacOS: Desktop0-desktop.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.
LGTM!
I was doing some tests and it looks like we re=render everything that uses Am I missing something? |
@rlinoz That's a good question but I think we have to connect Onyx this way. Do you maybe have an idea of passing arguments which will not cause rerenders? |
Yeah, I played with this a lot today and didn't get to a good solution. Anyway, I believe that a user don't get new reports frequently enough for this to matter, so I think we should be good. The other option is to fetch only the personal details and reports for a particular message, but that is costly as well and we will have to fetch for ever parsed message, even if we got the same data for a previous one. |
Yes, I also agree to move the first version of this feature forward.
Just continue to brainstorm on @rlinoz 's idea about improving the potential performance issue. I'm not sure if we have considered just saving the text needed in the <mention-report reportID="1234" text="#room-name" /> So, we won't need to pass the map. But then we'll need to update |
I think the mention with ID was an idea from the design doc. Probably @rlinoz could give more details on it. |
# Conflicts: # src/libs/ReportUtils.ts
As the text can be changed by the user over time, we'll need to check and map it to the correct text by ID. That being said, saving the text in the tag doesn’t seem to offer any advantages. |
🚀 Deployed to staging by https://github.com/rlinoz in version: 1.4.84-0 🚀
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.4.84-3 🚀
|
return; | ||
} | ||
|
||
accountIDToNameMap[personalDetails.accountID] = personalDetails.login ?? String(personalDetails.accountID); |
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 doesn't make sense to use accountID as fallback.
Later, it caused #45259.
We fixed it by setting it as empty string as fallback to show "Hidden"
Details
Fixed Issues
$ #39550
PROPOSAL:
Tests
Edit comment
Private notes
and verify that editing mentions works correctlyOffline tests
QA Steps
Edit comment
Private notes
and verify that editing mentions works correctlyPR 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.-.native.mov
Android: mWeb Chrome
Screen.Recording.Apr.22.mov
iOS: Native
ios.-.native.mov
iOS: mWeb Safari
ios.-.web.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov