fix: hide new marker for pending deleted action in online mode#33162
fix: hide new marker for pending deleted action in online mode#33162tylerkaraszewski merged 10 commits intoExpensify:mainfrom
Conversation
|
@eVoloshchak 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] |
|
@ArekChr could you please help to review this as it is regression from a PR |
| {(hovered) => ( | ||
| <View style={highlightedBackgroundColorIfNeeded}> | ||
| {props.shouldDisplayNewMarker && <UnreadActionIndicator reportActionID={props.action.reportActionID} />} | ||
| {props.shouldDisplayNewMarker && ReportActionsUtils.shouldShowNewMarker(props.action) && <UnreadActionIndicator reportActionID={props.action.reportActionID} />} |
There was a problem hiding this comment.
Instead of here, can we add this logic in ReportActionsList component instead where we determine if we should display marker or not. Just to keep all logic at same place
There was a problem hiding this comment.
In this case, the new marker would be at the next message(if exists). Is this expected?
There was a problem hiding this comment.
@MonilBhavsar Can you please check the PR again? I moved the logic to ReportActionsList
There was a problem hiding this comment.
Here is the best place to add IMO https://github.com/Expensify/App/pull/33162/files#diff-9ac76d645ad53156c86195c1a8f5adb3bb9b71f78351e43c4e1b6d6896921c4eR336
There was a problem hiding this comment.
@MonilBhavsar
Can you please check if the link is correct?
There was a problem hiding this comment.
It was updated after merging main
https://github.com/Expensify/App/pull/33162/files#diff-9ac76d645ad53156c86195c1a8f5adb3bb9b71f78351e43c4e1b6d6896921c4eR351
There was a problem hiding this comment.
In that case, unread marker would move to the next message(if exists) when deleting a message with unread marker. Is this an expected behavior?
There was a problem hiding this comment.
Yes expected!
Clarification: message should be from sender
|
@ArekChr could you also please take a look and help with checklist, thanks! |
|
@ArekChr is now not in C+ team, but developer role focusing on waves |
|
@MonilBhavsar - I think we need a new C+ for this. |
|
Can I be? |
|
Yes! @situchan please review. |
|
@s-alves10 @situchan 👋 |
|
@s-alves10 please sync main as 2.3k commits are behind |
|
Will you take a look again? |
|
Please take a look at this comment #33162 (comment) |
|
I updated the logic as per #33162 (comment) |
| const nextMessage = sortedReportActions[index + 1]; | ||
| const isCurrentMessageUnread = isMessageUnread(reportAction, lastReadTimeRef.current); | ||
| shouldDisplay = isCurrentMessageUnread && (!nextMessage || !isMessageUnread(nextMessage, lastReadTimeRef.current)); | ||
| shouldDisplay = isCurrentMessageUnread && (!nextMessage || !isMessageUnread(nextMessage, lastReadTimeRef.current)) && !ReportActionsUtils.shouldHideNewMarker(reportAction); |
src/libs/ReportActionsUtils.ts
Outdated
| } | ||
|
|
||
| /** | ||
| * Checks if the new marker should be shown for the report action. |
There was a problem hiding this comment.
| * Checks if the new marker should be shown for the report action. | |
| * Checks if the new marker should be hidden for the report action. |
|
lint failing |
|
@s-alves10 the bug (#31637) is still reproducible on this branch Screen.Recording.2024-01-04.at.6.31.42.PM.mov |
|
The above bug was fixed. Will you check it again? |
|
Latest change looks good |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
tylerkaraszewski
left a comment
There was a problem hiding this comment.
Waiting for the co0nversation with @MonilBhavsar to be finalized.
What does this mean? |
|
My mistake, I was looking at stale comments. |
|
✋ 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/tylerkaraszewski in version: 1.4.23-0 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.23-4 🚀
|
Details
Hide the delete pending actions
Fixed Issues
$ #33118
PROPOSAL: #33118 (comment)
Tests
Offline tests
QA Steps
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)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
33118_android_native.mp4
Android: mWeb Chrome
33118_android_chrome.mp4
iOS: Native
33118_ios_native.mp4
iOS: mWeb Safari
33118_ios_safari.mp4
MacOS: Chrome / Safari
33118_mac_chrome.mp4
MacOS: Desktop
33118_mac_desktop.mp4