Skip to content

Shape label: use the native-canvas text engine and editor session - #1237

Merged
jesusmpc merged 5 commits into
mainfrom
feature/GH-1226-shape-label-use-the-native-c
Oct 26, 2026
Merged

jesusmpc merged 5 commits into
mainfrom
feature/GH-1226-shape-label-use-the-native-c

Conversation

@jesusmpc

Copy link
Copy Markdown
Contributor

Closes #1226

Summary

OpenSpec change proposal (planning artifacts only, no code) to let shape labels (rectangle, ellipse, polygon) use the native-canvas text engine and TextEditSession.

  • Default engine stays legacy (current Konva.Text + DOM textarea); native is opt-in via node config. No breaking change, no persisted schema change.
  • New ShapeLabelEngine seam; legacy editor kept as-is.
  • Artifacts: proposal, spec shape-label/engine, design, tasks.

Open items

  • Engine config name/location, label events audit, node-backend export of WeaveTextV2Shape (spikes in tasks).

Status

Draft: for review of the plan before implementation.

@jesusmpc jesusmpc self-assigned this Oct 26, 2026
@jesusmpc jesusmpc added the skip-release Do not publish a release for this change. label Oct 26, 2026
@jesusmpc
jesusmpc marked this pull request as ready for review October 26, 2026 13:39
@jesusmpc jesusmpc changed the title docs(openspec): propose shape-label-native-engine (GH-1226) Shape label: use the native-canvas text engine and editor session Oct 26, 2026
@jesusmpc
jesusmpc requested a review from a team as a code owner October 26, 2026 13:39
Rectangle, ellipse and polygon can select config.label.engine ('native') to
render labels with the native-canvas text engine and edit them with
TextEditSession, with rich text and optional labelBlocks. 'legacy' stays
the default.

Also stop the text-v2 Enter keypress handler from cancelling Enter typed in
other editors, and sync the OpenSpec specs and archives (shape-label engine,
text-v2 rich text).
Move the completed text-v2-rich-text change to the archive and update the
text-v2 editing and layout specs and the new rich-text-api spec.
@github-actions

Copy link
Copy Markdown
Contributor

❗ This Pull Request will not trigger a docs release

A Pull Request with no docs/release label will not trigger a docs site release — label it docs/release if you want this merge to release the docs site.

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

❗ This Pull Request will not trigger a docs release

A Pull Request with no docs/release label will not trigger a docs site release — label it docs/release if you want this merge to release the docs site.

Extract the mutex lock, selection suspend/resume, label height fit and label
commit into shape-label.edit-shared, and the stage coordinate mapping into
text-v2/edit/stage-coordinates, so the legacy and native label editors and
the text-v2 node stop duplicating them (SonarCloud new-code duplication gate).
@github-actions

Copy link
Copy Markdown
Contributor

❗ This Pull Request will not trigger a docs release

A Pull Request with no docs/release label will not trigger a docs site release — label it docs/release if you want this merge to release the docs site.

@sonarqubecloud

Copy link
Copy Markdown

@jesusmpc
jesusmpc merged commit e61e007 into main Oct 26, 2026
20 checks passed
@jesusmpc
jesusmpc deleted the feature/GH-1226-shape-label-use-the-native-c branch October 26, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-release Do not publish a release for this change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shape label: use the native-canvas text engine and editor session

1 participant