fix(react-button): do not expose default menuIcon in useMenuButtonBase_unstable#36345
Open
mainframev wants to merge 2 commits into
Open
fix(react-button): do not expose default menuIcon in useMenuButtonBase_unstable#36345mainframev wants to merge 2 commits into
mainframev wants to merge 2 commits into
Conversation
…e_unstable
Move the default ChevronDownRegular icon out of the headless base hook
(useMenuButtonBase_unstable) and into the styled useMenuButton_unstable so
that headless consumers do not inherit a default icon. The default is applied
in a null-safe way so that menuIcon={null} still hides the icon.
Add regression tests covering menuIcon={null} on the styled hook and the
absence of a default icon on the base hook.
|
Pull request demo site: URL |
📊 Bundle size reportUnchanged fixtures
|
mainframev
added a commit
to mainframev/fluentui
that referenced
this pull request
Jun 24, 2026
…on_unstable Align with the standalone react-button PR (microsoft#36345). Replaces the post-hoc mutation of baseState.menuIcon with passing a null-safe default into useMenuButtonBase_unstable, so menuIcon={null} still hides the icon. This react-button change is owned by microsoft#36345 and will drop out of this branch once microsoft#36345 merges and this branch is rebased onto master.
| @@ -0,0 +1,7 @@ | |||
| { | |||
There was a problem hiding this comment.
🕵🏾♀️ visual changes to review in the Visual Change Report
vr-tests-react-components/Positioning 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Positioning.Positioning end.chromium.png | 617 | Changed |
| vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png | 515 | Changed |
vr-tests-react-components/ProgressBar converged 3 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png | 58 | Changed |
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png | 51 | Changed |
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png | 80 | Changed |
vr-tests-react-components/TagPicker 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/TagPicker.disabled - High Contrast.chromium.png | 1319 | Changed |
| vr-tests-react-components/TagPicker.disabled.disabled input hover.chromium.png | 677 | Changed |
There were 2 duplicate changes discarded. Check the build logs for more information.
… the specific icon
7b39038 to
bde5af0
Compare
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.


Addresses review comment: #36320 (comment)