Skip to content

v3 Designer: fix toolbar reflow breaking Reset + editable Settings (v0.13)#81

Merged
mbreiser merged 1 commit into
mainfrom
fix/v013-toolbar-and-editable-settings
May 29, 2026
Merged

v3 Designer: fix toolbar reflow breaking Reset + editable Settings (v0.13)#81
mbreiser merged 1 commit into
mainfrom
fix/v013-toolbar-and-editable-settings

Conversation

@mbreiser
Copy link
Copy Markdown
Contributor

Fixes two issues found in manual testing.

1. Toolbar reflow broke Reset after an edit (root cause of the "Reset doesn't work" + "create-anchor then Reset both fail" reports)

The ● edited dirty badge lived in the right-aligned action-button cluster and toggled display: none → inline-block. On the first edit, it appeared and shoved Undo / Redo / Reset ~83px to the left (the cluster is right-aligned via a flex spacer). A click on Reset right after editing — e.g. right after creating an anchor — then landed on empty space.

Both Reset and create-anchor always worked; the clicks were missing the shifted-away buttons. Confirmed with real clicks via the browser extension, and measured: badge toggle shifted Reset by 83px → now 0px.

Fix: move the badge to the LEFT cluster (before the flex spacer) so the spacer absorbs its width and the action buttons never move.

2. Settings drawer made editable

  • Experiment Info (name, date_created, author, pattern_library) → editable text fields (docSet on ['experiment_info', k]; blank clears via docDelete).
  • Rig path → editable text field + a Browse… helper that fills in the picked filename while preserving the directory prefix. (Browsers can't read full filesystem paths, so the rig path is ultimately text — the picker is a convenience.)
  • Plugins stay read-only. Per the v3 spec the protocol's plugins: list is self-contained, and the rig is a separate file MATLAB loads which the web tool can't read off disk — so there's no rig→plugin inheritance available in-tool (that'd be a cross-file feature like D4).

Testing

  • npm test → 467/467 (HTML-only change; JS/tests untouched).
  • Node: docSet on experiment_info + rig round-trips through export.
  • In-browser (real clicks): edited name + rig flow into the export; Reset works after an edit (badge no longer shifts it); create-anchor binds a field to a new anchor.

Footer v0.12 → v0.13.

🤖 Generated with Claude Code

Two issues from manual testing:

1. Toolbar reflow broke Reset after an edit. The "● edited" dirty badge sat
   in the right-aligned action-button cluster and toggled display:none ->
   inline-block, shoving Undo/Redo/Reset ~83px left on the first edit. A click
   on Reset right after editing (e.g. after creating an anchor) then landed on
   empty space — the "create-anchor then Reset both don't work" report. Both
   features always worked; the clicks missed the shifted buttons. Fix: move the
   badge to the LEFT cluster (before the flex spacer) so it's absorbed by the
   spacer and never shifts the action buttons. Verified: badge toggle now
   shifts Reset by 0px (was 83px).

2. Settings drawer was read-only. Made Experiment Info (name, date_created,
   author, pattern_library) and the Rig path editable via docSet on
   ['experiment_info', k] / ['rig'] (blank info fields docDelete). Rig has a
   Browse… helper that fills the picked filename while preserving the directory
   prefix (browsers can't read full filesystem paths, so the path stays text).
   Plugins remain read-only: per the v3 spec the protocol's plugins: list is
   self-contained and the rig is a separate file MATLAB loads, which the web
   tool can't read off disk — so no rig-plugin inheritance in-tool.

Verified end-to-end in-browser (real clicks) and via Node: experiment_info +
rig edits round-trip through export. Footer v0.12 -> v0.13. npm test 467/467.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mbreiser mbreiser merged commit 245287f into main May 29, 2026
2 checks passed
@mbreiser mbreiser deleted the fix/v013-toolbar-and-editable-settings branch May 29, 2026 14:06
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