-
Notifications
You must be signed in to change notification settings - Fork 142
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
Feature: PayTo component #3114
base: main
Are you sure you want to change the base?
Feature: PayTo component #3114
Conversation
* adds PayTo component shell * payto segmented controller * add support to second description * adds email and refactor identifier to enum * adds pay input fields, starts validation * fix validator * splits PhoneInput and passes state to PayTo * tests and PR comments * fix tests
* chore(deps): update dependency express to v4.21.2 (#3061) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency eslint-plugin-testing-library to v6.5.0 (#3060) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency eslint-plugin-storybook to v0.11.1 (#3058) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency @changesets/cli to v2.27.11 (#3070) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency msw to v2.7.0 (#3074) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency globals to v15.14.0 (#3072) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency prettier to v3.4.2 (#3075) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency @rollup/plugin-node-resolve to v15.3.1 (#3071) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * bsb input component --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* change await screen * refactor list into dl * add msw to payto story * code review fixes * size limit and amount condition fix
🦋 Changeset detectedLatest commit: faf27f2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Size Change: +18.5 kB (+2.4%) Total Size: 789 kB
ℹ️ View Unchanged
|
size-limit report 📦
|
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.
It is quite hard to do a big review like this since I reviewed one small PR of the set of PR's that this feature has, but it seems good, and the UI/UX is looking nice too 👍
The majority of the comments I left are mainly about tidying up the code a little, they should be easy to tackle:
- enforcing typescript types for most of properties (which relates to be more strict with Types as we discussed internally);
- cleaning up old comments, left overs, console.logs;
- making sure TODO's were tackled and ideally not left behind (I don't think we/you intend to go back to these TODO's any time soon once we release the payment method)
The only critical issues I found are:
- for standalone component, shopper can press 'Continue' button multiple times (it does not happen for drop-in)
- for standalone/drop-in integrations, the continue button does not have the loading state UI (It should show a spinner and gets disabled, same as it happens with other PM's)
And the changeset is missing too.
packages/lib/src/components/Ach/components/AchInput/AchInput.tsx
Outdated
Show resolved
Hide resolved
|
Summary
There's a few changes that are probably worth highlighting here:
There's a new set of validations implemented, and an utility function to create a validation from any regex
There's also a
createEnumChecker
, might be useful in a few other scenariosPayID is one of the types of authenticating PayTo
Await can now display the amount via
showAmount
flagAwait now has instructions like QRLoader
Await has one final element, I just called it endSlot so it could be generic, this open to discussion.
Moved the voucher details / list / table into a new component
The new component DetailsTable uses a
dl
element (definition list), see docs: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl#metadataMandate Summary handles all the i18n logic to display the table, this could have been a function but seems more clean in separate component
There's a discussion point on the length of the Mandate Summary logic block as it seems quite big, however I want to retain all the logic in one place for ease of editing, feel free to discuss this too
Tested scenarios
Fixed issue: