Update Export Pages for Company Cards to include amendments#40902
Update Export Pages for Company Cards to include amendments#40902hayata-suenaga merged 12 commits intoExpensify:mainfrom narefyev91:qbo-card-expense-pages
Conversation
|
@hayata-suenaga @s77rt @trjExpensify - first pass! |
|
@dukenv0307 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] |
|
@dukenv0307 I will review this one as it's part of QBO |
|
ad hoc build brewing -> https://github.com/Expensify/App/actions/runs/8818710475 the mockups are in this GH issue |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
src/pages/workspace/accounting/qbo/export/QuickbooksCompanyCardExpenseAccountPage.tsx
Outdated
Show resolved
Hide resolved
src/pages/workspace/accounting/qbo/export/QuickbooksCompanyCardExpenseAccountPage.tsx
Outdated
Show resolved
Hide resolved
src/pages/workspace/accounting/qbo/export/QuickbooksCompanyCardExpenseAccountPage.tsx
Outdated
Show resolved
Hide resolved
src/pages/workspace/accounting/qbo/export/QuickbooksCompanyCardExpenseAccountPage.tsx
Outdated
Show resolved
Hide resolved
...ges/workspace/accounting/qbo/export/QuickbooksCompanyCardExpenseAccountPayableSelectPage.tsx
Show resolved
Hide resolved
src/pages/workspace/accounting/qbo/export/QuickbooksCompanyCardExpenseAccountSelectCardPage.tsx
Show resolved
Hide resolved
| Connections.updatePolicyConnectionConfig(policyID, CONST.POLICY.CONNECTIONS.NAME.QBO, CONST.QUICK_BOOKS_CONFIG.EXPORT_COMPANY_CARD, row.value); | ||
| Connections.updatePolicyConnectionConfig(policyID, CONST.POLICY.CONNECTIONS.NAME.QBO, CONST.QUICK_BOOKS_CONFIG.EXPORT_COMPANY_CARD_ACCOUNT); |
There was a problem hiding this comment.
Each user action should generate at most 1 API call
https://github.com/Expensify/App/blob/main/contributingGuides/API.md
There was a problem hiding this comment.
Yeah - but here we need to set one value - and clean up already existed one from other field @s77rt do we have some examples?
There was a problem hiding this comment.
I saw something like this one:

When Onyx is reseting.. but not sure if that works
Also i can move this logic to useEffect, based on prev stored card item and new one, but probably it looks like overkill. Maybe it can be done on BE side @hayata-suenaga - if user change company card - BE automatically clean up selected Account/Vendor. Will it be possible?
There was a problem hiding this comment.
@aldo-expensify, if we're to follow the 1:1:1 pattern, I think we can create a new Web-E command. What do you think?
There was a problem hiding this comment.
So when you set CONST.QUICK_BOOKS_CONFIG.EXPORT_COMPANY_CARD, we have to always clear CONST.QUICK_BOOKS_CONFIG.EXPORT_COMPANY_CARD_ACCOUNT, is that what is happening?
There was a problem hiding this comment.
Yes, we have to follow 1:1:1, and I don't think we should go around with a useEffect. I see two options:
Option 1: We keep using UpdatePolicyConnectionConfig and we change the backend to clear CONST.QUICK_BOOKS_CONFIG.EXPORT_COMPANY_CARD_ACCOUNT if CONST.QUICK_BOOKS_CONFIG.EXPORT_COMPANY_CARD is being set. That would mean that we also have to add this exception in Connections.updatePolicyConnectionConfig to create the optimistic data correctly
Option 2: Add a new command
Maybe Option 2 is cleaner to avoid ending up with a bunch of exceptions in UpdatePolicyConnectionConfig
There was a problem hiding this comment.
@aldo-expensify agree with Option 2 - just having one additional command probably will be better solution
There was a problem hiding this comment.
internal follow up issue -> https://github.com/Expensify/Expensify/issues/390731
|
🙈 @shawnborton @dubielzyk-expensify shouldn't all those hint texts be styled like this? Instead of being totally separated from the push input and in |
|
@dannymcclain I totally agree with you - I think the issue we run into is that we don't have this push row component in a good place where the hint text is considered part of the hoverable area. @narefyev91 does that sound right? Otherwise I totally agree, I would love to make them look like your mocks above! |
If that's the case, should this kind of improvement come separately for all places we have push row+hint text in the app? A little bit mindful of adding a refactor to this PR. |
Yeah - the error message should come from API side - and right now it's not in sync for that field - it will be message 100% |
Yeah! that's right - hint text is not a part of the hoverable area. We do not have insider MenuItem standard component |
Can someone fill me in on what would cause RBR/an error on that field to choose an export method for company card spend? 🤔 |
...ges/workspace/accounting/qbo/export/QuickbooksCompanyCardExpenseAccountPayableSelectPage.tsx
Outdated
Show resolved
Hide resolved
src/pages/workspace/accounting/qbo/export/QuickbooksCompanyCardExpenseAccountSelectCardPage.tsx
Outdated
Show resolved
Hide resolved
Probably if API failed? 500 or something else |
Co-authored-by: Tom Rhys Jones <tom@expensify.com>
Co-authored-by: Tom Rhys Jones <tom@expensify.com>
Co-authored-by: Tom Rhys Jones <tom@expensify.com>
Co-authored-by: Tom Rhys Jones <tom@expensify.com>
Co-authored-by: Rocio Perez-Cano <pecanoro@users.noreply.github.com>
Co-authored-by: Rocio Perez-Cano <pecanoro@users.noreply.github.com>
Co-authored-by: Rocio Perez-Cano <pecanoro@users.noreply.github.com>
Co-authored-by: Rocio Perez-Cano <pecanoro@users.noreply.github.com>
Co-authored-by: Rocio Perez-Cano <pecanoro@users.noreply.github.com>
|
Cool, I agree we can look at the hint text improvements as a follow up. Ideally they are part of the hoverable area and sit closer to the push row above them. |
hayata-suenaga
left a comment
There was a problem hiding this comment.
deploy will happen soon and this is behind beta
people wants to test before weekend so let's merge
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.4.66-0 🚀
|
|
🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.4.66-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.66-5 🚀
|
| shouldShowRightIcon | ||
| /> | ||
| </OfflineWithFeedback> | ||
| <ToggleSettingOptionRow |
There was a problem hiding this comment.
The addition of this toggle turned out to have a small UI difference from what design was expecting, leading the following issue:
basically missing shouldPlaceSubtitleBelowSwitch (true) which was rendering the toggle in the center of both title and subtitle container, instead of rendering the subtitle underneath the [title - toggle] container.
There was a problem hiding this comment.
thank you for fixing it!



Details
Update Export Pages for Company Cards to include amendments
Fixed Issues
$ #40792
PROPOSAL:
Tests
Offline tests
QA Steps
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
android-web.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-web.mov
MacOS: Chrome / Safari
Screen.Recording.2024-04-24.at.14.12.01.mov
MacOS: Desktop
deskotop.mov