feat(editor): consolidate left panels into one tabbed Explorer panel#128
Merged
Conversation
Collapse the separate left-rail navigation panels into a single "Explorer" rail button backed by a tabbed `ExplorerPanel` (Layers / Site / Code / Media), mirroring the Framework panel consolidation. Default tab is Layers; the active tab persists per-workspace. Panel: - New `ExplorerPanel` owns the shell (header + SegmentedControl tabs + close); each tab renders DomPanel / SiteExplorerPanel / MediaExplorerPanel in a headerless `tab` variant (new `Panel headerless` prop). - DomPanel is now tab-only: removed the dead floating/docked machinery (useDraggablePanel, PanelHeader, collapse toggle, width persistence) and the backing `domTreePanel` store state + `setDomTreePanel`/ `toggleDomTreePanel` actions and the `instatic-dom-panel` storage key. - SiteExplorerPanel and MediaExplorerPanel render chrome-free as tab bodies. Tabs: - **Layers** → DomPanel (current page's DOM tree). The search row gains an Insert-module button reusing the shared `ModuleInserterDialog` + `useInsertInserterItem` (same target resolution as the canvas `+`). - **Site** → SiteExplorerPanel `sectionGroup="site"` — Pages, Templates, Components (renderable site structure). "New component" uses the same `+` icon as New page / New template. - **Code** → the SAME SiteExplorerPanel instance with `sectionGroup="code"` — Styles + Scripts (source files). One shared mount so Site/Code share one DnD scope + selection; two instances would double-handle every drag. - **Media** → MediaExplorerPanel. Drops the "Other" bucket (images/videos only), defaults to grid view, shows "EXT · size" per item instead of the URL, 16:9 tile preview, softer `--bg-surface-2` tile hover. Rail: - One `explorer` rail item (DatabaseSolidIcon, `gold` accent — carried over from the standalone Layers button) instead of three. Store: `explorerPanelOpen` + `explorerPanelTab` replace the per-panel open flags. Misc: - Code editor floats above the docked sidebars (z-index 80→95) so it no longer hides behind the Explorer panel. - Spotlight panel commands open the Explorer panel on the matching tab. - Removed the unused `workspace`/`pagesPanel` plumbing that anticipated Content-page reuse (Content has its own ContentSidebar). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Collapses the separate left-rail navigation panels (Layers, Site, Media) into a single Explorer rail button backed by a tabbed
ExplorerPanel— Layers / Site / Code / Media — mirroring the earlier Framework-panel consolidation.Panel
ExplorerPanelowns the shell (header +SegmentedControltabs + close); each tab renders its panel in a headerlesstabvariant (newPanel headerlessprop).DomPanelis now tab-only — removed the dead floating/docked machinery (useDraggablePanel,PanelHeader, collapse toggle, width persistence) and the backingdomTreePanelstore state,setDomTreePanel/toggleDomTreePanelactions, and theinstatic-dom-panelstorage key.SiteExplorerPanel/MediaExplorerPanelrender chrome-free as tab bodies.Tabs
DomPanel. The search row gains an Insert module button reusing the sharedModuleInserterDialog+useInsertInserterItem(identical target resolution to the canvas+/ toolbar+ Add).SiteExplorerPanelsectionGroup="site"— Pages, Templates, Components. "New component" now uses the same+icon as New page / New template.SiteExplorerPanelinstance withsectionGroup="code"— Styles + Scripts. One shared mount so Site/Code share one DnD scope + selection (two instances would each registeruseDndMonitorand double-handle every drag).MediaExplorerPanel— drops the "Other" bucket (images/videos only), defaults to grid view, showsEXT · sizeper item instead of the URL, 16:9 tile preview, softer--bg-surface-2tile hover.Rail / store
explorerrail item (DatabaseSolidIcon,goldaccent — both carried over from the standalone Layers button) instead of three.explorerPanelOpen+explorerPanelTabreplace the per-panel open flags.Misc
workspace/pagesPanelplumbing that anticipated Content-page reuse (Content has its ownContentSidebar).Why
Three near-identical navigation panels each consumed a rail slot; consolidating them into one tabbed panel matches the Framework-panel pattern, frees rail space, and lets the always-reserved chrome live in one shell. Splitting source files (Styles/Scripts) out of the mislabeled "Pages" tab into a dedicated Code tab clarifies the taxonomy (renderable structure vs. raw source).
Impact
explorerPanelTab: 'pages'falls back to the default (layers).Verification
bun run build✓bun run lint✓bun test→ 5817 pass; the single failure (OnboardingPanel framework import) is pre-existing onmain, unrelated to this change.🤖 Generated with Claude Code