Backoffice: Make section sidebar collapsible on mobile#23029
Conversation
|
Claude finished @engijlr's task in 5m 40s —— View job PR ReviewTarget: Adds a collapsible section sidebar on mobile: removes the 920 px minimum-width floor, puts open/closed state in
Important
Suggestions
Request ChangesThe two Important items should be addressed before merge: the missing |
| @property({ type: String, reflect: true }) position = 'var(--umb-split-panel-initial-position)'; | ||
| //TODO: Add support for negative values (relative to end of container) similar to snap points. | ||
|
|
||
| @property({ type: Boolean, reflect: true, attribute: 'sidebar-open' }) sidebarOpen = false; |
There was a problem hiding this comment.
[Suggestion] The property name sidebarOpen encodes a domain-specific concept ("sidebar") into a generic reusable component. umb-split-panel is used in many contexts beyond section navigation. A more neutral name like startPanelVisible or showStart would keep the component semantics generic and avoid coupling the core primitive to one use case.
Summary
On mobile, the section sidebar now collapses so the main content can use the full screen width. A burger button in the header lets the user open and close the sidebar.
NOTE: there is a circular dependency that I am not sure how to solve, if the reviewer can help me look at it,that would be nice
How it works
app.element.ts— removed the920pxminimum width restriction that was blocking the backoffice from loading on mobile screensA burger button (☰) appears in the header on mobile. Tapping it opens or closes the sidebar.
The open/closed state lives in the backoffice context.
The split panel shows the sidebar as an overlay on mobile, and returns to the normal side-by-side layout on desktop.
Navigating to a new page automatically closes the sidebar.
Switching back to desktop resets the sidebar state.
What changed
backoffice.context.ts— added sidebar open/close state and methodsbackoffice-header.element.ts— added burger button (mobile only)default-section.element.ts— reads the context state and passes it to the split panelsplit-panel.element.ts— replaced inline style layout with CSS attributes and custom properties, removing the need for!importantpackages/core/const/index.ts— addedUMB_MOBILE_BREAKPOINTconstant