Skip to content

Move text color from WidgetStyle into the text-bearing configs#243

Merged
jappeace merged 1 commit into
jappeace:masterfrom
jappeace-sloth:feat/text-color-in-configs
Jul 14, 2026
Merged

Move text color from WidgetStyle into the text-bearing configs#243
jappeace merged 1 commit into
jappeace:masterfrom
jappeace-sloth:feat/text-color-in-configs

Conversation

@jappeace-sloth

Copy link
Copy Markdown

Resolves #242 by the tcFontConfig precedent, as decided in the issue discussion.

  • tcTextColor / bcTextColor / tiTextColor live on the configs that own glyphs; wsTextColor is gone, so a text color on a container is unrepresentable instead of a silent no-op.
  • The renderer applies the config color on create and on config-diff updates, mirroring applyFontConfig exactly (including its stays-until-replaced behaviour, now documented on the field).
  • New coloredText smart constructor for the common case.
  • Keyframe animation of text color is removed with the field: nothing animated it (one lerp unit test, migrated to background color, which remains animatable). wsTextAlign stays in WidgetStyle deliberately: it maps to gravity, which is meaningful on containers.
  • All construction sites across src, tests and demos migrated; the exception-handler's error widget was the sneaky one (its missing field crashed the suite at runtime, exactly the class this change ends).

Full suite green, all demo mains typecheck warning-free. kbeacon-ota-tool migrates in a follow-up (its rowText becomes coloredText).

🤖 Generated with Claude Code

Resolves jappeace#242 by the tcFontConfig precedent: tcTextColor, bcTextColor
and tiTextColor live on the configs that own glyphs, wsTextColor is
gone, and a text color on a container is unrepresentable instead of a
silent no-op. The renderer applies the config color on create and on
config-diff updates, mirroring applyFontConfig (including its
stays-until-replaced behaviour, documented on the field). A new
coloredText smart constructor covers the common case.

Keyframe animation of text color is removed with the field: no demo
or consumer animated it (only a lerp unit test, migrated to
background color, which remains animatable).

All construction sites across src, tests and demos gained the new
fields; the exception-handler error widget was the sneaky one, caught
by the suite at runtime as a missing-field crash.

Prompt: okay do the tcFontConfig precedent so we never get this issue
again

Co-Authored-By: Claude Fable 5 <[email protected]>
@jappeace jappeace merged commit 2f6d627 into jappeace:master Jul 14, 2026
6 checks passed
jappeace-sloth pushed a commit to jappeace-sloth/hatter that referenced this pull request Jul 14, 2026
Review finding: run 29334286560 passed (44m17s, on jappeace#243) and was
miscited as a timeout casualty. The actual prior instance of the
build-passes-simulator-test-cancelled fingerprint is run 29281533228
on jappeace#239, alongside this PR's run 29344658446 and the historical
mid-compile timeout 9dcf105.

Co-Authored-By: Claude Fable 5 <[email protected]>
jappeace pushed a commit that referenced this pull request Jul 14, 2026
During the #243 migration a TextConfig construction missing the new
tcTextColor field compiled with only the default -Wmissing-fields
warning, which was overlooked in the build output, and crashed at
runtime inside the test suite (in errorWidget of all places). A
missing field is always a latent runtime crash, so the warning that
can be missed becomes an error that cannot.

Co-Authored-By: Claude Fable 5 <[email protected]>
jappeace pushed a commit that referenced this pull request Jul 14, 2026
Resolves #245 (needed by kbeacon-ota-tool's beacon table, whose
content-sized row cells could not align into columns):

- WidgetStyle gains wsWidth (platform-native units like wsPadding),
  applied by Render.applyStyle and lerped by keyframe animations.
- Android sets ViewGroup.LayoutParams(width, WRAP_CONTENT), the same
  pattern the gravity case already uses; iOS pins a width anchor
  constraint (replacing any earlier one on re-render); watchOS frames
  the SwiftUI node.
- The positional WidgetStyle constructions in tests are converted to
  defaultStyle record updates, so future style fields stop breaking
  every construction site (this bit twice during #243).

Prompt: just go implement this too if you need it for my request:
#245 the point of this ota
app is alos to sorta fuzz hatter for obviously missing features

Co-Authored-By: Claude Fable 5 <[email protected]>
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.

Styled text color on a container widget is silently ignored

2 participants