fix(board): exclude frames from dbl-click text editor + style memory#142
Merged
Conversation
Double-clicking a frame (canvas-harness's slide container, used by presentation mode) was opening the lib's inline text editor — an invisible caret on top of the slide chrome that turned any keystrokes into junk node.content. Frames have no own text body; the dbl-click should just select. Add "frame" to the two parity-paired exclusion sets — CUSTOM_NODE_TYPES (suppresses beginEdit) and use-style-memory's EXCLUDED_TYPES (frame chrome is a fixed visual identity, shouldn't bleed styles in or out) — plus the test fixture that locks the two sets in sync.
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.
Summary
Double-clicking a frame (canvas-harness's slide container, used by presentation mode) was popping the lib's inline text editor — an invisible caret on top of the slide chrome that turned any keystrokes into junk `node.content`. Frames have no own text body; the dbl-click should just select.
The two parity-paired exclusion sets — `CUSTOM_NODE_TYPES` (the dbl-click handler at harness-canvas.tsx:227 calls `store.cancelEdit()` for any type in this set) and `EXCLUDED_TYPES` (sticky style memory) — already had every Dim0 custom def + icon + image. Frame was the missing canvas-harness built-in.
Why both sets
The parity test at custom-node-types.test.ts:47 enforces that every entry in `CUSTOM_NODE_TYPES` is also non-stylable. Beyond satisfying the test, the style-memory exclusion is independently correct: frames have a fixed visual identity (slide chrome) and should never sponge styles from neighboring shapes nor donate styles back, same reasoning as folder/sheet/icon.
Test plan