Skip to content

Conversation

grimza99
Copy link

@grimza99 grimza99 commented Aug 7, 2025

👩‍💻Problem

On production, ui.shadcn.com/docs/components/sidebar#sidebargroupaction toast messages rendered in the wrong position and without theme styling.
Root cause: a duplicate was rendered — once globally (app/layout.tsx) and once locally (sidebar-group-action.tsx).
The local one bypassed the global layout/theme, leading to inconsistent behavior.

스크린샷 2025-08-08 오후 6 34 00

✅Solution

  • Removed the local from sidebar-group-action.tsx

  • Kept only the global defined in layout

  • Updated toast(...) calls to pass position and className via options, so customization is still possible per page


📷Preview

After applying the fix, the toast now appears as expected, with correct positioning and theme styling:

Dark theme
dark preview

Light theme

light preview

issues

#7801

Copy link

vercel bot commented Aug 7, 2025

@grimza99 is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

@grimza99 grimza99 changed the title fix(toast): resolve duplicated toaster rendering and position issue in sidebar fix(toast): resolve duplicated toaster rendering and theme styling on production web Aug 8, 2025
@grimza99 grimza99 changed the title fix(toast): resolve duplicated toaster rendering and theme styling on production web fix(production web): remove duplicate Toaster causing broken theme on production Aug 19, 2025
@grimza99
Copy link
Author

@shadcn
Hey, I’m using shadcn in my app and it’s been super helpful for moving fast. Thanks! ☺️

Looks like a minimal change to me, but since it fixes a production-facing bug, I think it’s worth merging quickly.

@grimza99 grimza99 changed the title fix(production web): remove duplicate Toaster causing broken theme on production fix(production web): 🎨 🛠️ remove duplicate Toaster causing broken theme on production Aug 19, 2025
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