Add collapsible Schema View sidebar with shared sidebar shell#1875
Open
kmcginnes wants to merge 1 commit into
Open
Add collapsible Schema View sidebar with shared sidebar shell#1875kmcginnes wants to merge 1 commit into
kmcginnes wants to merge 1 commit into
Conversation
Add a persisted, collapsible sidebar to the Schema View (issues aws#1722, aws#1541) and extract the shared presentational shell now that a second view consumes it. Schema View: - schemaViewLayoutAtom (key "schema-view-layout") storing active tab, width, and detailsAutoOpenOnSelection - useSchemaViewSidebar deep hook (toggle, resize, close, auto-open, toggleDetailsAutoOpen) - collapse-to-icon-strip behavior; auto-open details only fires for a single selection (shouldAutoOpenDetailsForSelection), matching the graph view — a multiple/cleared selection no longer yanks the user to the empty Details state - DetailsPanelHeader and the Node/Edge Styling panels all carry the sidebar close button Shared shell: - extract CollapsibleSidebar + tab sub-components to @/components, and refactor the Graph View sidebar onto it (its second consumer); drop the now-unused CLOSED_SIDEBAR_WIDTH constant. BadgeIndicator keeps wrapping every trigger in `.stack` as before. - CollapsibleSidebar owns the closed/default width directly (no defaultWidth prop); SidebarTabs no longer takes an unused slot prop. Both sidebars share one default width (DEFAULT_SIDEBAR_WIDTH); the schema view no longer defines its own width constant. Sidebar-header buttons are uniformly size "icon-small" across both views (schema Details header plus the graph view's auto-open and refresh buttons). Auto-open: treat undefined detailsAutoOpenOnSelection as enabled, and toggle via toggleDetailsAutoOpen so the button flips state internally. All three value states are covered by tests in both views. Docs: document the schema sidebar in docs/features/schema-view.md and align "Schema Explorer" → "Schema View" wording in docs/agents/{schema,product}.md.
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.
Description
Adds a collapsible, persisted sidebar to the Schema View, matching the behavior the Graph View sidebar already has, and resolves the open auto-open question from #1541.
What users get:
schema-view-layoutIndexedDB key).The shared sidebar shell (
CollapsibleSidebar+ tab sub-components) is extracted to@/componentsnow that a second view needs it, and the Graph View sidebar is refactored onto it — so both views share one presentational implementation and one default width. As a small consistency pass that the shared shell motivates, all sidebar-header buttons now use theicon-smallsize.A prior PR (#1874) did the graph-view layout rename + hook flattening this builds on.
Validation
pnpm checkspasses (types, lint, format).pnpm testpasses. New coverage:schemaViewLayout.test.ts(toggle/close/resize/persist + all three auto-open states + toggle states),toSchemaGraphSelection.test.ts(the single-selection auto-open gate), and component-level collapse/reopen inSchemaExplorerSidebar.test.tsx.How to read
Related Issues
Check List
pnpm checkspasses with no errors.pnpm testpasses with no failures.