Repository navigation
fix(many): update form controls (radio, checkbox, toggle, input, select) to have consistent disabled opacity - #27396
Merged
Merged
Conversation
this will break md, that fix is next
|
|
brandyscarney
commented
May 12, 2023
This reverts commit aacb8e2.
Member
Author
|
@sean-perkins Can you take a look at this? I think it replaces your PR here #26893 |
liamdebeasi
reviewed
May 16, 2023
sean-perkins
approved these changes
May 16, 2023
sean-perkins
left a comment
Contributor
There was a problem hiding this comment.
I don't have any outstanding feedback, nice work 👍
4 of 13 tasks
liamdebeasi
approved these changes
May 17, 2023
liamdebeasi
approved these changes
May 17, 2023
brandyscarney
added a commit
that referenced
this pull request
May 22, 2023
…ct) to have consistent disabled opacity (#27396) Issue number: resolves #27184 --------- The modern form controls do not use the same opacity for their labels when disabled, resulting in inconsistent UI when using two different types in the same view (select vs checkbox, for example). The checkbox, input, radio, range, select, textarea and toggle labels have been updated on both modes to use the same opacity as each other when disabled. The checkbox and radio icons have been updated to use a different opacity than the label for `md` mode. - Updates `ios` mode so all form controls use the same opacity of `0.3` - I could not find any guidelines by Apple for what color these should be, so I decided to just make them the same as what is most commonly used & match item - Updates `md` mode so all form control labels use the same opacity of `0.38` - I used the [Material Design 3 documentation](https://m2.material.io/components) to get this number as well as the opacity of the disabled selection controls in the [Material Design 2 figma design kit](https://www.figma.com/community/file/778763161265841481). The Material Design 2 documentation does not mention the opacity, but this is also the number used by Material Design 1 so it's safe to assume it is what the disabled form labels should also use for Material Design 2. - Updates the `md` range so the slotted elements are also included when setting the opacity on the label - Updates the range, radio & checkbox tests to make sure there are screenshots in the different disabled states - Updates the item/disabled test to include radio & textarea so you can see all form controls side by side - [ ] Yes - [x] No I downloaded screenshots of the item disabled tests and put them side by side for `main` and this branch in order to see the differences in the labels. The grey boxes to the left of each item are just a bigger version of the label color for that item, so it's easier to see when they aren't the same.   --------- Co-authored-by: ionitron <[email protected]>
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.
Issue number: resolves #27184
What is the current behavior?
The modern form controls do not use the same opacity for their labels when disabled, resulting in inconsistent UI when using two different types in the same view (select vs checkbox, for example).
What is the new behavior?
The checkbox, input, radio, range, select, textarea and toggle labels have been updated on both modes to use the same opacity as each other when disabled. The checkbox and radio icons have been updated to use a different opacity than the label for
mdmode.iosmode so all form controls use the same opacity of0.3mdmode so all form control labels use the same opacity of0.38mdrange so the slotted elements are also included when setting the opacity on the labelDoes this introduce a breaking change?
Other information
I downloaded screenshots of the item disabled tests and put them side by side for
mainand this branch in order to see the differences in the labels. The grey boxes to the left of each item are just a bigger version of the label color for that item, so it's easier to see when they aren't the same.