Skip to content

Visible warning for unrecognized modifier kinds - #43

Merged
colemancda merged 2 commits into
masterfrom
feature/unknown-modifier
Jul 23, 2026
Merged

Visible warning for unrecognized modifier kinds#43
colemancda merged 2 commits into
masterfrom
feature/unknown-modifier

Conversation

@colemancda

Copy link
Copy Markdown
Member

Makes schema drift visible at the modifier level — the analog of the existing unknown-node diagnostic (which renders ⟨unknown node⟩ in red).

What changed

  • A KNOWN_MODIFIER_KINDS set enumerating every kind some consumer handles (composeModifiers folds, plus the ones read by RenderText, RenderChild's environment, RenderEffects, and container branches).
  • composeModifiers() now outlines any node carrying a kind outside that set in red, instead of silently dropping it.

Verification

  • Emulator (Appearance screen): a demo view with a custom modifier emitting an unrecognized kind (notImplementedInInterpreter) gets a thin red outline, while every neighboring example (clipShape, overlay, background, …) renders cleanly — no false positives on known kinds.

The set is the one maintenance point: a new modifier kind must be added here, or it'll self-flag on first render — which is the intended safety net.

@colemancda
colemancda merged commit 94c2038 into master Jul 23, 2026
6 checks passed
@colemancda
colemancda deleted the feature/unknown-modifier branch July 23, 2026 19:31
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