backstage-plugin-announcements icon indicating copy to clipboard operation
backstage-plugin-announcements copied to clipboard

🚀 Feature: Migrate to Material UI 5

Open Roshick opened this issue 10 months ago • 2 comments

🔖 Feature description

Migrate to Material UI 5

🎤 Context

Backstage is moving towards full Material UI 5 and I think it would be a good idea for this plugin to also migrate to get rid of Material UI 4 dependencies altogether.

✌️ Possible Implementation

No response

👀 Have you spent some time to check if this feature request has been raised before?

  • [X] I checked and didn't find similar issue

Are you willing to submit PR?

Yes I am willing to submit a PR!

Roshick avatar Apr 04 '24 06:04 Roshick

Hey @Roshick, thanks for getting involved. I'd love to see this completed!

kurtaking avatar Apr 04 '24 13:04 kurtaking

@kurtaking I just had a look at this and most of the migration is done, but there appears to be some weird behavior between the snackbar and the backstage alerts api.

Looking at the documentation of the snackbar (https://mui.com/material-ui/react-snackbar/#usage), this element is not really made for in-flow placement anyway and I would suggest switching to alerts (https://mui.com/material-ui/react-alert/).

examples with alerts (different variants, text colors could be changed): variant1 variant2 variant3

now the banner has some variant prop that can be either "block" or "floating", which I assume should toggle between in-flow and overlay, but I'm not quite sure... is the floating variant used anywhere?

Roshick avatar Apr 18 '24 10:04 Roshick

Hey @Roshick, started work on this in https://github.com/procore-oss/backstage-plugin-announcements/pull/455. Do you want to give it a review?

As far as the announcement banner goes, I agree that we need to move away from the Snackbar. I'll think through that on a separate PR.

kurtaking avatar Oct 01 '24 04:10 kurtaking