Skip to content

fix(ecs): synchronize text layout and icon property changes - #388

Merged
xiaoiver merged 1 commit into
masterfrom
codex/ecs-property-sync-coverage
Oct 9, 2026
Merged

xiaoiver merged 1 commit into
masterfrom
codex/ecs-property-sync-coverage

Conversation

@xiaoiver

@xiaoiver xiaoiver commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Text edits could change the document without updating ECS layout: enabling wordWrap, setting maxLines, or changing textOverflow left the previous rendered layout in place. Clearing font properties could retain old values or produce NaN. Synchronize these fields and their defaults, deserialize overflow/leading, and treat complete document snapshots as authoritative for text anchors.

Icon updates now recover from unresolved names, remove obsolete child stroke layers, and refresh ellipse raster placeholders when only the filter changes. Clearing a filter removes its component immediately.

Add 51 behavioral tests using the real ECS world, public edit/history APIs, explicit frames, actual text metrics, and registered SVG primitives. They compare component state, measured lines, child geometry and paint across edits, reloads, undo and redo. Only the GPU device/render systems are replaced. Add an ElementsChange coverage gate and update the incremental coverage plan.

Validation:

  • Manual acceptance: passed (confirmed by the maintainer).
  • Full ECS suite: 203 files / 1324 tests passed, all coverage gates passed (10m36s; Node 20, native canvas/gl, Xvfb).
  • Focused property/document tests: 85 passed.
  • Existing Chromium text, atlas, filter-raster and icon-resize regressions: 9 passed (2m36s).
  • Repository ESLint, browser and new-test TypeScript checks, changed-file formatting and git diff --check passed.

Coverage compared with merged PR #387, with all ECS source files still included:

Scope Lines Branches
ECS 65.99% → 66.88% 52.62% → 54.18%
ElementsChange 56.73% → 79.43% 43.60% → 64.72%
icon-font 59.00% → 68.11% 43.37% → 57.83%

These are local full-suite figures. Browser tests are not included in Jest coverage; Coveralls master updates after merge and CI. Includes an ECS patch changeset; no package release.

@xiaoiver
xiaoiver merged commit cea9800 into master Oct 9, 2026
12 of 15 checks passed
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