migrate pendingChatMembers to reportMetadata#54247
migrate pendingChatMembers to reportMetadata#54247puneetlath merged 23 commits intoExpensify:mainfrom
Conversation
|
@shubham1206agra 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] |
|
blocked by #54288 |
| Object.entries(value).forEach(([reportID, reportMetadata]) => { | ||
| if (!reportMetadata) { | ||
| return; | ||
| } | ||
|
|
||
| const [, id] = reportID.split('_'); | ||
| allReportMetadataKeyValue[id] = reportMetadata; | ||
| }); |
There was a problem hiding this comment.
@TMisiukiewicz Is this really needed? I am not sure about this.
There was a problem hiding this comment.
@shubham1206agra I decided to normalize the state here to make faster and easier calls to reportMetadata based on reportID. I was doing performance measurements and it this solution does not affect performance when making thousands of calls to reportMetadata when e.g. calculating option list
src/libs/actions/Policy/Member.ts
Outdated
| ); | ||
| successData.push({ | ||
| onyxMethod: Onyx.METHOD.MERGE, | ||
| key: `${ONYXKEYS.COLLECTION.REPORT}${report?.reportID}`, |
There was a problem hiding this comment.
@TMisiukiewicz You might want to update logic here. But why linter is not complaining here since this property no longer exists?
@TMisiukiewicz nvm. The bug should be repro on main too. Lets fix it later. Steps:
|
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-12-20.at.2.10.43.PM.movAndroid: mWeb ChromeScreen.Recording.2024-12-20.at.2.02.27.PM.moviOS: NativeiOS: mWeb SafariScreen.Recording.2024-12-20.at.1.58.51.PM.movMacOS: Chrome / SafariScreen.Recording.2024-12-20.at.1.44.59.PM.movMacOS: DesktopScreen.Recording.2024-12-20.at.2.04.02.PM.mov |
shubham1206agra
left a comment
There was a problem hiding this comment.
Please fix lint. Otherwise, good to go
|
done ✅ |
|
@TMisiukiewicz you have conflicts now after I merged the other one. |
|
should be good now 👍 |
|
✋ 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/puneetlath in version: 9.0.79-0 🚀
|
| /* eslint-disable @typescript-eslint/prefer-nullish-coalescing */ | ||
| const [parentReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID || '-1'}`); | ||
| const [reportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.reportID || '-1'}`); | ||
| const [parentReportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.parentReportID || '-1'}`); | ||
| const {reportActions} = usePaginatedReportActions(report.reportID || '-1'); | ||
| /* eslint-enable @typescript-eslint/prefer-nullish-coalescing */ | ||
| const [parentReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`); | ||
| const [reportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.reportID}`); | ||
| const [parentReportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.parentReportID}`); | ||
| const {reportActions} = usePaginatedReportActions(report.reportID); |
There was a problem hiding this comment.
Looks like we shouldn't have removed the defaults here - Being fixed in https://github.com/Expensify/App/pull/54652/files
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.0.79-5 🚀
|
| if (isTrackExpenseReport && !isDeletedParentAction) { | ||
| const actionReportID = ReportUtils.getOriginalReportID(report.reportID, parentReportAction) ?? '0'; | ||
| const whisperAction = ReportActionsUtils.getTrackExpenseActionableWhisper(iouTransactionID, moneyRequestReport?.reportID ?? '0'); | ||
| const actionableWhisperReportActionID = whisperAction?.reportActionID ?? '0'; |
There was a problem hiding this comment.
this removal of fallback caused issue
A detailed RCA can be found here



Explanation of Change
Follow up PR moving another key from
reportcollections toreportMetadataFixed Issues
$ #51867
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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
android.mov
Android: mWeb Chrome
android-web.mov
iOS: Native
ios.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov