LG-5193: Extract PhoneInputComponent for reuse#5481
Merged
Conversation
zachmargolis
reviewed
Oct 7, 2021
aduth
commented
Oct 8, 2021
aduth
commented
Oct 12, 2021
aduth
commented
Oct 12, 2021
config/locales/components/es.yml
Outdated
Comment on lines
5
to
6
Contributor
Author
There was a problem hiding this comment.
Need to get these translated.
Blocked by: https://github.com/18F/identity-idp/pull/5481/files#r727395901
1185076 to
9fb0f9b
Compare
Contributor
Author
|
Alright, after merging #5490, rebasing the branch, and adding final translations, I think this should be ready for review finally. |
**Why**: Toward supporting LG-5193, to display an international phone input on the hybrid "Send Link" screen.
querySelectorAll always returns an array, which is truthy
Only one per element, elements available from iti instance
**Why**: Not needed with no-js. Maybe helps make it be a bit more standalone, but still tied to USWDS. YAGNI for now
codeWrapper not called in constructor
More reliable than waiting on intlTelInput to set placeholder, e.g. in case of failed server-side validation where value is prepopulated, intlTelInput won't actually set the placeholder
Because it's only used within the component
**Why**: So that it's less of a mystery when things break
**Why**: Need to sort out conflicts with Webpack dynamic imports See: #5481 (comment)
More compatible with querySelector result
Address separately at: #5492 This reverts commit 631d27efd42b0e314cbc9de87844cf2d01e6b3ec.
**Why**: Because it creates scoped variables which aren't accessible at time of assertions
**Why**: Avoid conflicts with multiple custom validations on text input
**Why**: Avoid conflicts of validation handling between form-validation and otp-delivery-preference
**Why**: Regression spec for disabling submit on invalid phone numbers
**Why**: Hopefully fix issue with Webpacker root path being set with double leading slashes ("//packs-test")
See: #5481 (review)
This reverts commit c655059eac6728bb344f749a1a3eccf6fc51f1a9.
Because we don't set it, so it's more confusing to be visible
5fcfffd to
3a8a971
Compare
This was referenced Oct 15, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why: Toward supporting LG-5193, to display an international phone input on the hybrid "Send Link" screen.