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

[docs] New documentation page State #3431

Merged
merged 26 commits into from Jan 11, 2022

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Dec 14, 2021

Closes #3144
Doc preview

  • New "State" documentation page to document how to use the selectors and the initialState prop
  • New docs:api:build script to generate a JSON with all the selectors
  • Explicit warning when trying to use useGridSelector before state initialization instead of just letting the code crash

For Pagination / Filter / Sorting selectors:

  • New auto-generated Selectors section on the doc page
  • JSDoc description for every selector and @ignore for selectors we don't want to expose publicly

I think we should deprecate the ill-named selectors or selectors to be removed before documenting them.
So that the selector list on the documentation is clean.
For instance selection and columns selector have not yet be renamed correctly.
If there are selectors you think we should not document, tell me so. I don't document top level selectors like gridFilterStateSeledctor because I would like to stop exporting them from their file. To only expose the interesting values, not the whole sub-filter.


I'm not a huge fan of the UI for the selector collection.
But I think the apiRef collection and events collection are not great either and that we need to rethink those 3 UIs to have something coherent.

@flaviendelangle flaviendelangle self-assigned this Dec 14, 2021
@flaviendelangle flaviendelangle added component: data grid This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation labels Dec 14, 2021
@flaviendelangle flaviendelangle changed the title [docs] Document the selectors [docs] New documentation page State Dec 14, 2021
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Dec 14, 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 removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Dec 15, 2021
@flaviendelangle flaviendelangle marked this pull request as ready for review December 21, 2021 10:48
docs/src/pages/components/data-grid/state/state.md Outdated Show resolved Hide resolved
docs/src/pages/components/data-grid/state/state.md Outdated Show resolved Hide resolved
docs/src/pages/components/data-grid/state/state.md Outdated Show resolved Hide resolved
docs/src/pages/components/data-grid/state/state.md Outdated Show resolved Hide resolved
flaviendelangle and others added 5 commits January 11, 2022 11:43
Co-authored-by: Danail Hadjiatanasov <hadjiatanasov@gmail.com>
Co-authored-by: Danail Hadjiatanasov <hadjiatanasov@gmail.com>
Co-authored-by: Danail Hadjiatanasov <hadjiatanasov@gmail.com>
Co-authored-by: Danail Hadjiatanasov <hadjiatanasov@gmail.com>
@flaviendelangle flaviendelangle merged commit e2376d2 into mui:master Jan 11, 2022
@flaviendelangle flaviendelangle deleted the selector-docs branch January 11, 2022 11:40
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! docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[docs] Document the selectors
3 participants