Conversation
**Why**: To more easily migrate to Login Design System standardized buttons, consolidate to abstracted component usage
zachmargolis
approved these changes
Jul 27, 2020
app/javascript/app/document-capture/components/documents-step.jsx
Outdated
Show resolved
Hide resolved
See: #3978 (comment) Follow-up: Upgrade to ESLint 7 and use colocated comment descriptions
aduth
commented
Jul 28, 2020
Comment on lines
+9
to
+14
| // This import is temporary and scoped to the new Document Capture screen. The File Input component | ||
| // is part of a USWDS version newer than what's currently shipped with Login Design System. Follow- | ||
| // up work should upgrade to use a newer USWDS, at which time this should be removed altogether. | ||
| #document-capture-form { | ||
| @import 'uswds/dist/scss/elements/form-controls/file-input'; | ||
| } |
Contributor
Author
There was a problem hiding this comment.
In some last-minute testing to see what potential side-effects could occur from this import, I noticed that the USWDS file input stylesheet applies some styles to file inputs globally. While the version of USWDS which is bundled with Login Design System does include some as well, they are not the same (margin, padding). This has the result that file inputs elsewhere in the application would have their styling altered unintentionally.
As a workaround, I updated the @import to be scoped to the #document-capture-form element used as the mounting point for the new React application, to ensure that styling only takes effect for the new page, until the design system can be upgraded as a whole.
**Why**: The rule makes sense in cases where styling is intended to be reused. In this case, the usage is where it's explicitly intended not to be reused.
This was referenced Jul 28, 2020
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: As a user, I expect to be able to upload my ID documents, so that I can complete the identity verification step.
This is a basic initial implementation of the documents upload step as part of the new React-based document capture flow.
Screen Recording:
Implementation Notes:
identity-style-guideis currently running USWDS 2.0.3, it was implemented here by adding USWDS as a dependency and importing the stylesheet directly. It's unclear if this pull request should instead be blocked by a (pending) upgrade of USWDS in the Login Design System. The import should be relatively self-contained. In any case, long-term, it's not expected thatuswdsshould need to be defined as a dependency of the project.FormStepscomponent was changed to support front and back being assigned in a single step, where now each step will receive the full current form values object, and is expected to trigger changes as a patch object.useInstanceIdhook was introduced to simplify ID generation in accessible label association. This would be useful in the current Accordion component implementation, but I chose not to update it here, since it is pending removal at Update accordion to use Login Design System #3974, since it is not proposed to be used in current designs.cc @anniehirshman-gsa