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

[core] Clean hook folder structure to remove unwanted exports #2789

Merged
merged 10 commits into from
Oct 13, 2021

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Oct 6, 2021

Part of #2608
Part of #2227

Goal

This PR structures the hooks folder accordingly to #2608 but in _modules_ (splitting it between the x-data-grid and x-data-grid-pro folder should be easy after that).

I did not finished the 1 sub-state = 1 feature hook = 1 folder proposal since it requires deeper changes in the state and I don't want to do it in parallel with #2782

Breaking changes

The following exports have been removed (list taken for the pro version)
Most of them are the feature hook of the Grid and could not be used in a third party code anyway. If one day we implement a clean headless API #1016, we will export them again.

-convertGridRowsPropToState 
-getInitialGridState
-useApi 
-useGridColumnMenu 
-useGridColumnReorder 
-useGridColumnResize 
-useGridColumns 
-useGridContainerProps 
-useGridControlState 
-useGridEditRows 
-useGridFilter 
-useGridFocus 
-useGridKeyboard
-useGridKeyboardNavigation 
-useGridLoggerFactory 
-useGridPage 
-useGridPageSize 
-useGridParamsApi 
-useGridPreferencesPanel 
-useGridRows 
-useGridScroll 
-useGridSelection 
-useGridSorting 
-useGridVirtualization

The following exports have been renamed (list taken from the pro version)

-useNativeEventListener
+useGridNativeEventListener

The following exports have been added (list taken for the pro version)

@mui-org/x, do we want to avoid exporting some of them ?
I just exported everything which is is hooks/utils

+GridSignature 
+getInitialGridDensityState 
+getInitialPaginationState 
+gridDensityHeaderHeightSelector 
+gridDensityRowHeightSelector 
+gridDensitySelector 
+gridDensityValueSelector 
+gridRenderingSelector 
+gridScrollSelector 
+useGridApiContext 
+useGridApiEventHandler 
+useGridApiOptionHandler 
+useGridProcessedProps

@flaviendelangle flaviendelangle self-assigned this Oct 6, 2021
@flaviendelangle flaviendelangle added breaking change component: data grid This is the name of the generic UI component, not the React module! labels Oct 6, 2021
@flaviendelangle flaviendelangle added this to the v5 stable version milestone Oct 6, 2021
@flaviendelangle flaviendelangle marked this pull request as ready for review October 6, 2021 17:27
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 8, 2021
@github-actions
Copy link

github-actions bot commented Oct 8, 2021

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 9, 2021
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 11, 2021
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 11, 2021
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 12, 2021
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 12, 2021
@flaviendelangle flaviendelangle merged commit aa11570 into mui:next Oct 13, 2021
@flaviendelangle flaviendelangle deleted the hook-structure branch October 13, 2021 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change 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.

1 participant