-
-
Notifications
You must be signed in to change notification settings - Fork 271
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] Make DashboardLayout navigation responsive #3750
Merged
apedroferreira
merged 30 commits into
mui:master
from
apedroferreira:dashboard-layout-responsive-nav
Jul 19, 2024
+389
−66
Merged
Changes from 9 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
739e913
Make DashboardLayout navigation responsive
apedroferreira 5657f06
Simplify
apedroferreira cb290e4
Naming adjustments
apedroferreira 0ec086f
Merge remote-tracking branch 'upstream/master' into dashboard-layout-…
apedroferreira 08df769
Fix dashboard layout tests
apedroferreira 9b6c268
Better like this
apedroferreira aaaf110
Wording
apedroferreira f88ad84
Set larger viewport dimensions for browser tests
apedroferreira 00f187f
Review improvements/fixes + center logo and title better
apedroferreira 5266f4d
Set min page content width
apedroferreira 4a8563f
Merge remote-tracking branch 'upstream/master' into dashboard-layout-…
apedroferreira 0f16640
More review feedback: make demo prop internal and make mobile breakpo…
apedroferreira ceb8cb7
Merge branch 'master' into dashboard-layout-responsive-nav
apedroferreira c18db83
Attempt to set breakpoints with theme but doesn't do anything so far...
apedroferreira b6297dc
Use theme with breakpoints in docs demos
apedroferreira a7c311e
Revert back to temporary navigation on mobile
apedroferreira eb22409
More mobile fixes
apedroferreira accb7ce
Add solution for responsive drawer in docs but needs an internal prop…
apedroferreira 296d37a
Rename prop
apedroferreira a2089c9
Add container hack to all docs examples that use DashboardLayout
apedroferreira 1b84d85
Make DashboardLayout have a public container prop instead
apedroferreira 6efc05d
Fix menu closing in nested items
apedroferreira adf49df
Revert unwanted playground changes
apedroferreira 3080479
Prettier wasn't working for some reason
apedroferreira b611de7
Merge remote-tracking branch 'upstream/master' into dashboard-layout-…
apedroferreira 53e33ce
Merge remote-tracking branch 'upstream/master' into dashboard-layout-…
apedroferreira 5ddc2aa
Just need to fix mobile sidebar color somehow
apedroferreira 056e997
Fix drawer color
apedroferreira 1c1e932
Adjustments
apedroferreira 1cc6535
Fix colors
apedroferreira 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
2 changes: 1 addition & 1 deletion
2
docs/data/toolpad/core/components/app-provider/AppProviderBasic.tsx.preview
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
2 changes: 1 addition & 1 deletion
2
docs/data/toolpad/core/components/dashboard-layout/DashboardLayoutBasic.tsx.preview
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<DashboardLayout> | ||
<DashboardLayout initialNavigationOpen> | ||
<Box | ||
sx={{ | ||
py: 4, | ||
|
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
2 changes: 1 addition & 1 deletion
2
docs/data/toolpad/core/components/dashboard-layout/DashboardLayoutBranding.tsx.preview
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<DashboardLayout> | ||
<DashboardLayout initialNavigationOpen> | ||
<Box | ||
sx={{ | ||
py: 4, | ||
|
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
2 changes: 1 addition & 1 deletion
2
docs/data/toolpad/core/components/dashboard-layout/DashboardLayoutNavigation.tsx.preview
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<DashboardLayout> | ||
<DashboardLayout initialNavigationOpen> | ||
<Box | ||
sx={{ | ||
py: 4, | ||
|
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
7 changes: 6 additions & 1 deletion
7
docs/translations/api-docs/dashboard-layout/dashboard-layout.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
{ | ||
"componentDescription": "", | ||
"propDescriptions": { "children": { "description": "The content of the dashboard." } }, | ||
"propDescriptions": { | ||
"children": { "description": "The content of the dashboard." }, | ||
"initialNavigationOpen": { | ||
"description": "Whether the mobile navigation drawer should start open." | ||
} | ||
}, | ||
"classDescriptions": {} | ||
} |
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
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.
Should this be external API? Why would users need this?
Besides, can't we, for demo purposes just force the large screen behavior. Maybe change the breakpoints or something. But in a hidden way, users shouldn't copy+paste our hacks accidentally.
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.
It should be internal API if possible, just not sure what the best way to do that is? Will try to find a solution. (edit: I guess we can just mark it as internal but it's still secretly usable?)
Also wasn't sure if it's better to have the mobile or the desktop version on the docs, so I guess we can try to use the desktop one there or change the breakpoints.