-
Notifications
You must be signed in to change notification settings - Fork 87
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
feat(core): create register customer page #730
Conversation
🦋 Changeset detectedLatest commit: b0dac9f 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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Ignored Deployments
|
13724b3
to
7a9bd6d
Compare
@@ -15,7 +15,8 @@ type ValidationPattern = | |||
| 'tooShort' | |||
| 'typeMismatch' | |||
| 'valid' | |||
| 'valueMissing'; | |||
| 'valueMissing' | |||
| ValidationFunction; |
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 think there can be an error in ControlValidationPatterns
so basically you can update and use ControlValidationPatterns
after:
type ControlValidationPatterns = ValidationPattern | ValidationFunction;
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.
Yes, changed after your updates
7a9bd6d
to
9684f20
Compare
9684f20
to
9cf15f0
Compare
9cf15f0
to
eb39d48
Compare
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.
IMO /register-customer-form
should be nested under a _components
folder in the register-customer
path, since it's not reused.
import { getCountries } from '~/client/management/get-countries'; | ||
import { getAddressFormFields } from '~/client/queries/get-address-form-fields'; | ||
import { getCustomerFormFields } from '~/client/queries/get-customer-form-fields'; | ||
import { getReCaptchaSettings } from '~/client/queries/get-recaptcha-settings'; | ||
import { getStoreCountry } from '~/client/queries/get-store-country'; |
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.
Can we do this with a single query?
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.
Interesting idea, but getAddressFormFields
, getAddressFormFields
and getReCaptchaSettings
need to be used in separate cases 🤔
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.
You can try something like what @deini is doing with fragment colocation. 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.
@jorgemoya thats great idea, thanks. Refactored according to the new approach 👍
Hmm, It's interested point. I guess that in this case it makes sense to move |
It will be consistent. And |
{ address: {} }, | ||
); | ||
|
||
console.log(parsedData, 'parsedData'); |
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.
don't forget to remove console
setCountryStates(data); | ||
}; | ||
|
||
const handlePicklistWihtTextValidation = (e: ChangeEvent<HTMLInputElement>) => { |
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.
here is a typo in method's name.
eb39d48
to
b876e08
Compare
b876e08
to
6e2602f
Compare
116cb79
to
39237a6
Compare
39237a6
to
829542b
Compare
2356444
to
3f34f46
Compare
3f34f46
to
7cfe738
Compare
7cfe738
to
9e44131
Compare
9e44131
to
adfe121
Compare
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.
Nice job!
adfe121
to
f722907
Compare
f722907
to
b0dac9f
Compare
⚡️🏠 Lighthouse reportLighthouse ran against https://catalyst-latest-5d59de1i0-bigcommerce-platform.vercel.app 🖥️ DesktopWe ran Lighthouse against the changes on a desktop and produced this report. Here's the summary:
📱 MobileWe ran Lighthouse against the changes on a mobile and produced this report. Here's the summary:
|
What/Why?
This pr adds Register Customer Page with Built In Fields
Testing
Locally