P8-06: Deterministic label placement engine with collision avoidance #42

Closed
opened 2026-02-19 19:04:55 -05:00 by Rbanh · 2 comments
Owner

Goal:
Eliminate floating/overlapping labels and improve readability.

Scope:

  • Global label layout pass with priority tiers (net labels > pin labels > annotations > legend).
  • Label anchor candidates near trunks/junctions/ports.
  • Collision resolver and clamping to viewport/diagram bounds.
  • Separate layer for legend/notes with reserved region.

Acceptance:

  • No label-pin/component overlap in baseline fixtures.
  • No floating orphan labels without visible anchor context.
  • Deterministic label coordinates across runs.
Goal: Eliminate floating/overlapping labels and improve readability. Scope: - Global label layout pass with priority tiers (net labels > pin labels > annotations > legend). - Label anchor candidates near trunks/junctions/ports. - Collision resolver and clamping to viewport/diagram bounds. - Separate layer for legend/notes with reserved region. Acceptance: - No label-pin/component overlap in baseline fixtures. - No floating orphan labels without visible anchor context. - Deterministic label coordinates across runs.
Rbanh added this to the Phase 8 - React/ELK Core Refactor milestone 2026-02-19 19:05:15 -05:00
Author
Owner

Sprint 4 completed locally in commit e69f2db (push pending due DNS resolution failure from this host).

Implemented deterministic label placement improvements in src/render.js:

  • Added candidate offset search around anchor points.
  • Added label rectangle collision checks (label-vs-label).
  • Added blocked zones for legend and annotations.
  • Added blocked zones around component body rectangles.
  • Added annotation top-left overlap mitigation (legend/annotation separation).

Validation:

  • npm test pass.
  • npm run test:ui:update-baselines pass.
  • npm run test:ui pass.
  • tests/render-regression.test.js hash updated to new deterministic output.

This advances label-collision stability while preserving deterministic outputs.

Sprint 4 completed locally in commit `e69f2db` (push pending due DNS resolution failure from this host). Implemented deterministic label placement improvements in `src/render.js`: - Added candidate offset search around anchor points. - Added label rectangle collision checks (label-vs-label). - Added blocked zones for legend and annotations. - Added blocked zones around component body rectangles. - Added annotation top-left overlap mitigation (legend/annotation separation). Validation: - `npm test` pass. - `npm run test:ui:update-baselines` pass. - `npm run test:ui` pass. - `tests/render-regression.test.js` hash updated to new deterministic output. This advances label-collision stability while preserving deterministic outputs.
Author
Owner

Closing as completed. Deterministic label placement, collision handling, legend/annotation zoning, and anchored net labels shipped (notably cc20c0c, f0b952e, 1a9c7b5).

Closing as completed. Deterministic label placement, collision handling, legend/annotation zoning, and anchored net labels shipped (notably `cc20c0c`, `f0b952e`, `1a9c7b5`).
Rbanh closed this issue 2026-02-20 01:35:19 -05:00
Sign in to join this conversation.
No Label
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Rbanh/schemeta#42
No description provided.