Skip to content

feat(effects-manager): add EffectsState enum for typed visual state management#887

Open
deveshbervar wants to merge 2 commits intoHSF:mainfrom
deveshbervar:feat/effects-state-enum-886
Open

feat(effects-manager): add EffectsState enum for typed visual state management#887
deveshbervar wants to merge 2 commits intoHSF:mainfrom
deveshbervar:feat/effects-state-enum-886

Conversation

@deveshbervar
Copy link
Copy Markdown
Collaborator

Summary

Adds EffectsState enum to EffectsManager as Phase 1 (part 1 of 4)
of the refactoring proposed in #886.

What this adds

export enum EffectsState {
  DEFAULT = 'DEFAULT',
  HOVERED = 'HOVERED',
  SELECTED = 'SELECTED',
  HIGHLIGHTED = 'HIGHLIGHTED',
  DIMMED = 'DIMMED',
}

Why

The render path currently branches on implicit boolean checks
(selectedObjectsSet.size > 0, hoverOutline !== null).
Adding a new visual state — e.g. DIMMED for pileup animation
(#862) or HIGHLIGHTED for masterclass mode — currently requires
finding and updating every implicit branch manually.

This enum is the foundation for replacing those implicit checks
with typed state transitions in subsequent PRs.

Scope

This PR adds only the enum definition. No render path changes,
no shader changes, no behavior changes. All existing tests pass.

Part of #886 — Phase 1, part 1 of 4.

@sponce
Copy link
Copy Markdown
Collaborator

sponce commented Apr 21, 2026

I would avoid reformating the comments unrelated to this PR, that makes much less clear what was actually changed.

Besides that, I would not merge a PR adding an enum that is used nowhere. So I would wait for the first usage of it to introduce it. Sorry it I was not clear on that when I commented on #886

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.

2 participants