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 from a40c93a to a9625c8 Compare January 30, 2026 18:19
@dmytrokirpa dmytrokirpa force-pushed the copilot/add-base-state-hooks-message-bar branch from e607561 to 7d64355 Compare January 30, 2026 18:22
@github-actions
Copy link

Pull request demo site: URL

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

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/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 26 Changed
vr-tests-react-components/Positioning.Positioning end.chromium.png 732 Changed
vr-tests-react-components/TagPicker 4 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 - High Contrast.chromium.png 1319 Changed
vr-tests-react-components/TagPicker.disabled.chromium.png 677 Changed

There were 4 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.

2 participants