Navigating to a thread from the Search page doesn’t take you to the chat#58628
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] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-04-03.at.11.57.20.movAndroid: mWeb ChromeScreen.Recording.2025-04-03.at.11.43.36.moviOS: NativeScreen.Recording.2025-04-03.at.11.41.34.moviOS: mWeb SafariScreen.Recording.2025-04-03.at.11.42.30.movMacOS: Chrome / SafariScreen.Recording.2025-04-03.at.11.31.00.movMacOS: DesktopScreen.Recording.2025-04-03.at.11.45.08.mov |
eVoloshchak
left a comment
There was a problem hiding this comment.
@thelullabyy, this doesn't work for me, could you double-check please?
Screen.Recording.2025-03-19.at.22.46.14.mov
Change the last step to
- Verify you’re routed to the message that you clicked on
|
@eVoloshchak As in the issue description, the action here is clicking on the thread message, not the icon. Could you check again? Thanks |
|
That's right, I wonder why do we have two separate handlers for that. Confirming the expected behavior in #58255 (comment) Bug:
Screen.Recording.2025-03-20.at.14.17.58.mov |
|
@eVoloshchak I see this code has been implemented before and it will dissmis modal with report in RHP. Is this the current expectation? App/src/pages/home/ReportScreen.tsx Lines 314 to 318 in 4750e38 |
|
@thelullabyy, it should dismiss the modal if there is no page to go back to |
|
@eVoloshchak I updated PR to fix above bug. Please help to check. This is result : Screen.Recording.2025-03-26.at.17.mp4 |
eVoloshchak
left a comment
There was a problem hiding this comment.
The navigation back looks good!
Could you also take a look at #58255 (comment)?
The behavior when clicking on a thread message and clicking on a thread title/icon should be identical, could you use this updated handler for both ReportActionItemParentAction.tsx and ThreadDivider.tsx?
|
@eVoloshchak I updated PR to make the behavior when clicking on thread title/icon same as clicking on thread message. This is the demo, i tested on other platforms and it works well. Screen.Recording.2025-03-27.at.15.20.50.mov |
|
|
||
| const onBackButtonPress = useCallback(() => { | ||
| if (isInNarrowPaneModal) { | ||
| const backTo = route?.params?.backTo as string; |
There was a problem hiding this comment.
| const backTo = route?.params?.backTo as string; | |
| const backTo = route?.params?.backTo; |
We can move this to an upper scope (below didSubscribeToReportLeavingEvents) so we don't create this every time onBackButtonPress is called
| @@ -47,6 +50,16 @@ function ThreadDivider({ancestor, isLinkDisabled = false}: ThreadDividerProps) { | |||
| <PressableWithoutFeedback | |||
| onPress={() => { | |||
There was a problem hiding this comment.
This function and the function in
are identical. Can we move this logic into a single function that is used by both files?Checklist item
I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
There was a problem hiding this comment.
I updated. pls help to check @eVoloshchak
|
@eVoloshchak I updated PR. Please help to check if there is any problem. Thank you. |
|
Perfect timing, just finished testing this and uploaded the last screen recording 😃 |
Beamanator
left a comment
There was a problem hiding this comment.
One NAB, but overall looking great!
| } | ||
|
|
||
| function navigateToLinkedReportAction(ancestor: Ancestor, isInNarrowPaneModal: boolean, canUserPerformWrite: boolean | undefined, isOffline: boolean) { | ||
| const isVisibleAction = shouldReportActionBeVisible(ancestor.reportAction, ancestor.reportAction.reportActionID, canUserPerformWrite); |
There was a problem hiding this comment.
NAB - I'd prefer defining this below the if (isInNarrowPaneModal) { condition since that condition doesn't use this variable - what do you think @eVoloshchak ? Do we have a style guide saying we should declare most vars at the top of the function?
There was a problem hiding this comment.
@Beamanator I agree with you and updated below. Thanks.
|
✋ 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/Beamanator in version: 9.1.25-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.1.25-4 🚀
|
Explanation of Change
Fixed Issues
$#58255
PROPOSAL:#58255 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso 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
13b5249b-9140-44d1-af43-5b2c428601d0_xLkR2FNJ.mp4
Android: mWeb Chrome
android_chorme.mov
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
chorme.mov
MacOS: Desktop
desktop.mov