-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: create base Popper #16362
Open
romgrk
wants to merge
20
commits into
mui:master
Choose a base branch
from
romgrk:refactor-agnostic-popper
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+265
−193
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
e64b4c0
refactor: create base popper
romgrk 59f16e0
fix: typings
romgrk e14546d
refactor: remove FocusTrap
romgrk 82d2f18
lint
romgrk ea07cce
lint
romgrk 0a1e2a3
fix: panel click-away
romgrk 0f9b68f
lint
romgrk e900c37
lint
romgrk 5f54acf
tests
romgrk e1eb968
lint
romgrk 04ba2bc
lint
romgrk 0f6f955
test: delete GridPanel.test.tsx
romgrk 1fd72bf
Merge branch 'master' into refactor-agnostic-popper
romgrk a9e2567
lint
romgrk d84727c
Merge branch 'master' into refactor-agnostic-popper
romgrk b0d07d6
Merge branch 'master' into refactor-agnostic-popper
romgrk 277ee88
ci: run (empty commit)
romgrk 7e58b10
Merge branch 'master' into refactor-agnostic-popper
romgrk 8ea2ee0
fix: target & other props
romgrk 95745f8
fix: scroll reset bug
romgrk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 0 additions & 42 deletions
42
packages/x-data-grid/src/components/panel/GridPanel.test.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this diff strange. What if we were to import https://github.com/mui/material-ui/blob/master/packages/mui-material/src/Popper/BasePopper.tsx and style this one instead.
But even then, I'm unclear about the need. Maybe what confuses me is in the order in which we do this. Shouldn't we first move
GridMenuRoot
out of the unstyled version? Once we do, we can stick to import and wrapPopper
. The fewer React component wrappers, the fastest the grid is.Unless maybe the whole GridMenu component is a styled API, so maybe move the whole thing out of the unstyled data grid? If I'm using Shadcn UI, would I want to replace it, or add sub slots? I think it's how we determine if it's for the unstyled API or Material UI API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What we need to do here is wrap
rootProps.slots.basePopper
, but it's not available at initialization. I'm using thisNotRendered
component just to make the typechecking work. At runtime,as={slots.basePopper}
needs to be used.As for the styled/unstyled changes, I'm still evaluating how to do them. Ideally, we'll have a styling solution that doesn't require tangling styles to components at initialization time.