-
Notifications
You must be signed in to change notification settings - Fork 166
LG-7947: Remove "top" position option for password toggle #7285
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d3d6d81
LG-7947: Remove "top" position for password toggle
aduth 22e76c5
Disable password toggle as left-aligned, unbordered
aduth 9a0eaf2
Increase margin for reverify submit button
aduth 18c292d
Increase margin between password toggle and password strength
aduth 9081a62
Adjust password toggle spacing
aduth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,12 @@ | ||
| lg-password-toggle { | ||
| display: block; | ||
| position: relative; | ||
|
|
||
| &.password-toggle--toggle-top .password-toggle__toggle-label { | ||
| @include u-pin-right; | ||
| top: -24px; | ||
| .validated-field__input-wrapper { | ||
| margin-bottom: 0; | ||
| } | ||
|
|
||
| &.password-toggle--toggle-bottom .validated-field__input-wrapper { | ||
| margin-bottom: units(2); | ||
| } | ||
| } | ||
|
|
||
| .password-toggle__toggle-wrapper { | ||
| display: flex; | ||
| justify-content: end; | ||
| } | ||
|
|
||
| .password-toggle__toggle-label.usa-checkbox__label { | ||
| @include u-margin-y(0); | ||
| @include u-padding-y(1); | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,25 @@ | ||
| <%= content_tag(:'lg-password-toggle', class: css_class) do %> | ||
| <%= content_tag(:'lg-password-toggle', **tag_options) do %> | ||
| <%= render ValidatedFieldComponent.new( | ||
| form: form, | ||
| name: :password, | ||
| type: :password, | ||
| label: label, | ||
| label: default_label, | ||
| **field_options, | ||
| input_html: field_options[:input_html].to_h.merge( | ||
| id: input_id, | ||
| class: ['password-toggle__input', *field_options.dig(:input_html, :class)], | ||
| ), | ||
| ) %> | ||
| <div class="password-toggle__toggle-wrapper js"> | ||
| <input | ||
| id="<%= toggle_id %>" | ||
| type="checkbox" | ||
| class="usa-checkbox__input usa-checkbox__input--bordered password-toggle__toggle" | ||
| aria-controls="<%= input_id %>" | ||
| > | ||
| <label | ||
| for="<%= toggle_id %>" | ||
| class="usa-checkbox__label password-toggle__toggle-label" | ||
| > | ||
| <%= toggle_label %> | ||
| </label> | ||
| </div> | ||
| <input | ||
| id="<%= toggle_id %>" | ||
| type="checkbox" | ||
| class="usa-checkbox__input password-toggle__toggle" | ||
| aria-controls="<%= input_id %>" | ||
| > | ||
| <label | ||
| for="<%= toggle_id %>" | ||
| class="usa-checkbox__label password-toggle__toggle-label" | ||
| > | ||
| <%= toggle_label %> | ||
| </label> | ||
| <% end %> | ||
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
Previously this component would forward all additional initializer attributes to the
ValidatedFieldComponent. This made it easier to apply options to the field as an optimized use-case (contrast with newfield_options), but (a) was inconsistent with other components which would apply additional attributes to the root element and (b) made it difficult or impossible to assign additional attributes to the root element (e.g. extra CSS classes).