Skip to content

Place docked table controls on a contextual second toolbar row #26

Closed

Description

@BinaryOutlook

Stage 2 — Discoverable GUI editing

Synopsis

When table controls are docked in the top bar and general formatting is enabled, place them on a contextual second row instead of competing with ordinary text controls.

End goal

General formatting and the selected table's actions stay independently accessible, with predictable placement and responsive overflow.

Start after

Start implementation only after every prerequisite is merged into main or has a maintainer-accepted technical freeze recorded in its linked issue. A freeze must identify the exact source/prototype commit and settled contracts; an open draft PR alone is insufficient. For an investigation prerequisite, acceptance must identify the approved design/report revision and prototype commit if one exists.

Fetch current origin/main before branching. If using a freeze, record an integration base containing all required prerequisite changes and link the freeze decisions in the PR. Validate the combined result again after the final prerequisite changes are integrated. The recorded freeze governs any agreed early start while a prerequisite issue remains open.

Agreed scope

  • Use row one for general formatting/utilities and row two for docked table actions when the standard formatting interface is enabled.
  • When general formatting is disabled, allow table actions in the available primary row without reserving an empty formatting row.
  • Apply this layout to explicit top-bar placement and Automatic docking; leave explicit floating placements intact.
  • Reuse the agreed table overflow component and icon distinction.

Acceptance criteria

  • Selecting a table shows the contextual table row when docked; selecting other content or entering Source mode hides/invalidates it correctly.
  • Simple and standard modes follow the agreed one-row/two-row behavior without overlap, inaccessible actions, or permanent empty space.
  • Header height changes correctly update editor viewport bounds, floating menus, scrolling, and toolbar geometry.
  • Table actions continue to target the retained table/cell and preserve selection; view-only docking does not edit source or undo history.
  • Both rows remain keyboard-accessible and usable during live resize and sidebar changes.

Verification

  • Test all combinations of Simple/Full, Automatic/top-bar/floating placement, narrow/wide panes, and table/non-table selection.
  • Exercise open overflow/placement menus while the contextual row appears, disappears, and resizes.
  • Verify in both editor hosts and retain focused layout and table-action regressions.

Source pointers

  • src/shared/editor-body-html.js
  • src/webview/table-toolbar.js
  • src/shared/table-placement.js
  • src/webview/styles.css
  • test/specs/table-toolbar-placement.spec.ts

Delivery contract

Implement the shared editor behavior in both VS Code and Electron. View-only settings/actions must preserve Markdown, selection/editing context, clean state, and undo history. For new or changed settings, keep host wiring, manifest descriptions, all supported translations, and documentation consistent. Preserve existing identifiers and defaults except for the deliberate changes specified above.

Work from the repository root using the Node version in .node-version and the maintained instructions in CONTRIBUTING.md, docs/building.md, and docs/testing/README.md; export changes also follow docs/export-verification.md. Run full compilation after webview JavaScript/CSS, shared-module, or translation changes, plus checks that exercise the changed behavior. Rebuild and reinstall for installed-extension evidence. Report failures/skips honestly; follow required CI and review gates. Update affected documentation and review any committed Markdown in source and rendered form.

Link the PR or investigation to this issue. Keep remediation on the same focused work item where practical. Completion requires the stated evidence and accepted outcome; opening a draft PR does not complete the issue. No deadline or assignee is imposed by this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilityenhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions