material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[material-ui][Snackbar] Remove `notistack` library

Open ZeeshanTamboli opened this issue 1 year ago • 2 comments

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 https://github.com/mui/material-ui/pull/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 avatar Jun 24 '24 13:06 ZeeshanTamboli

Netlify deploy preview

Bundle size report

No bundle size changes (Toolpad) No bundle size changes

Generated by :no_entry_sign: dangerJS against 429add21aba834a7aa5d24b7c1e76f9982d263dc

mui-bot avatar Jun 24 '24 13:06 mui-bot

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.

ZeeshanTamboli avatar Jun 30 '24 09:06 ZeeshanTamboli

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.

DiegoAndai avatar Jul 01 '24 20:07 DiegoAndai

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.

ZeeshanTamboli avatar Jul 02 '24 12:07 ZeeshanTamboli

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

DiegoAndai avatar Jul 02 '24 14:07 DiegoAndai