Add Assign new cards option for direct card feeds v2#86032
Draft
fedirjh wants to merge 12 commits intoExpensify:mainfrom
Draft
Add Assign new cards option for direct card feeds v2#86032fedirjh wants to merge 12 commits intoExpensify:mainfrom
Assign new cards option for direct card feeds v2#86032fedirjh wants to merge 12 commits intoExpensify:mainfrom
Conversation
- Introduced a new route for refreshing the company card feed connection in ROUTES.ts. - Added corresponding screen identifier in SCREENS.ts. - Updated navigation types to include parameters for the new screen. - Registered the new screen in the modal stack navigator. - Updated linking configuration to support the new route.
- Added new translation keys for 'Assign new cards' and its description in both en.ts and es.ts files.
…CardsSettingsPage - Created a new RefreshCardFeedConnectionPage component to handle the card feed connection process. - Implemented logic to manage navigation based on the current step of the card assignment process. - Updated WorkspaceCompanyCardsSettingsPage to include a menu item for assigning new cards, linking it to the new refresh card feed connection page. - Enhanced the user experience by conditionally displaying the new menu item based on the feed type.
- Updated the AssignCard type to include an isRefreshing property to track the refresh state. - Modified setAssignCardStepAndData function to accept and merge the isRefreshing state. - Implemented logic in RefreshCardFeedConnectionPage to prevent navigation during refresh. - Adjusted WorkspaceCompanyCardsSettingsPage to set the isRefreshing state when initiating card assignment.
- Introduced usePrevious hook to track the previous isRefreshing state. - Updated navigation logic to close the RHP flow only when transitioning from refreshing to not refreshing. - Adjusted useEffect dependencies for better state management.
- Added a title prop to BankConnection and PlaidConnectionStep components for better header customization. - Updated RefreshCardFeedConnectionPage to utilize the new title prop, improving consistency in header titles across components. - Refactored LoadingPage to use the title prop for a unified user experience.
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
- Integrated useCardFeeds hook to manage card feed data and expiration. - Added logic to trigger setFeedRefreshComplete on feed expiration changes during refresh. - Improved state management in RefreshCardFeedConnectionPage for better user experience. - Refactored imports in WorkspaceCompanyCardsSettingsPage for clarity and organization.
- Created comprehensive tests for the RefreshCardFeedConnectionPage component to validate rendering based on different states. - Included tests for loading state, bank connection, and plaid connection steps. - Verified that the correct actions are called on component unmount and when feed expiration updates. - Enhanced test coverage to ensure robust handling of card feed connection scenarios.
- Introduced a new page for verifying company card accounts, enhancing the user flow for account validation. - Updated ROUTES.ts and SCREENS.ts to include the new verification route and screen identifier. - Modified navigation logic in existing components to redirect users to the verification page when account validation is required. - Ensured proper linking configuration for the new route to maintain navigation integrity.
- Introduced seedCardFeedRefresh and startCardFeedRefresh functions to manage the card feed refresh flow. - Updated WorkspaceCompanyCardsVerifyAccountPage to utilize the new refresh logic upon successful account validation. - Refactored WorkspaceCompanyCardsSettingsPage to initiate the card feed refresh process using the new functions. - Improved import organization across multiple components for better clarity and maintainability.
…ngsPage for improved state handling - Updated RefreshCardFeedConnectionPage to enhance the logic for closing the RHP flow and setting feed refresh completion based on state changes. - Refactored useEffect dependencies to prevent unnecessary executions and improve clarity. - Moved the import statement for isUserValidatedSelector in WorkspaceCompanyCardsSettingsPage for better organization.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
Direct card feeds cache their accountList at initial connection. When banks issue new cards, they don't appear in NewDot's assignment UI. This PR adds an "Assign new cards" menu item in the feed settings page (only for direct feeds) that triggers the existing OAuth/Plaid reconnection flow to refresh the card list.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/594594
$ #79383
$ #85676
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)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