Skip to content

fix(toast): wrap container in single root element#15

Merged
Goosterhof merged 1 commit into
mainfrom
fix/toast-container-fragment
Apr 8, 2026
Merged

fix(toast): wrap container in single root element#15
Goosterhof merged 1 commit into
mainfrom
fix/toast-container-fragment

Conversation

@Goosterhof
Copy link
Copy Markdown
Contributor

Summary

  • The ToastContainerComponent rendered a fragment (array of VNodes), causing Vue to silently drop all fallthrough attributes
  • Positioning classes applied directly on <component :is="ToastContainerComponent" /> had no effect — toasts appeared in normal document flow instead of fixed position
  • Wrapping the render output in a <div> gives the component a single root, enabling proper Vue attribute inheritance

Root cause

Vue's fallthrough attributes only work on single-root components. Fragment components silently discard them.

Test plan

  • All 16 existing tests pass
  • 100% coverage maintained
  • oxlint clean
  • oxfmt clean

🤖 Generated with Claude Code

The render function returned a fragment (array of VNodes), causing Vue
to silently drop fallthrough attributes. Positioning classes applied on
<component :is="ToastContainerComponent" /> had no effect. Wrapping in
a <div> enables proper attribute inheritance.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Goosterhof Goosterhof merged commit f6f5c73 into main Apr 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant