-
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
Highlight linked comment #27227
Highlight linked comment #27227
Conversation
@situchan, could you take a look at this? It's a part of the comment-linking feature, and it is a big priority. Thanks! |
reviewing now. can you please fix conflict? |
…into feat/#Expensify#23230-highlight-linked-comment
…into feat/#Expensify#23230-highlight-linked-comment
@situchan can you take a look at this? |
@situchan is it good for you now? |
yes good, will checklist in a few hrs |
Server is down - https://expensify.slack.com/archives/C01GTK53T8Q/p1695314249132269 |
Sure, thanks for keeping it up to date! |
@situchan, just a friendly reminder. As we need to deliver the whole that features by the end of the month |
Thanks for the reminder. Reviewing now |
Please pull main |
Once I click message deep link, no way to remove highlight unless browser url is changed. Screen.Recording.2023-09-22.at.9.38.31.PM.mov |
Given this is priority project, I'd like to consider above concerns out of scope here |
It would be good to change message deep link back to report link when click active report in LHN i.e. Screen.Recording.2023-09-22.at.9.47.17.PM.mov |
@situchan Yes, I have been addressing those comments. Also, I had a weird test error that was not related to this PR. Now it should be good. |
All good here? @situchan, do we need to retest? |
I will review shortly |
Sounds good. Let me know when you are done, @situchan |
@perunt, seems like we now have some conflicts |
…pensify#23230-highlight-linked-comment
@Gonals done |
@@ -127,6 +129,7 @@ const defaultProps = { | |||
}; | |||
|
|||
function ReportActionItem(props) { | |||
const route = useRoute(); |
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.
For performance, I think it's better useRoute
only once in parent view (report screen.)
And pass only flag to ReportActionItem
.
It's not performant to subscribe route change on every item.
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.
@perunt ⬆️
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 that case, we will rerender all messages if we want to highlight a message already on the screen.
I'll make changes in a moment.
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.
done
Some known issues:
Screen.Recording.2023-10-02.at.12.49.17.AM.mov |
✋ 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/Gonals in version: 1.3.76-0 🚀
|
@situchan yes we do. Thanks |
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.76-6 🚀
|
🚀 Deployed to staging by https://github.com/Gonals in version: 1.3.77-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.77-7 🚀
|
Details
This PR is part of the Comment Linking project. Specifically, this task allows users to see which message they referred to by changing the background color of the linked message. WARNING: it doesn't scroll to that message; it merely changes the background color. This background color remains until the user navigates back, so it will be there permanently as long as it remains in the route.
Fixed Issues
$ #23230
PROPOSAL:
Tests
Offline tests
QA Steps
Enable the beta flag named 'commentLinking'.
Open a chat.
Copy the link to the desired message.
Navigate to another chat.
Paste the copied link into this chat.
Click on the pasted link. You were navigated to the separate chat
Scroll to the linked message if it's not immediately visible.
Verify that the background color of the linked message has been changed.
Verify that no errors appear in the JS console
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
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)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)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
Web
Untitled.mov
Mobile Web - Chrome
telegram-cloud-document-2-5188386215157578478.mp4
Mobile Web - Safari
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-09-12.at.13.42.04.mp4
Desktop
Untitled.2.mov
iOS
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-09-12.at.13.36.51.mp4
Android
telegram-cloud-document-2-5188386215157578449.mp4