Skip to content

Conversation

@manzt
Copy link
Contributor

@manzt manzt commented Jan 7, 2026

With #7697, panels can render in two locations: the sidebar (narrow, vertical) or the developer panel (wide, horizontal). Components within panels (may) need to know their context to adapt their layout accordingly.

These changes introduce a PanelSectionContext that provides "sidebar" or "developer-panel" to child components, along with a usePanelOrientation hook that maps section to the appropriate layout direction. The scratchpad uses this mechanism to switch between vertical and horizontal panel arrangements depending on where it's rendered.

I think the other panels should be fine, but this should give us a good foundation of improving other panels if requested in the future.

Screen.Recording.2026-01-07.at.2.59.31.PM.mov

@manzt manzt requested a review from Light2Dark as a code owner January 7, 2026 19:59
@vercel
Copy link

vercel bot commented Jan 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
marimo-docs Ready Ready Preview, Comment Jan 7, 2026 8:11pm

@manzt manzt added the enhancement New feature or request label Jan 7, 2026
Base automatically changed from manzt/reorderable-panels to main January 7, 2026 20:09
@manzt manzt merged commit 0afb90f into main Jan 7, 2026
28 of 29 checks passed
@manzt manzt deleted the manzt/orientation-context branch January 7, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants