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

[DataGrid] Refactor: move progress components to leaf import #15914

Merged
merged 10 commits into from
Dec 20, 2024

Conversation

romgrk
Copy link
Contributor

@romgrk romgrk commented Dec 17, 2024

Part of the design-system agnostic work.

Move CircularProgress and LinearProgress to leaf import.

@romgrk romgrk added the component: data grid This is the name of the generic UI component, not the React module! label Dec 17, 2024
@romgrk romgrk requested a review from a team December 17, 2024 01:25
@mui-bot
Copy link

mui-bot commented Dec 17, 2024

Deploy preview: https://deploy-preview-15914--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 8319f99

packages/x-data-grid/src/models/gridBaseSlots.ts Outdated Show resolved Hide resolved
@@ -67,7 +66,7 @@ function GridGroupingCriteriaCellIcon(props: GridGroupingCriteriaCellIconProps)
if (isDataLoading) {
return (
<div className={classes.loadingContainer}>
<CircularProgress size="1rem" color="inherit" />
<rootProps.slots.baseCircularProgress size="1rem" color="inherit" />
Copy link
Member

@oliviertassinari oliviertassinari Dec 17, 2024

Choose a reason for hiding this comment

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

If packages/x-data-grid-premium/src/components/GridDataSourceGroupingCriteriaCell.tsx will be unstyled, this should be, no?

Suggested change
<rootProps.slots.baseCircularProgress size="1rem" color="inherit" />
<rootProps.slots.baseCircularProgress

Copy link
Member

@oliviertassinari oliviertassinari Dec 17, 2024

Choose a reason for hiding this comment

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

Actually, I wonder if the unstyled slot shouldn't also include <div className={classes.loadingContainer}> in a slot like this? It doesn't feel clear that this DOM CSS should be part of the unstyled grid CSS file. A developer might also want to add my own div / tailwind class name on this DOM.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If packages/x-data-grid-premium/src/components/GridDataSourceGroupingCriteriaCell.tsx will be unstyled, this should be, no?

Hard to say, I don't think there's a good answer to that. We still want to fine-tune components, but at the same time we want other design systems to be able to control anything from the outside, and those objectives are somewhat in conflict. For now I've mostly used material-ui API and left thing as-is (unless I saw a blocker for other design systems). I think I'd keep with the current refactoring approach just to get us to a point where we can set up the grid with mantine or shadcn, and then if we need to rework things a bit to allow more external control we can take that decision from there.

romgrk and others added 4 commits December 17, 2024 16:58
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Signed-off-by: Rom Grk <romgrk@users.noreply.github.com>
Co-authored-by: Kenan Yusuf <kenan.m.yusuf@gmail.com>
Signed-off-by: Rom Grk <romgrk@users.noreply.github.com>
@romgrk romgrk requested a review from a team December 18, 2024 20:09
@romgrk romgrk merged commit 562675c into mui:master Dec 20, 2024
18 checks passed
@romgrk romgrk deleted the refactor-agnostic-progress branch December 20, 2024 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants