Repository navigation
[No QA] [Workspace Feeds] Create new Card List page - #44469
Conversation
# Conflicts: # src/libs/API/parameters/index.ts # src/libs/Navigation/AppNavigator/Navigators/FullScreenNavigator.tsx # src/libs/actions/Policy/Policy.ts # src/pages/workspace/WorkspaceInitialPage.tsx
|
@DylanDylann 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] |
|
Can you share a quick screen recording when you get a chance as well? Thanks! |
|
@VickyStash , I would be reviewing this PR instead of @DylanDylann , do let me know when you implement the latest suggestions from @shawnborton , I will start my review after the changes thanks |
allgandalf
left a comment
There was a problem hiding this comment.
left some comments, will review the page UI once the suggestions from shawn are implemented
| @@ -0,0 +1,6 @@ | |||
| type OpenPolicyExpensifyCardsPageParams = { | |||
| policyID: string; | |||
| authToken: string | null | undefined; | |||
There was a problem hiding this comment.
i don't think we should have a auth token ever as undefined, null case is okay but i highly doubt that we should keep it's type as undefined, what's your take on this @VickyStash ?
There was a problem hiding this comment.
That's the return type of the getAuthToken function
App/src/libs/Network/NetworkStore.ts
Lines 96 to 98 in 1d607ac
But I agree that undefined can be removed, but I'm not sure that I should do it in this PR.
| @@ -0,0 +1,6 @@ | |||
| type RequestExpensifyCardLimitIncreaseParams = { | |||
| authToken: string | null | undefined; | |||
| // const [cardsList] = useOnyx(`${ONYXKEYS.COLLECTION.EXPENSIFY_CARDS_LIST}${policyID}_Expensify Card`); | ||
| const cardsList = mockedCards; | ||
|
|
||
| const fetchExpensifyCards = useCallback(() => { |
There was a problem hiding this comment.
Isn't useMemo more appropriate here? , well there must be a reason for useCallback can you explain please
There was a problem hiding this comment.
I wanted to keep it aligned with other places in the code:
App/src/pages/workspace/tags/WorkspaceTagsPage.tsx
Lines 59 to 61 in 1d607ac
App/src/pages/workspace/WorkspaceInitialPage.tsx
Lines 136 to 138 in 1d607ac
allgandalf
left a comment
There was a problem hiding this comment.
Tested the latest changes, Look good to merge !
| /** Expensify cards list */ | ||
| EXPENSIFY_CARDS_LIST: 'card_', |
There was a problem hiding this comment.
| /** Expensify cards list */ | |
| EXPENSIFY_CARDS_LIST: 'card_', | |
| /** | |
| * Stores the card list for a given fundID and feed in the format: card_<fundID>_<bankName> | |
| * So for example: card_12345_ExpensifyCard | |
| */ | |
| EXPENSIFY_CARDS_LIST: 'card_', |
MariaHCD
left a comment
There was a problem hiding this comment.
Just have a question on removing the ExpensifyCard.ts in favor of Card.ts
https://github.com/Expensify/App/pull/44469/files#r1662157151
|
@MariaHCD yes in a sec, totally haven't thought about it 😅 |
|
|
||
| /** | ||
| * Stores the card list for a given fundID and feed in the format: card_<fundID>_<bankName> | ||
| * So for example: card_12345_ExpensifyCard |
There was a problem hiding this comment.
Sorry, apparently its with a space
| * So for example: card_12345_ExpensifyCard | |
| * So for example: card_12345_Expensify Card |
There was a problem hiding this comment.
That is the card name right? <bankName> would be different here 🤔
There was a problem hiding this comment.
@allgandalf it's not the name of the card, it's the name of the card feed which is referred to as bankName internally. For this project, the feed / bankName is Expensify Card - we will have more feeds introduced in the future.
There was a problem hiding this comment.
ahh, now that makes more sense to me 👍
| * Stores the card list for a given fundID and feed in the format: card_<fundID>_<bankName> | ||
| * So for example: card_12345_ExpensifyCard | ||
| */ | ||
| EXPENSIFY_CARDS_LIST: 'card_', |
There was a problem hiding this comment.
Not sure what is the best const name here so it doe snot intervene with the cardsList key
I dont think we should use Expensify_cards list as this will be reused for other feeds that are not necessarily Expensify cards cc @MariaHCD
I feel like Workspace might be ok, but also it might be be that clear with the domain feeds that are not strictly tied to a workspace
| EXPENSIFY_CARDS_LIST: 'card_', | |
| WORKSPACE_CARDS_LIST: 'card_', |
There was a problem hiding this comment.
Fair point. I'm thinking EXPENISFY_CARDS_LIST still makes the most sense.
Alternatively, we can go with WORKSPACE_CARDS_LIST and then for domain feeds it could a new const called DOMAIN_CARDS_LIST
There was a problem hiding this comment.
But having just one makes the most sense, I think so I'm still fine with EXPENISFY_CARDS_LIST
There was a problem hiding this comment.
Okay, looks like we're going with WORKSPACE_CARDS_LIST. I'm fine with that since it is more clear. We can change it down the line without much difficulty if we find it's not suitable for domain feeds.
| import type PersonalDetails from './PersonalDetails'; | ||
|
|
||
| /** Model of an Expensify card */ | ||
| type ExpensifyCard = OnyxCommon.OnyxValueWithOfflineFeedback<{ |
There was a problem hiding this comment.
+1, I assume we could reuse the same model
|
@mountiny addressed |
|
are all the comments addressed @koko57 ? I will test once again on all platforms just to be sure |
|
@allgandalf yep, all addressed |
allgandalf
left a comment
There was a problem hiding this comment.
Initial checklist is here, Tested again on all platforms after latest changes. Tests well on all platforms:
Screenshots/Videos
Android: Native
Screen.Recording.2024-07-02.at.6.15.28.PM.mov
mountiny
left a comment
There was a problem hiding this comment.
Thank you for addressing the feedback
|
Seems like design also liked the changes so I am going to go ahead and merge this |
|
✋ 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.0.4-0 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/tgolen in version: 9.0.4-5 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.6-8 🚀
|






Details
[Workspace Feeds] Create new Card List page
Fixed Issues
$ #44310
PROPOSAL: N/A
Tests
Pre-steps:
Add a new menu item to a workspace menu to simplify testing.
Insert this part of code into WorkspaceInitialPage screen.
You should see
Expensify Cardoption in the workspace menu now.Test steps:
NOTE: the data is mocked for now, API endpoints are in progress.
Offline tests
N/A
QA Steps
N/A
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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop