Repository navigation
feat(gcalendar): migrate plugin from Material-UI to Backstage UI - #11611
Conversation
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
48f06a3 to
9c89e15
Compare
hopehadfield
left a comment
There was a problem hiding this comment.
Thanks for the contribution @deepthi-28! I've added a few comments 🙂
| color="primary" | ||
| /> | ||
| </Badge> | ||
| <span className={styles.root}> |
There was a problem hiding this comment.
TagGroup renders <div> elements, which should not sit inside this <span>. Could we change the wrapper to a <div>? The existing display: inline-flex rule should preserve the chip and badge layout.
There was a problem hiding this comment.
Fixed in fec22dbb3 — the wrapper is now a <div>, so the TagGroup divs are no longer nested inside a <span>. As you noted, the existing display: inline-flex keeps the chip and badge layout unchanged.
fec22db to
dd76dd0
Compare
|
Note: I force-pushed to amend the commit message only — no code changes. The commit referenced in my replies above as |
hopehadfield
left a comment
There was a problem hiding this comment.
Sorry for the double-back @deepthi-28 but I just had a few more thoughts I'd like to get your input on.
Also, I'm wondering if there is a reason for the partial migration as opposed to a full migration.
| @@ -128,21 +133,21 @@ export const CalendarCard = () => { | |||
| > | |||
| <Box> | |||
| {showLoader && ( | |||
| <Box py={2}> | |||
| <div className={styles.loaderWrap}> | |||
There was a problem hiding this comment.
Can we use BUI Box here instead of a <div>?
There was a problem hiding this comment.
Fixed in 3c5dfc1 — switched to BUI Box here.
| {events.length === 0 && ( | ||
| <Box pt={2} pb={2}> | ||
| <Typography align="center" variant="h6"> | ||
| <div className={styles.noEventsWrap}> |
There was a problem hiding this comment.
Fixed in 3c5dfc1 — switched to BUI Box here.
| <Text as="p" variant="body-small"> | ||
| Attendees | ||
| </Text> | ||
| <div className={styles.attendees}> |
There was a problem hiding this comment.
Same here, can we use a BUI Box?
There was a problem hiding this comment.
Fixed in 3c5dfc1 — switched to BUI Box here.
Replace MUI Box, Typography, Button, IconButton, Badge, Chip, Tooltip and Divider with their Backstage UI equivalents, swap Material icons for Remix icons, and convert makeStyles usages to CSS modules. Drop the @material-ui/icons dependency and add @backstage/ui. The event and calendar select components still use Material-UI: CalendarEvent depends on material-ui-popup-state, which is tied to the MUI Popover, and CalendarSelect is a multi-select with checkboxes that Backstage UI has no equivalent for. Add a minimal app-config.yaml so the dev app can start. Signed-off-by: deepthi-ajith_infosys <[email protected]>
- Import TooltipTrigger from @backstage/ui so the tooltip and trigger share the same React Aria context, and drop the direct react-aria-components dependency that pulled in a second version. - Use a div wrapper for the attendee chip to avoid nesting the TagGroup divs inside a span. - Replace unsupported design tokens with ones provided by the resolved Backstage UI version. Signed-off-by: deepthi-ajith_infosys <[email protected]>
Replace remaining <div> wrappers with the Backstage UI <Box> component in CalendarCard and CalendarEventPopoverContent, as requested in review. Co-authored-by: Copilot <[email protected]> Signed-off-by: deepthi-ajith_infosys <[email protected]>
Migrate CalendarEvent and CalendarSelect, the two remaining components still using Material-UI, to Backstage UI. CalendarEvent now uses Card/DialogTrigger/Popover instead of Paper + material-ui-popup-state, and CalendarSelect uses the BUI Select component with selectionMode="multiple" instead of the MUI Select/Checkbox/MenuItem combination. Remove the now-unused @material-ui/core and material-ui-popup-state dependencies. Co-authored-by: Copilot <[email protected]> Signed-off-by: deepthi-ajith_infosys <[email protected]>
d3dd176 to
46800c0
Compare
|
Thanks for the review @hopehadfield ! All your comments are addressed: Please review. |
hopehadfield
left a comment
There was a problem hiding this comment.
Looks good to me now! 🚀
Migrates the Google Calendar plugin from Material-UI to Backstage UI.
Signed-off-byline in the message. (more info)