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

[RFC] Extract Material UI from internal DataGrid APIs #7100

Open
1 of 21 tasks
siriwatknp opened this issue Dec 6, 2022 · 2 comments
Open
1 of 21 tasks

[RFC] Extract Material UI from internal DataGrid APIs #7100

siriwatknp opened this issue Dec 6, 2022 · 2 comments
Assignees
Labels
component: data grid This is the name of the generic UI component, not the React module! umbrella For grouping multiple issues to provide a holistic view

Comments

@siriwatknp
Copy link
Member

siriwatknp commented Dec 6, 2022

Goal

A continuation of #6811 to separate internal DataGrid APIs from Material UI without breaking changes. Those internal APIs will be used to integrate with Joy UI.

Not related to this issue but in the future, using Joy UI with DataGrid will be like this:

yarn add @mui/x-data-grid @mui/joy @emotion/react @emotion/styled
import { DataGrid } from '@mui/x-data-grid/DataGridJoy';

<DataGrid />;

Working branch?

next

Tasks

We will focus on the DataGrid MIT license (@mui-x/data-grid) first.

1. Start using @mui/system and @mui/base

  • use styled from @mui/system [data grid] Use styled from system #8032
  • use Box from @mui/system
  • use ClickAwayListener from @mui/base duplicate the component with Joy UI
  • use TrapFocus from @mui/base TrapFocus changed to FocusTrap which can break existing DataGrid projects.
  • use PopperUnstyled from @mui/base duplicate the component with Joy UI

2. Convert components to slots in defaultGridSlotsComponents.ts to use rootProps.components.* instead.

  • Material UI IconButton (in GridActionsCell)
  • Material UI MenuList (in GridActionsCell)
  • Material UI InputBase (in GridEditDataCell)
  • Material UI MenuItem (in GridEditSingleSelectCell)
  • Material UI Badge (in GridColumnHeaderFilterIconButton)
  • Material UI FormControl (in GridFilterForm)
  • Material UI FormControlLabel (in GridColumnsPanel)
  • Material UI CircularProgress (in GridLoadingOverlay)

3. Extract components to internal

These components are using Material UI component types. We need to generalize them to not include types from @mui/material and mask the types from the reexport of each design system.

  • GridMenu
  • GridActionsCellItem
  • GridBooleanCell
  • EditInputCell
  • GridSkeletonCell
  • GridFilterInputBoolean
  • GridFilterInputMultipleValue
  • GridColumnHeaders

Timeline

Start now - End of March

Next step (in a separate issue)

Start adding Joy UI components (April)

cc @cherniavskii

@siriwatknp siriwatknp added the umbrella For grouping multiple issues to provide a holistic view label Dec 6, 2022
@siriwatknp
Copy link
Member Author

@cherniavskii Does the list above look good to you?

@cherniavskii
Copy link
Member

Hey @siriwatknp

  1. Rename folder DataGrid to DataGridMaterial

I would rather keep the folder and only extract Material-related components (primarily slots) to a separate folder.
I started doing that some time ago in #7095

Move GridRootStyles to DataGridMaterial/components/MaterialGridRootStyles

Most styles in there are not specific to Material UI, so I would only extract some of them.

use styled from @mui/system

I've done this in #7095, but according to Flavien there are some differences in theme - see #7095 (comment).

I agree with the rest of the list. Part of that is already done in #7095. It's a bit outdated though

@oliviertassinari oliviertassinari added the design: joy This is about Joy Design, please involve a visual or UX designer in the process label Nov 21, 2023
@oliviertassinari oliviertassinari added the component: data grid This is the name of the generic UI component, not the React module! label Jul 24, 2024
@oliviertassinari oliviertassinari removed the design: joy This is about Joy Design, please involve a visual or UX designer in the process label Oct 19, 2024
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! umbrella For grouping multiple issues to provide a holistic view
Projects
None yet
Development

No branches or pull requests

3 participants