-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Better Expense Report View] Update the go to parent logic in Reports tab #61774
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
[Better Expense Report View] Update the go to parent logic in Reports tab #61774
Conversation
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.
hey left some comments 👍
src/pages/home/ReportScreen.tsx
Outdated
@@ -352,6 +352,7 @@ function ReportScreen({route, navigation}: ReportScreenProps) { | |||
policy={policy} | |||
parentReportAction={parentReportAction} | |||
onBackButtonPress={onBackButtonPress} | |||
openParentReportInCurrentTab |
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'm kinda confused.
<MoneyRequestHeader>
is used only 2 times in the app:
- in
ReportScreen
- in
MoneyRequestReportView
- which is the child ofSearchMoneyRequestReportPage
and this component is basically only ever used for the report that is actually the transaction thread view. So don't we always want to have this flag set to true?
@Expensify/design @trjExpensify @mountiny Feel free to run new builds and test if it works fine :) Here's a video showing how it works now: Screen.Recording.2025-05-09.at.15.53.49.mov |
🚧 @shawnborton has triggered a test app build. You can view the workflow run here. |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
Yeah I think that makes sense to me. (And as a side note, I cannot wait for all reports to get the updated header treatment!) |
Mhm.. I'm in two minds about it, because I think it makes it a bit unpredictable. That list of expenses is a mixture of expenses on multi-expense reports, and one expense reports. So if some open main pane, others open in the RHP, but they look identical.. that's pretty confusing. So I think I lean towards all rows in |
Ok that's fair. What are your thoughts about opening up Expense/workspace chats right from Reports though? Basically this way we can try to keep most of the small blue links' navigation right within the Reports page. |
For now, I'd go with:
I'm open to changing that latter to open the parent chat report in the main pane, but I think it probably needs more discussion... like maybe some consideration for having chat results in the |
84a6228
to
f60de22
Compare
So I want to make sure, does the current version work fine? |
I believe this means the current version works fine, yes. Let's move this into final review then, thanks! |
@DylanDylann 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] |
f60de22
to
42fef5f
Compare
9ab79c7
to
485074d
Compare
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-05-15.at.17.12.24.movAndroid: mWeb ChromeScreen.Recording.2025-05-15.at.17.08.27.moviOS: HybridAppScreen.Recording.2025-05-15.at.17.09.50.moviOS: mWeb SafariScreen.Recording.2025-05-15.at.17.04.20.movMacOS: Chrome / SafariScreen.Recording.2025-05-15.at.17.01.16.movMacOS: DesktopScreen.Recording.2025-05-15.at.17.05.07.mov |
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
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.
Thanks, looking good
@@ -43,6 +61,31 @@ function ParentNavigationSubtitle({parentNavigationSubtitleData, parentReportAct | |||
onPress={() => { | |||
const parentAction = getReportAction(parentReportID, parentReportActionID); | |||
const isVisibleAction = shouldReportActionBeVisible(parentAction, parentAction?.reportActionID ?? CONST.DEFAULT_NUMBER_ID, canUserPerformWriteAction); | |||
|
|||
if (openParentReportInCurrentTab && isReportInRHP) { | |||
// If the report is displayed in RHP in Reports tab, we want to stay in the current tab after opening the parent report |
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.
Thank you for adding these comments, always better to add more with this logic
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Explanation of Change
This PR adds support for navigating to the parent report in the Reports tab. With this change, when clicking a link in the report header, users are redirected to the screen displayed in the current tab.
Note: This change only applies to expense reports.
Fixed Issues
$ #60441
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectioncanBeMissing
param foruseOnyx
toggleReport
and notonIconClick
)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
Screen.Recording.2025-05-13.at.16.22.18.mov
Android: mWeb Chrome
Screen.Recording.2025-05-13.at.16.24.44.mov
iOS: Native
Screen.Recording.2025-05-13.at.15.46.46.mov
iOS: mWeb Safari
Screen.Recording.2025-05-13.at.15.47.22.mov
MacOS: Chrome / Safari
Screen.Recording.2025-05-13.at.16.31.06.mov
MacOS: Desktop
Screen.Recording.2025-05-13.at.16.27.50.mov