fix: Making the hidden input on Radio only cover the indicator and not also the label#25025
Merged
khmakoto merged 5 commits intomicrosoft:masterfrom Sep 30, 2022
Merged
Conversation
…t also the label.
Collaborator
📊 Bundle size report
Unchanged fixtures
|
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit d7708a2:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 259506702ec479f4fd9d7b848061dcae1354e168 (build) |
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1307 | 1333 | 5000 | |
| Button | mount | 956 | 954 | 5000 | |
| FluentProvider | mount | 1574 | 1593 | 5000 | |
| FluentProviderWithTheme | mount | 640 | 644 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 591 | 594 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 631 | 636 | 10 | |
| MakeStyles | mount | 1743 | 1896 | 50000 | |
| SpinButton | mount | 2436 | 2512 | 5000 |
behowell
reviewed
Sep 29, 2022
Contributor
behowell
left a comment
There was a problem hiding this comment.
I think you'd also need to add the pointer cursor to the label right?
':enabled': {
cursor: 'pointer',
+ [`& ~ .${radioClassNames.label}`]: {
+ cursor: 'pointer',
+ },
},
packages/react-components/react-radio/src/components/Radio/useRadioStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-radio/src/components/Radio/useRadioStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-radio/src/components/Radio/useRadioStyles.ts
Show resolved
Hide resolved
behowell
approved these changes
Sep 30, 2022
GeoffCoxMSFT
pushed a commit
to GeoffCoxMSFT/fluentui
that referenced
this pull request
Oct 3, 2022
…t also the label (microsoft#25025) * fix: Making the hidden input on Radio only cover the indicator and not also the label. * Updating to latest patterns. * Adding change file. * Addressing PR feedback * Addressing PR feedback. Co-authored-by: KHMakoto <humberto_makoto@hotmail.com>
NotWoods
pushed a commit
to NotWoods/fluentui
that referenced
this pull request
Nov 18, 2022
…t also the label (microsoft#25025) * fix: Making the hidden input on Radio only cover the indicator and not also the label. * Updating to latest patterns. * Adding change file. * Addressing PR feedback * Addressing PR feedback. Co-authored-by: KHMakoto <humberto_makoto@hotmail.com>
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.

Current Behavior
The hidden input in the
Radiocomponent covers both the indicator and the label, making any interactive elements within the label, like links, impossible to be clicked.We also noticed that when hovering over the label of disabled
Switches, it still showedcursor: pointerstyles.Input
Label
New Behavior
The hidden input in the
Radiocomponent now covers only the indicator and its surrounding space, not the label. This makes any interactive elements within the label, like links, possible to be clicked. We verified that clicking on the label still toggles the state of the component. We also expanded the size of the label so it covers the empty space around it that was previously being covered by the hidden input.Hovering over the label of disabled
Switchesnow showscursor: defaultinstead ofcursor: pointer.Input
Label
Related Issue(s)
Fixes #25021