Skip to content

feat(structure): rebuild the Structure tab as one Definition page with an inspector - #3872

Merged
datlechin merged 9 commits into
mainfrom
feat/structure-tab-redesign
Oct 29, 2026
Merged

datlechin merged 9 commits into
mainfrom
feat/structure-tab-redesign

Conversation

@datlechin

@datlechin datlechin commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Structure view tabs are now Definition, Triggers, DDL (and Parts on ClickHouse). Definition stacks Columns, Indexes, Foreign Keys and Check Constraints on one scrolling page, each with a disclosure triangle, a count, its own table and its own + and − beneath it (HIG: square buttons go beneath their view, never in a status bar; at most six tabs).
  • The trailing inspector edits the selected definition as a typed form, each field under its name on one leading edge (checkboxes, pop-ups, a field with a value menu for Type and Default). With nothing selected it shows the table's Comment and options (character set, collation, convert, next AUTO_INCREMENT) above its statistics. The Comment bar and the Options tab are gone.
  • Yes/no fields are checkboxes in the grid, empty cells read blank, and rarely used column fields start hidden (Hide Column / Show All Columns brings them back; the choice is kept per section).
  • One StructureDefinitionEditor with one StructureSectionAdapter per section replaces the repointed grid and CreateTableGridAdapter; rows are identified by definition id, so selection survives a reload, a sort or a removal.
  • The session owns loading, rebaselining and every command; the view only draws. Weak structureActions closures and InspectorRowSource are gone.
  • Create Table uses the same page and inspector: Definition and DDL tabs, the name field and its issue list at the top, a Check Constraints section where the engine can add one, Create with Cmd+S or Cmd+Return.
  • The data grid gains a fitsRows mode (as tall as its rows, vertical scroll handed to the page).
  • Edit > Undo and Redo name the change and dim when there is nothing to undo, in Structure and Create Table.
  • File > Discard Changes… discards staged structure or data edits after asking. Preview SQL has a Save Changes button.
  • Fixed: a Primary Key edit never changed the table's key; Undo Delete dropped an edit made before the delete; refresh and the post-save reload skipped check constraints; selection moved to another definition after a reload; one failed read blanked every tab and a failed Triggers read said "No Triggers"; MySQL indexes offered a Condition the server drops; a legacy skipSchemaPreview default turned Preview SQL into Save; Preview skipped Save's validation; Create Table's foreign key menus read the sidebar's database; errors showed unlocalized change names; multi-row paste and duplicate took one undo per row; leaving Structure for Data dimmed Save while edits stayed staged; the inspector named every schema row "Column of"; Cmd+Shift+D did nothing in Structure.
  • Removed the generic schema-field path from the window inspector (FieldEditorKind.typePicker, .valuePicker, .schemaText and their views).
  • Test changed on purpose: TableCommentStatementTests.driverWithoutStatementThrows now expects the localized change name.
Before After
Before After
Before, dark After, dark

Test plan

  • New: StructureDefinitionEditorTests, StructureChangeManagerStagingTests (primary key staging, rename, delete and Undo Delete, redo), StructureSectionAdapterTests, StructureAvailabilityTests, StructureInspectorFormTests, StructureInspectorPresentationTests, CreateTableDraftCommandTests, StructureCommandRoutingTests, DataGridFittingHeightTests; the old structure suites migrated to the new API.
  • Unit plan locally: 27,264 cases, one failure from the intended update below; every suite touched after it re-run green.
  • Driven on a MariaDB 13 and a PostgreSQL 17 table in a sandboxed Debug build: Definition page, inspector for the table and for a new column, opening the inspector without moving the page, light and dark.
  • UI flows StructureSaveConfirmationUITests, TableChangeReloadUITests and SidebarAddMenuUITests updated to the new identifiers; they run on CI's UI plan.
  • Docs: docs(features): document the redesigned Structure tab docs#138.

@datlechin
datlechin merged commit 83d61b2 into main Oct 29, 2026
8 checks passed
@datlechin
datlechin deleted the feat/structure-tab-redesign branch October 29, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant