[Odometer] Add save for later functionality#87726
[Odometer] Add save for later functionality#87726jakubkalinski0 wants to merge 21 commits intoExpensify:mainfrom
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
…unctionality # Conflicts: # Mobile-Expensify # android/app/build.gradle # ios/NewExpensify/Info.plist # ios/NotificationServiceExtension/Info.plist # ios/ShareViewController/Info.plist # package-lock.json # package.json # src/CONST/index.ts # src/ROUTES.ts # src/SCREENS.ts # src/components/ReportActionItem/MoneyRequestReportPreview/MoneyRequestReportPreviewContent.tsx # src/components/TransactionItemRow/index.tsx # src/languages/de.ts # src/languages/en.ts # src/languages/es.ts # src/languages/fr.ts # src/languages/it.ts # src/languages/ja.ts # src/languages/nl.ts # src/languages/pl.ts # src/languages/pt-BR.ts # src/languages/zh-hans.ts # src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx # src/libs/Navigation/linkingConfig/OldRoutes.ts # src/libs/Navigation/linkingConfig/RELATIONS/WORKSPACE_TO_RHP.ts # src/libs/Navigation/linkingConfig/config.ts # src/libs/Navigation/types.ts # src/libs/ReportUtils.ts # src/libs/actions/IOU/index.ts # src/libs/actions/connections/NetSuiteCommands.ts # src/pages/inbox/report/PureReportActionItem.tsx # src/pages/inbox/report/ReportActionItem.tsx # src/pages/iou/request/step/IOURequestStepConfirmation.tsx # src/pages/workspace/accounting/intacct/export/DynamicSageIntacctNonReimbursableExpensesDestinationPage.tsx # src/pages/workspace/accounting/intacct/export/SageIntacctExportPage.tsx # src/pages/workspace/companyCards/WorkspaceCompanyCardExpensifyCardPromotionBanner.tsx # src/types/onyx/Policy.ts # tests/actions/connections/NetSuite.ts # tests/navigation/getMatchingNewRouteTest.ts # tests/unit/ReportActionsUtilsTest.ts
…ardConfirmationRef to match new implementation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4fbd413f8f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review pls |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddb1c9223e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Explanation of Change
Adds "Save for later" functionality to the Odometer screen for new distance requests. A new
ODOMETER_DRAFTOnyx key persists start/end readings and images (base64on web,URIon native). When the user returns to theOdometer tab, the draft is hydrated back into the transaction. Draft is cleared on successful submission.Important
Screenshots from the Design Doc for more context
Add Save for later button to the Odometer expense page (Issue #87817)
Add ability for Odometer readings and image data to be saved to device storage (Issue #87818)
Modify Odometer expense tab to detect and retrieve draft expense data (Issue #87819)
Details
Fixed Issues
$ #87817
$ #87818
$ #87819
PROPOSAL: N/A
Tests
"Save for later"and verify if theRHPis closed properly."Save for later".odometerDraftkey is null usingDevTools) and you navigate back normally, i.e.RHPis closed properly."Save for later".odometerDraftdata is still there."Save for later"."Next"-> "Create").odometerDraftOnyx key is cleared after successful submission."Save for later".odometerDraftOnyx key should still hold this info - on the same platform ofc)."Next"-> "Create").odometerDraftOnyx key is cleared after successful submission.Offline tests
Same as Tests (with the difference that when you tap
"Create"the expense will be pending until you go backOnline)QA Steps
Same as Tests
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))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
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari