Skip to content

fix: Forward headless Toaster default options - #36633

Merged
Dmytro Kirpa (dmytrokirpa) merged 3 commits into
microsoft:masterfrom
dmytrokirpa:fix/headless-toaster-default-options
Aug 27, 2026
Merged

fix: Forward headless Toaster default options#36633
Dmytro Kirpa (dmytrokirpa) merged 3 commits into
microsoft:masterfrom
dmytrokirpa:fix/headless-toaster-default-options

Conversation

@dmytrokirpa

Copy link
Copy Markdown
Contributor

Previous Behavior

The headless Toaster accepted shared default options in its public props, but did not forward limit, position, timeout, pauseOnWindowBlur, or priority to toast state. It also forced pauseOnHover to true and passed render-only offset into toast state.

New Behavior

The headless Toaster forwards all shared toast defaults to the underlying state hook, including limit, and respects the configured pauseOnHover value. offset remains render-only.

Regression tests cover limiting rendered toasts and propagating Toaster-level defaults to dispatched toasts.

Related Issue(s)

  • None

Validation

  • yarn nx run react-headless-components-preview:test --runTestsByPath src/components/Toast/Toaster/Toaster.test.tsx --runInBand (10/10 tests passed)
  • yarn nx run react-headless-components-preview:lint
  • yarn beachball check

Forward Toaster-level defaults to the shared toast state, including limit and timer behavior. Add regression coverage for limiting rendered toasts and propagating default options.
@github-actions

github-actionsBot commented Aug 25, 2026

Copy link
Copy Markdown

📊 Bundle size report

Package & ExportsBaseline (minified/GZIP)PRChange
react-headless-components-preview
react-headless-components-preview: entire library
237.987 kB
67.02 kB
238.112 kB
67.048 kB
125 B
28 B
Unchanged fixtures
Package & ExportsSize (minified/GZIP)
react-headless-components-preview
@fluentui/react-headless-components-preview/tag-picker
53.988 kB
17.748 kB
react-headless-components-preview
@fluentui/react-headless-components-preview/teaching-popover
36.048 kB
11.996 kB
🤖 This report was generated against dfab5d732f028b0475663f5a945ede85e6ffc5c3

@github-actions

Copy link
Copy Markdown

Pull request demo site: URL

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes headless Toaster option forwarding to align with shared toast state behavior.

Changes:

  • Forwards shared defaults and limit while keeping offset render-only.
  • Adds regression tests for limits and default options.
  • Adds a patch change file.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

FileDescription
useToaster.tsxForwards Toaster defaults correctly.
Toaster.test.tsxTests limits and option propagation.
Change fileRecords the patch release.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, simple fix

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@dmytrokirpa
Dmytro Kirpa (dmytrokirpa) merged commit 25b0646 into microsoft:masterAug 27, 2026
13 checks passed
Sign up for freeto 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.

3 participants

@dmytrokirpa@PaulGMardling