Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui][Snackbar] Remove notistack library #42739

Closed

Conversation

ZeeshanTamboli
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli commented Jun 24, 2024

Closes #42615

Originally, we added Material UI's Snackbar usage with notistack to show vertically stacked Snackbars. I was working on implementing this feature directly in Material UI (see PR #31991), but the PR was halted for various reasons.

Should we show usage with other libraries like react-toastify or sonner for vertically stacked snackbars?

Also, should this be cherry-picked to the master branch? I think it should.

@ZeeshanTamboli ZeeshanTamboli added docs Improvements or additions to the documentation component: snackbar This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material labels Jun 24, 2024
@mui-bot
Copy link

mui-bot commented Jun 24, 2024

Netlify deploy preview

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 429add2

@ZeeshanTamboli ZeeshanTamboli marked this pull request as ready for review June 24, 2024 14:17
Copy link
Contributor

@danilo-leal danilo-leal left a comment

Choose a reason for hiding this comment

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

Should we show usage with other libraries like react-toastify or sonner for vertically stacked snackbars?

Yeah, I think so! It'd make sense to replace notistack with something rather than just remove it (no hard preferences as far as making this right now in this PR or in a follow-up one). Generally speaking, we should still address the use case of vertically stacked snackbars somehow, with a recommendation of how we suggest pulling it off, while the component itself doesn't support it out of the box. I’m fine with both of these options.

@ZeeshanTamboli
Copy link
Member Author

ZeeshanTamboli commented Jun 30, 2024

I agree to replace notistack, but it's not possible to use react-toastify or sonner with our Snackbar. I checked their documentation and tried with Material UI Snackbar. We documented notistack because it provided a design similar to Material UI's Snackbar. So, we shouldn't merge this PR until we find an alternative. Ideally, we should have our own solution in the library. Alternatively, we could suggest this solution with an embedded CodeSandbox in our docs.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 1, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 1, 2024
@DiegoAndai
Copy link
Member

Base UI will eventually work on their Toast component, which is planned for Q3 in the latest roadmap I could find.

What would you say is the urgency of this issue @ZeeshanTamboli? If it can wait until Q4, I think we can add it to the Base UI refactor milestone.

@ZeeshanTamboli
Copy link
Member Author

ZeeshanTamboli commented Jul 2, 2024

I think we can add it to the Base UI refactor milestone.

I think you meant the Material UI refactor milestone, right? I'm fine with that. Ideally, before removing notistack, we should implement vertically stacked snackbars in our library. I'll close this PR and we'll continue recommending notistack for now, even if it's unmaintained, as it solves our issue.

@DiegoAndai
Copy link
Member

I think you meant the Material UI refactor milestone, right?

This one: https://github.com/mui/material-ui/milestone/51

I'll add the issue to it

@ZeeshanTamboli ZeeshanTamboli deleted the issue-42615-remove-notistack branch July 2, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: snackbar This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation package: material-ui Specific to @mui/material
Projects
None yet
4 participants