Skip to content

[docs] New page for the action bar customization #5267

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

Merged
merged 25 commits into from
Jul 7, 2022

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Jun 20, 2022

Add a doc page to explain how to override components on the pickers, with a 1st detailed example for ActionBar

The Overriding components section is mainly a copy paste of the grid doc.
Maybe it would be nice to have a well written page shared by all our components (core and X) explaining the components and componentsProps instead.

Doc preview

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@flaviendelangle flaviendelangle self-assigned this Jun 20, 2022
@flaviendelangle flaviendelangle added docs Improvements or additions to the documentation component: pickers This is the name of the generic UI component, not the React module! labels Jun 20, 2022
Fix

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@mui-bot
Copy link

mui-bot commented Jun 20, 2022

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 247 495 336.8 340.62 88.193
Sort 100k rows ms 424.7 786.3 760.3 663.66 141.633
Select 100k rows ms 130.8 207.2 188 180.56 27.685
Deselect 100k rows ms 97.1 313.5 204.4 185.4 72.729

Generated by 🚫 dangerJS against 77a2449

Fix

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Fix

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Copy link
Member

@alexfauquette alexfauquette left a comment

Choose a reason for hiding this comment

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

What about using StatikDatePicker instead of StatikDateTimePicker for the demonstrations such that we can focus on the action bar without being distracted by the view switching between calender/clock?

About the second demo, the code is maybe over complicated. What about a CustomActionBar that displays a cancel/validate buttons made with <IconButton />

Instead of the too long switch could be something like

{actions.includes('cancel') && <CancelButton onClick={onCancel} />}

Such that you define the UI code (CancelButton and ValidateButton) on top, and CustomActionBar only contains the interesting parts for the doc:

  • dev has access to actions prop
  • dev has access to onCancel, ... (maybe the list of methods available should be listed)

@flaviendelangle
Copy link
Member Author

@alexfauquette

What about using StatikDatePicker instead of StatikDateTimePicker for the demonstrations such that we can focus on the action bar without being distracted by the view switching between calender/clock?

Done

About the second demo, the code is maybe over complicated. What about a CustomActionBar that displays a cancel/validate buttons made with

That's a recurrent topic
How complete and powerfull should the demo be ?
If we go for a simpler demo, I would at least add a note linking to our code to help the user building a real working example on application with several pickers that might have various actions.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@mapache-salvaje
Copy link
Contributor

Maybe it would be nice to have a well written page shared by all our components (core and X) explaining the components and componentsProps instead.

This is something I've been thinking about as well (mui/material-ui#33156 (comment)) as I'm polishing up the Base docs. For those pages, I think I'm going to document the usage of components and componentsProps for each component individually. I don't want to make the dev leave the page they're on to go learn a new concept before putting this into use. And once they see this on a few pages, I think most people will start to pick up the pattern intuitively. But I do also think we need a higher-level guide explaining how these work.

@mapache-salvaje
Copy link
Contributor

Maybe it would be nice to have a well written page shared by all our components (core and X) explaining the components and componentsProps instead.

I just remembered we have this Usage page in the Base docs that explains how these props work! Another page to be considered for a "universal" MUI docs section.

flaviendelangle and others added 12 commits June 24, 2022 10:14

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
flaviendelangle and others added 3 commits June 24, 2022 10:16
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
@flaviendelangle flaviendelangle merged commit 5bc3005 into mui:master Jul 7, 2022
@flaviendelangle flaviendelangle deleted the action-bar-doc branch July 7, 2022 09:32
flaviendelangle added a commit to flaviendelangle/mui-x that referenced this pull request Jul 7, 2022
joserodolfofreitas pushed a commit to joserodolfofreitas/mui-x that referenced this pull request Jul 15, 2022
alexfauquette pushed a commit to alexfauquette/mui-x that referenced this pull request Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers 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.

None yet

4 participants