Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

Introduces base state hooks for all MessageBar components following the pattern established in #35697 for Persona.

Changes

  • MessageBar: Added useMessageBarBase_unstable that handles core behavior (layout, politeness announcements, refs, a11y) without design props (intent, shape, icon)
  • MessageBarActions: Added useMessageBarActionsBase_unstable
  • MessageBarBody: Added useMessageBarBodyBase_unstable
  • MessageBarGroup: Added useMessageBarGroupBase_unstable
  • MessageBarTitle: Added useMessageBarTitleBase_unstable

Each component now exports corresponding BaseProps and BaseState types.

Usage

// Create a custom MessageBar variant without design props
const state = useMessageBarBase_unstable(baseProps, ref);

// Full hook composes base + adds design props
const state = useMessageBar_unstable(props, ref);
// Internally: useMessageBarBase_unstable({ ...restProps, politeness }, ref)

API Surface

New exports per component:

  • useMessageBar*Base_unstable hooks
  • MessageBar*BaseProps types
  • MessageBar*BaseState types

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Introduce base state hooks for MessageBar components feat(react-message-bar): add base state hooks for MessageBar components Jan 29, 2026
Copilot AI requested a review from dmytrokirpa January 29, 2026 16:58
@dmytrokirpa dmytrokirpa force-pushed the copilot/add-base-state-hooks-message-bar branch 2 times, most recently from e607561 to 7d64355 Compare January 30, 2026 18:22
@github-actions
Copy link

Pull request demo site: URL

@@ -0,0 +1,7 @@
{
Copy link

@github-actions github-actions bot Jan 30, 2026

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/CalendarCompat 4 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/CalendarCompat.multiDayView - Dark Mode.default.chromium.png 555 Changed
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium_1.png 481 Changed
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium.png 391 Changed
vr-tests-react-components/CalendarCompat.multiDayView - High Contrast.default.chromium.png 680 Changed
vr-tests-react-components/Charts-DonutChart 2 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/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.chromium.png 610 Changed
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 607 Changed
vr-tests-react-components/Skeleton converged 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Skeleton converged.Opaque Skeleton with circle - High Contrast.default.chromium.png 1 Changed

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

@dmytrokirpa dmytrokirpa force-pushed the copilot/add-base-state-hooks-message-bar branch from 7d64355 to a9898c4 Compare January 31, 2026 07:31
Co-authored-by: dmytrokirpa <1492102+dmytrokirpa@users.noreply.github.com>
@dmytrokirpa dmytrokirpa force-pushed the copilot/add-base-state-hooks-message-bar branch from a9898c4 to 6cd6181 Compare January 31, 2026 07:33
@github-actions
Copy link

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-components
react-components: entire library
1.291 MB
322.995 kB
1.292 MB
323.081 kB
155 B
86 B
react-message-bar
MessageBar (all components)
23.264 kB
8.58 kB
19.956 kB
7.31 kB
-3.308 kB
-1.27 kB
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Button, FluentProvider & webLightTheme
70.224 kB
19.89 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
237.179 kB
68.482 kB
react-components
react-components: FluentProvider & webLightTheme
43.523 kB
13.978 kB
react-portal-compat
PortalCompatProvider
8.386 kB
2.624 kB
react-timepicker-compat
TimePicker
108.15 kB
35.693 kB
🤖 This report was generated against 72fa991316ec4a9d207a2926f4bf41c683314bad

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.

2 participants