Skip to content

feat(schema): remove detail-pane action button + ring the selected node#65

Merged
BorisTyshkevich merged 2 commits into
mainfrom
feat/schema-detail-remove-button-select-ring
Jun 28, 2026
Merged

feat(schema): remove detail-pane action button + ring the selected node#65
BorisTyshkevich merged 2 commits into
mainfrom
feat/schema-detail-remove-button-select-ring

Conversation

@BorisTyshkevich

Copy link
Copy Markdown
Collaborator

Two UX fixes for the full schema view's bottom detail pane.

1. Remove the "Insert SHOW CREATE" button

An action button felt out of place in an otherwise read-only info panel, and its label was confusing (it ran SHOW CREATE and replaced the editor with the formatted DDL — neither "insert" nor obvious). The header is now just the qualified name + kind.

No capability lost: SHOW-CREATE-into-editor is still available by shift-clicking a node in the schema tree (insertCreate keeps that caller).

2. Ring the selected node (double border)

Opening a node's detail pane now highlights which card it describes: an accent rect drawn just outside the card's box, which — with the card's own kind-coloured stroke — reads as a double border. The ring follows re-selection and is removed when the pane is closed (✕). A node without a drawn card (other-DB view, or a test harness) degrades to a no-op.

Tests

schema-detail.js stays at 100% coverage. Added tests for: the head having no action button, the ring + eg-card--selected class on open, ring placement (3px outside, behind content), re-selection moving the ring, ✕ clearing it, and the no-rect path. 1023 tests pass.

Verification

Built, deployed to antalya, opened shop.products in the full view: the header shows just shop.products · table (no button), and the products card carries an accent ring (rgb(0,121,173)) — a clear double border — matching the clicked node. Screenshot confirmed.

🤖 Generated with Claude Code

https://claude.ai/code/session_019kE9qbgBNBrfNgwg9fRsMJ

BorisTyshkevich and others added 2 commits June 28, 2026 22:30
The full-view detail pane's header carried an "Insert SHOW CREATE" button — an
action felt out of place in what is otherwise a read-only info panel (and its
label/behavior were confusing). Removed it; the head is now just the qualified
name + kind. (SHOW-CREATE-into-editor is still available via shift-click on a
node in the schema tree, so no capability is lost.)

In its place, opening a node's detail pane now rings that node's card in the
graph: an accent rect drawn just outside the box, which together with the card's
own kind-coloured stroke reads as a double border — so it's unmistakable which
object the pane describes. The ring follows re-selection and is cleared when the
pane is closed (✕). Cards in another database (or a test harness) without a drawn
card degrade to a no-op.

schema-detail.js stays at 100% coverage; tests cover the ring, re-selection,
close-clears-ring, and the no-rect/no-card paths.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019kE9qbgBNBrfNgwg9fRsMJ
…#65)

Address the medium /code-review findings on this PR:

- Esc-closing the detail pane (the schema tab + the in-app overlay handlers in
  explain-graph.js) did `pane.remove()` directly, bypassing the ✕ button's
  cleanup — leaving the accent ring + .eg-card--selected class orphaned on the
  card with no pane open. Export `clearSchemaSelection(doc)` and call it from both
  Esc paths so every close route clears the selection. (the real bug)
- Simplify clearSchemaSelection to a single scan: the ring is always a child of
  the selected card, so strip the class and remove its ring together.
- Fix two now-stale comments (schemaDetailClick + openDetailPane) that still
  referenced the removed "Insert SHOW CREATE" button / old close behavior.
- Drop the dead `insertCreate: vi.fn()` stubs from two tests (and the now-unused
  `vi` import) — the detail pane no longer calls insertCreate.

Extends the overlay Esc test to assert the ring is cleared. 1023 tests pass;
schema-detail.js stays at 100% coverage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019kE9qbgBNBrfNgwg9fRsMJ
@BorisTyshkevich BorisTyshkevich merged commit 72d15b6 into main Jun 28, 2026
6 checks passed
@BorisTyshkevich BorisTyshkevich deleted the feat/schema-detail-remove-button-select-ring branch June 28, 2026 20:54
BorisTyshkevich added a commit that referenced this pull request Jun 28, 2026
Bugfix release rolling up the schema-graph + zoom work since 0.1.3:
- #64: code-review follow-ups (schemaLayout extraction, fixedAnchor helper,
  linked-only transitive nodeCap, label-strip guard).
- #65: drop the detail-pane "Insert SHOW CREATE" button, ring the selected node
  (double border), and clear that ring on every pane-close path (incl. Esc).
No new runtime deps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019kE9qbgBNBrfNgwg9fRsMJ
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