[DashboardLayout] Fix sidebar CSS transitions for some breakpoints#4522
[DashboardLayout] Fix sidebar CSS transitions for some breakpoints#4522apedroferreira merged 8 commits intomui:masterfrom
Conversation
disable the CSS transitions only for the temporary sidebar that shows on mobile devices, but also not needed when CollapsibleSidebar is disabled. Signed-off-by: Gil Obradors <[email protected]>
|
|
||
| const hasDrawerTransitions = | ||
| isOverSmViewport && (disableCollapsibleSidebar || !isUnderMdViewport); | ||
| const hasDrawerTransitions = isOverSmViewport && !disableCollapsibleSidebar; |
There was a problem hiding this comment.
| const hasDrawerTransitions = isOverSmViewport && !disableCollapsibleSidebar; | |
| const hasDrawerTransitions = isOverSmViewport && (!disableCollapsibleSidebar || isOverMdViewport); |
Thanks a lot for your PR!
Looks like this suggestion would be the correct logic instead, as when disableCollapsibleSidebar is true, the non-persistent drawer menu shows up to the md breakpoint as opposed to just sm.
This would require replacing the isUnderMdViewport variable with isOverMdViewport and inverting all logic where isUnderMdViewport is currently being used (it's only in a couple of places).
There was a problem hiding this comment.
My first suggestion was incorrect, the new one should be good!
Sorry if it caused any confusion.
|
How hard would it be to add coverage for this in a test? Ideally we aim for adding tests when we fix bugs and especially regressions. |
Probably quite difficult here as it's related to CSS transitions, which could also mean it's not a major issue that needs to be covered by tests... |
No, don't worry in that case. Let's not waste time on it right now. |
Netlify deploy preview |
Closes #4505
Disable the CSS transitions only for the temporary sidebar that shows on mobile devices, but also not needed when CollapsibleSidebar is disabled.
Enregistrament.de.pantalla.2024-12-08.213424.mp4