-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Export Pages for Company Cards to include amendments #40902
Update Export Pages for Company Cards to include amendments #40902
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aldo-expensify agree with Option 2 - just having one additional command probably will be better solution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Co-authored-by: Tom Rhys Jones <[email protected]>
Co-authored-by: Tom Rhys Jones <[email protected]>
Co-authored-by: Tom Rhys Jones <[email protected]>
Co-authored-by: Rocio Perez-Cano <[email protected]>
Co-authored-by: Rocio Perez-Cano <[email protected]>
Co-authored-by: Rocio Perez-Cano <[email protected]>
Co-authored-by: Rocio Perez-Cano <[email protected]>
Co-authored-by: Rocio Perez-Cano <[email protected]>
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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