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

[DashboardLayout] Support collapsed mini-drawer by default #4234

Merged
merged 5 commits into from
Oct 16, 2024

Conversation

apedroferreira
Copy link
Member

@apedroferreira apedroferreira commented Oct 9, 2024

Add defaultSidebarCollapsed prop to DashboardLayout to start with mini-drawer on desktop-sized screens.
Includes test and docs demo.

Closes #4172

https://deploy-preview-4234--mui-toolpad-docs.netlify.app/toolpad/core/react-dashboard-layout/#start-with-mini-drawer-on-desktop

@apedroferreira apedroferreira added the feature: Components Button, input, table, etc. label Oct 9, 2024
@apedroferreira apedroferreira self-assigned this Oct 9, 2024
@apedroferreira apedroferreira marked this pull request as ready for review October 9, 2024 22:33
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 10, 2024
@prakhargupta1
Copy link
Member

prakhargupta1 commented Oct 16, 2024

@apedroferreira If this is close to completion can it be a part of v0.8.0? Another user requested this.
CC: @Janpot

@apedroferreira
Copy link
Member Author

@apedroferreira If this is close to completion can it be a part of v0.8.0? Another user requested this. CC: @Janpot

Just needs a review and to be rebased, so it should be possible to include it?

@apedroferreira apedroferreira requested a review from a team October 16, 2024 12:41
@apedroferreira
Copy link
Member Author

Also not sure if initialSidebarCollapsed would be a better name for the prop or not.

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

Janpot commented Oct 16, 2024

Also not sure if initialSidebarCollapsed would be a better name for the prop or not.

What do core components do?

@apedroferreira
Copy link
Member Author

apedroferreira commented Oct 16, 2024

Also not sure if initialSidebarCollapsed would be a better name for the prop or not.

What do core components do?

default seems more common, let's stick with it.

  • defaultValue in components like <TextField> or <Select>.
  • defaultChecked in <Checkbox> and <Switch> components.

There are some exceptions like initialState in the DataGrid but default seems good.

@apedroferreira apedroferreira merged commit 5827f7a into mui:master Oct 16, 2024
14 checks passed
@apedroferreira apedroferreira deleted the add-default-mini-drawer branch October 16, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: Components Button, input, table, etc.
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

[core] Support collapsed minidrawer as a default variant in the Dashboard layout
3 participants