SIGN IN SIGN UP

feat(visualization): add Height/Color label mode toggle (#4431)

* feat(visualization): add Height/Color toggle for label mode selection

Add a DaisyUI join radio button group to the label settings panel
that lets users switch between height-based and color-based label
selection. Height mode shows labels for the tallest buildings,
Color mode shows labels filtered by color metric categories.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(visualization): add label collision resolution and color indicators

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(visualization): handle labelMode key in loadInitialFile service

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(visualization): address review findings for label mode feature

- Add missing labelMode to STATE mock (compile fix)
- Filter null/undefined metrics in color-mode label pipeline
- Skip labelMode in missing settings check for old sessions
- Add ARIA roles to Height/Color toggle buttons
- Update plan issue placeholder

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore(visualization): update package-lock.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(visualization): forbid SCSS files in features/ directory

Add dependency-cruiser rule to enforce no SCSS files in features/.
Migrate globalConfigurationButton from SCSS to Tailwind utility classes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(visualization): remove unused mat-button directive from features

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(visualization): add collision grouping toggle and grouped label stacking

Replace cascade-and-hide collision behavior with grouped stacking:
labels in collision groups show only the highest-priority winner with
a "+N more" badge. Add groupLabelCollisions setting (default: on) to
toggle this behavior — when off, labels render at natural positions
without any collision displacement.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(visualization): add labelMode and groupLabelCollisions to scenarios

After merging main's scenario migration, two label settings from
the label-mode-toggle branch were missing from scenario save/restore.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(visualization): extract LabelElement class from label services

Separate DOM/visual concerns from 3D positioning and collision logic by
extracting a LabelElement class that encapsulates DOM creation, styles,
and badge management. Shared constants moved to label.constants.ts.
Collision service no longer reaches into creation service DOM internals.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(visualization): clean up label code and fix groupLabelCollisions rerender

Remove redundant loop in clearLabels (clear() suffices), remove dead
scale() method, and add setGroupLabelCollisions to actionsRequiringRerender
so toggling it triggers an immediate rerender.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(visualization): restore previously suppressed label before switching target

If suppressLabelForNode was called for a second node before
restoreSuppressedLabel, the first suppressed label stayed hidden
permanently. Now restores the previous label first. Also removes
the unused scale() method (dead code after linter cleanup).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(visualization): add padding to tooltip-label collision detection

Labels near the tooltip now start displacing before they visually
overlap, using a 12px padding zone around the tooltip bounding rect.
This prevents labels from sitting directly under the cursor/tooltip.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(visualization): extract ConnectorDrawingService from LabelCollisionService

Separates 3D connector line rendering (WebGL geometry) from collision
detection/resolution logic, improving single responsibility adherence.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Christian Hühn <christian.huehn@maibornwolff.de>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
C
Christian Hühn committed
4d481ea1bfcbb10b0d4a8e054100857636a29018
Parent: f1d7cae
Committed by GitHub <noreply@github.com> on 3/4/2026, 3:35:22 PM