-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add Mark as Read/Unread option to LHN Context menu #20254
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
Conversation
|
@0xmiroslav @luacmartins One of you needs to 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] |
|
Ready for review! iOS is still being a pain for me. @0xmiroslav, can you take a look? 😁 |
src/libs/actions/Report.js
Outdated
| function markCommentAsUnread(reportID, reportActionCreated) { | ||
| function markCommentAsUnread(reportID, reportActionCreated = '') { | ||
| // If no action created date is provided, use the last action's | ||
| const actionCreationTime = reportActionCreated || allReports[reportID].lastVisibleActionCreated; |
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.
reportActionCreated = ''
Do we need empty string as default value? This is always ignored in this condition: reportActionCreated ||.
And for null safety, use lodashGet for allReports[reportID].lastVisibleActionCreated.
And need to check if DateUtils.subtractMillisecondsFromDateTime(undefined, 1) returns current time or any other weird value.
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.
Agree that we should use lodashGet here and maybe default to the current timestamp if we can't find anything.
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.
I guess you are right. removed the default.
And need to check if DateUtils.subtractMillisecondsFromDateTime(undefined, 1) returns current time or any other weird value.
Current time!
src/libs/actions/Report.js
Outdated
| function markCommentAsUnread(reportID, reportActionCreated) { | ||
| function markCommentAsUnread(reportID, reportActionCreated = '') { | ||
| // If no action created date is provided, use the last action's | ||
| const actionCreationTime = reportActionCreated || allReports[reportID].lastVisibleActionCreated; |
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.
Agree that we should use lodashGet here and maybe default to the current timestamp if we can't find anything.
|
Comments addressed! |
|
OFF HOLD and ready! |
luacmartins
left a comment
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! @0xmiroslav all yours
0xmiroslav
left a comment
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.
LGTM2. One minor thing:
src/languages/en.js
Outdated
| copyURLToClipboard: 'Copy URL to clipboard', | ||
| copyEmailToClipboard: 'Copy email to clipboard', | ||
| markAsUnread: 'Mark as unread', | ||
| markAsRead: 'Mark as Read', |
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.
| markAsRead: 'Mark as Read', | |
| markAsRead: 'Mark as read', |
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.
ah nice catch. Yea let's address that @Gonals
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!
|
@Gonals just missing this comment |
|
Done! |
luacmartins
left a comment
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
|
All yours @0xmiroslav |
|
Mark as unread doesn't work well in thread. This can be out of scope since same issue happens on unread button from mini context menu.
unread.indicator.bug.mov |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
0xmiroslav
left a comment
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.
LGTM2!
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #20249... Please reach out for help on Slack if no one gets assigned! |
|
✋ 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/luacmartins in version: 1.3.29-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.29-11 🚀
|
Details
Fixed Issues
$ #20249
Tests
Mark as unreadoption should show up. Press itUnreadreadMark as Readoption (TheMark as Unreadone should be there).Offline tests
QA Steps
Same as tests
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 */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)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)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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android