Repository navigation
Use existing selfDM report - #73208
Use existing selfDM report #73208mountiny merged 45 commits into
Conversation
|
@mountiny if action on selfDM is performed when user is offline, should we update notification preference optimistically? |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
Yeah I think we should so they can see it in the LHN |
…remove-unused-params
|
Since https://github.com/Expensify/Auth/pull/17757 is merged and deployed "Hold" can be removed |
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
| buildOptimisticReportPreview, | ||
| buildOptimisticRoomDescriptionUpdatedReportAction, | ||
| buildOptimisticSelfDMReport, | ||
| buildOptimisticUnHoldReportAction, |
There was a problem hiding this comment.
If the selfDM report is created as hidden initially, the OpenApp will not return it, right? Then this would fail still?
So if you:
- Create a new account and selfDM is created as hidden
- OpenApp does not return it after a sign-out and sign in
- Create an expense on the workspace
- Delete report
- The expenses should move to the selfDM
There was a problem hiding this comment.
OpenApp doesn't return selfDM report but it does return its ID
There was a problem hiding this comment.
So then when we move the user to the report optimistically, how will it look like if they are offline but they dont have the report data, created report action and metadata?
There was a problem hiding this comment.
SelfDM report is created in an optimistic way with correct reportID. Report metadata and report action are also created in optimistic way. But since we don't know reportAction ID, the action is removed when requested is finished successfully and correct one from backend is inserted into Onyx.
|
tests are failing @jnowakow |
| const existingSelfDMReportID = findSelfDMReportID(); | ||
| let selfDMReport: Report | undefined; | ||
| let selfDMReportID = findSelfDMReportID(); | ||
| let selfDMReport: Report | undefined = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${selfDMReportID}`]; |
There was a problem hiding this comment.
I think you would need to pass the report, not just the id to make it pure, but lets not do it here
mountiny
left a comment
There was a problem hiding this comment.
Perfect, thank you! all yours @MonilBhavsar
|
I see that Monil already approved this in the past |
|
✋ 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/mountiny in version: 9.2.65-0 🚀
|
…pr-73208 [CP Staging] Revert "Merge pull request #73208 from software-mansion-labs/jnowakow/556957-remove-unused-params"
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.2.65-6 🚀
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.2.66-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.2.66-3 🚀
|
Explanation of Change
SelfDM reports will be created during account creation and will have notification preference equal to
hiddenby default. Optimistically creating selfDM reports during onboarding is causing bugs with new behaviour so this PR removes that logicFixed Issues
$ https://github.com/Expensify/Expensify/issues/556957
PROPOSAL: n/a
Tests
muted.Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
muted.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)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: mWeb Chrome
android-web.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-web.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop