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

Customisation toolbar overlap #4111

Open
ethan1141 opened this issue Sep 18, 2024 · 4 comments
Open

Customisation toolbar overlap #4111

ethan1141 opened this issue Sep 18, 2024 · 4 comments
Assignees
Labels
bug 🐛 Something doesn't work component: layout

Comments

@ethan1141
Copy link

ethan1141 commented Sep 18, 2024

Steps to reproduce

Link to live example: (required) its not live

Steps:

  1. provider a jsx component to slots
  2. <DashboardLayout
    slots={{
    toolbarActions: Search,
    }}
    >
    3.shrink or go to mobile view - it overlaps content

Current behavior

Screenshot 2024-09-18 at 12 51 37 pm

Expected behavior

fall down below each other

Context

to add content to the right corner

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

System:
OS: macOS 13.4.1
Binaries:
Node: 21.4.0 - /opt/homebrew/bin/node
npm: 10.8.2 - /opt/homebrew/bin/npm
pnpm: Not Found
Browsers:
Chrome: 127.0.6533.120
Edge: Not Found
Safari: 16.5.2
npmPackages:
@emotion/react: ^11.13.3 => 11.13.3
@emotion/styled: ^11.13.0 => 11.13.0
@mui/base: ^5.0.0-beta.40 => 5.0.0-beta.40
@mui/core-downloads-tracker: 5.16.7
@mui/icons-material: ^6.1.0 => 6.1.0
@mui/joy: ^5.0.0-beta.48 => 5.0.0-beta.48
@mui/lab: 6.0.0-beta.9
@mui/material: ^6.1.0 => 6.1.0
@mui/private-theming: 6.1.0
@mui/styled-engine: 6.1.0
@mui/system: 6.1.0
@mui/types: 7.2.15
@mui/utils: 5.16.6
@mui/x-data-grid: ^7.16.0 => 7.16.0
@mui/x-date-pickers: ^7.15.0 => 7.15.0
@mui/x-internals: 7.16.0
@toolpad/core: ^0.6.0 => 0.6.0
@toolpad/utils: 0.6.0
@types/react: 18.3.1 => 18.3.1
react: 18.3.1 => 18.3.1
react-dom: 18.3.1 => 18.3.1
typescript: 5.4.5 => 5.4.5

Search keywords: Customisation, overlap

@ethan1141 ethan1141 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 18, 2024
@Janpot
Copy link
Member

Janpot commented Sep 18, 2024

Link to live example: (required) its not live

You can use stackblitz/codesandbox

  1. We could improve the layout to keep the title centered between the left menu button and the right actions
  2. You can always use media queries to hide content on smaller screens.
  3. Default behavior could be what you propose:

    fall down below each other

@Janpot Janpot added bug 🐛 Something doesn't work component: layout and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 18, 2024
@apedroferreira
Copy link
Member

For now my suggestion would be to show something smaller or nothing at all in smaller breakpoints as shown in the demo/example at https://mui.com/toolpad/core/react-dashboard-layout/#system-DashboardLayoutSlots.tsx

Will try to come up with a more "automatic solution" for this though if possible!

@apedroferreira
Copy link
Member

apedroferreira commented Sep 18, 2024

Another idea that might help fix this on our side: keeping the title left-aligned instead of centering it in mobile viewports.

@ethan1141
Copy link
Author

ethan1141 commented Sep 19, 2024

Screen.Recording.2024-09-19.at.1.20.23.pm.mov

i'm using a external style sheet to achieve my desired goals for the moment until there's a default option for stacking elements in the menu (see video)

@media (max-width: 600px) { div.MuiBox-root.css-1btlyma { position: relative; left: unset; -webkit-transform: unset; -moz-transform: unset; -ms-transform: unset; transform: unset; } div.css-k008qs { display: unset; } div.css-ju88wr-MuiToolbar-root { flex-wrap: wrap; } header.css-162wlvu-MuiPaper-root-MuiAppBar-root { display: contents; } div.css-jp8v2o-MuiToolbar-root { display: none; } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: layout
Projects
Status: Planned
Development

No branches or pull requests

3 participants