-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix/37448: Incorrect title thread #38267
Fix/37448: Incorrect title thread #38267
Conversation
@mkhutornyi 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] |
@mkhutornyi Ping to review the PR in case you miss it |
@@ -97,12 +97,12 @@ function getForDistanceRequest(newDistance: string, oldDistance: string, newAmou | |||
* ModifiedExpense::getNewDotComment in Web-Expensify should match this. | |||
* If we change this function be sure to update the backend as well. | |||
*/ | |||
function getForReportAction(reportID: string | undefined, reportAction: OnyxEntry<ReportAction>): string { | |||
function getForReportAction(reportID: string | undefined, reportAction: OnyxEntry<ReportAction> | ReportAction | Record<string, never>): string { |
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 don't like updating type of reportAction here.
If this causes TS error in other place, fix it to match OnyxEntry<ReportAction>
instead of fixing here.
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.
- Do you have any idea to do like you mentioned?
- Additionally, I just tested the current implementation and there is no TS error in other place
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.
ok, I am fine with this as already existing pattern in other place
@@ -0,0 +1,32 @@ | |||
import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; |
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 see that this is to avoid cycle dependency.
Please add comment why this separate file is needed.
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.
Added comment
Please merge main. I will check shortly |
I merged main |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.movMacOS: Desktopdesktop.mov |
@@ -2687,6 +2689,9 @@ function getReportName(report: OnyxEntry<Report>, policy: OnyxEntry<Policy> = nu | |||
if (parentReportActionMessage && isArchivedRoom(report)) { | |||
return `${parentReportActionMessage} (${Localize.translateLocal('common.archived')})`; | |||
} | |||
if (ReportActionsUtils.isModifiedExpenseAction(parentReportAction)) { | |||
return ModifiedExpenseMessage.getForReportAction(report?.reportID, parentReportAction); |
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.
We should have used formatReportLastMessageText
here similar to other cases above. More context here: #49518
Details
Fixed Issues
$ #37448
PROPOSAL: #37448 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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.2024-03-14.at.08.43.31.mov
Android: mWeb Chrome
Screen.Recording.2024-03-14.at.08.29.51.mov
iOS: Native
iOS: mWeb Safari
Screen.Recording.2024-03-14.at.08.41.30.mov
MacOS: Chrome / Safari
Screen.Recording.2024-03-14.at.08.23.58.mov
MacOS: Desktop
Screen.Recording.2024-03-14.at.08.46.49.mov