Skip to content

fix: keep S2 toast controls spaced from the expanded list while scrol… - #10621

Open
Zakkaus wants to merge 1 commit into
adobe:mainfrom
Zakkaus:fix/s2-toast-expanded-spacing
Open

Zakkaus wants to merge 1 commit into
adobe:mainfrom
Zakkaus:fix/s2-toast-expanded-spacing

Conversation

@Zakkaus

@Zakkaus Zakkaus commented Sep 21, 2026

Copy link
Copy Markdown

When the expanded toast list overflows, its padding toward the Clear all / Collapse buttons scrolls away with the content and toasts sit flush against the buttons. This moves that spacing to the region so it stays constant while scrolling.

圖片 圖片

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices
  • I understand every change in this PR and can explain why it's there.
  • If AI-assisted, I followed our AI contribution guidance and pointed my assistant at CLAUDE.md.

📝 Test Instructions:

In the S2 Storybook Toast Example story, show about 12 toasts, click the stack to expand, and scroll. The gap between the buttons and the list no longer disappears.

🧢 Your Project:

@snowystinger snowystinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR.
Can you provide a before and after screenshot of what you mean? Usually this would have an Issue first with that information, that way we can confirm the issue and the fix.
(yes, I realise this one is fairly obvious, but it helps with historical context)

isExpanded: {
placement: {
top: 8,
bottom: 16

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what happened to the 16, now they're both only 8

@Zakkaus Zakkaus Sep 21, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

圖片 圖片

Still 16 total on the viewport side: 8 on the list for the focus ring, 8 moved to the region so it stays outside the scroll container. The side next to the buttons goes from 8 to 16 for the same reason, and the buttons now keep 8 from the viewport edge.

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