Move text color from WidgetStyle into the text-bearing configs#243
Merged
jappeace merged 1 commit intoJul 14, 2026
Merged
Conversation
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-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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #242 by the
tcFontConfigprecedent, as decided in the issue discussion.tcTextColor/bcTextColor/tiTextColorlive on the configs that own glyphs;wsTextColoris gone, so a text color on a container is unrepresentable instead of a silent no-op.applyFontConfigexactly (including its stays-until-replaced behaviour, now documented on the field).coloredTextsmart constructor for the common case.wsTextAlignstays inWidgetStyledeliberately: it maps to gravity, which is meaningful on containers.Full suite green, all demo mains typecheck warning-free. kbeacon-ota-tool migrates in a follow-up (its
rowTextbecomescoloredText).🤖 Generated with Claude Code