Skip to content

feat(react-dialog): [CAP] closeButton prop to DialogTitle#35956

Draft
GianoglioEnrico wants to merge 1 commit intomicrosoft:masterfrom
GianoglioEnrico:feat/cap-visual-refresh-dialog
Draft

feat(react-dialog): [CAP] closeButton prop to DialogTitle#35956
GianoglioEnrico wants to merge 1 commit intomicrosoft:masterfrom
GianoglioEnrico:feat/cap-visual-refresh-dialog

Conversation

@GianoglioEnrico
Copy link
Copy Markdown
Contributor

This PR replaces the raw <button> element in DialogTitle's default non-modal close action with the Button component from @fluentui/react-button. It also replace the Dismiss20Regular with Dismiss16Regular icon.

Changes

  • New closeButton prop: Added closeButton?: ButtonProps to DialogTitleProps, allowing consumers to customize the default close button (e.g. aria-label, appearance, size) without replacing the entire action slot.
  • Button component: The default close action now renders <Button appearance="transparent" size="small" icon={<Dismiss16Regular />} /> instead of a raw <button> with internal styles.
  • Removed useDialogTitleInternalStyles: No longer needed since the Button component provides its own styling.
  • Action slot alignment: Added marginRight: '-8px' to the action slot to keep the dismiss icon visually aligned with the right edge of the dialog body.

Notes

The closeButton prop is only applied to the default close button and has no effect when action is explicitly provided.

…icon from Dismiss20Regular to Dismiss16Regular
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-components
react-components: entire library
1.299 MB
324.701 kB
1.297 MB
324.601 kB
-1.873 kB
-100 B
react-dialog
Dialog (including children components)
102.117 kB
30.367 kB
124.986 kB
35.076 kB
22.869 kB
4.709 kB
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Button, FluentProvider & webLightTheme
70.397 kB
19.96 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
236.743 kB
68.75 kB
react-components
react-components: FluentProvider & webLightTheme
43.612 kB
14.022 kB
react-portal-compat
PortalCompatProvider
8.386 kB
2.624 kB
react-timepicker-compat
TimePicker
108.565 kB
35.848 kB
🤖 This report was generated against ba68f3ae34eca3000c4c0432ba07fd5b95c7001d

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Pull request demo site: URL

@@ -6,6 +6,7 @@

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/Charts-DonutChart 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Charts-DonutChart.Dynamic - RTL.default.chromium.png 5570 Changed
vr-tests-react-components/Charts-DonutChart.Dynamic - Dark Mode.default.chromium.png 7530 Changed
vr-tests-react-components/Charts-DonutChart.Dynamic.default.chromium.png 5581 Changed
vr-tests-react-components/Dialog 4 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Dialog.title custom action - Dark Mode.chromium.png 98 Changed
vr-tests-react-components/Dialog.title custom action - High Contrast.chromium.png 145 Changed
vr-tests-react-components/Dialog.non-modal - High Contrast.chromium.png 53 Changed
vr-tests-react-components/Dialog.title custom action.chromium.png 107 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default - RTL.submenus open.chromium.png 404 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default.submenus open.chromium.png 413 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.chromium.png 515 Changed
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 731 Changed
vr-tests-react-components/ProgressBar converged 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png 103 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png 116 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png 37 Changed
vr-tests-react-components/TagPicker 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled - Dark Mode.disabled input hover.chromium.png 658 Changed
vr-tests-react-components/TagPicker.disabled - RTL.disabled input hover.chromium.png 635 Changed
vr-tests-react-components/TagPicker.disabled.chromium.png 677 Changed

There were 7 duplicate changes discarded. Check the build logs for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant