Feat: Add company card feed flow#48119
Conversation
|
@Pujan92 can you prioritize review on this PR? We're looking to make progress on this project quickly. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandabc1.webmAndroid: mWeb ChromeiOS: NativeSimulator.Screen.Recording.-.iPhone.15.Pro.-.2024-08-30.at.13.39.21.mp4iOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2024-08-30.at.22.14.19.movScreen.Recording.2024-09-02.at.22.12.13.movMacOS: DesktopScreen.Recording.2024-09-03.at.20.40.58.mov |
|
@iwiznia Agree with your comments, removed unneeded hooks as we use new react compiler and fixed translations |
src/pages/workspace/companyCards/addNew/CardInstructionsStep.tsx
Outdated
Show resolved
Hide resolved
|
|
||
| const [addNewCard] = useOnyx(ONYXKEYS.ADD_NEW_COMPANY_CARD); | ||
| const feedProvider = addNewCard?.data.cardType; | ||
| const submit = () => {}; |
There was a problem hiding this comment.
I don't get it, we do nothing when you submit the form?
There was a problem hiding this comment.
Yes, because we don't have an API, at least didnt have when I was developing that
There was a problem hiding this comment.
Oh got it, so we will fill this up when the API is done?
There was a problem hiding this comment.
Yes, will raise new PR or will add it here if we don't merge before APi will appear
|
@dubielzyk-expensify did you get added to the beta for this? Mind giving it a look through when you're back online? |
|
Pulled the PR and tested locally. I couldn't get it working by clicking "Add company cards" btw only by manually entering the route. Looking great though. No notes 🥲 |
|
✋ 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 production by https://github.com/luacmartins in version: 9.0.33-4 🚀
|
| inputID={INPUT_IDS.CARD_TITLE} | ||
| label={translate('workspace.companyCards.addNewCard.enterNameOfBank')} | ||
| role={CONST.ROLE.PRESENTATION} | ||
| defaultValue={addNewCard?.data?.cardTitle} |
There was a problem hiding this comment.
We didn't add the max length for card name this caused #51564
| data: { | ||
| cardType: typeSelected, | ||
| }, |
There was a problem hiding this comment.
We should had cleared the Bank name, Bank name used to persist between different banks in the "Other" card feed. This missed added bankName variable here to update for the same, this caused #51860
| <Text style={[styles.textHeadlineLineHeightXXL, styles.ph5, styles.mv3]}> | ||
| {feedProvider ? translate(`workspace.companyCards.addNewCard.feedDetails.${feedProvider}.title`) : ''} | ||
| </Text> | ||
| <FormProvider |
There was a problem hiding this comment.
In native, pressing a button normally doesn't blur the active input. But in our case, the page is wrapped with a ScrollView with no keyboardShouldPersistTaps
It caused this bug #52144
| return ( | ||
| <ScreenWrapper | ||
| testID={CardInstructionsStep.displayName} | ||
| includeSafeAreaPaddingBottom={false} |
Details
Fixed Issues
$ #47376
PROPOSAL: N/A
Tests
Test with collect Plan:
Offline tests
Same as tests
QA Steps
None
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
Web
Screen.Recording.2024-08-28.at.20.53.19.mov