Skip to content

Add wsWidth: a fixed-width style property through all bridges#246

Merged
jappeace merged 2 commits into
jappeace:masterfrom
jappeace-sloth:feat/width-style-property
Jul 14, 2026
Merged

Add wsWidth: a fixed-width style property through all bridges#246
jappeace merged 2 commits into
jappeace:masterfrom
jappeace-sloth:feat/width-style-property

Conversation

@jappeace-sloth

Copy link
Copy Markdown

Resolves #245, driven by kbeacon-ota-tool's beacon table (content-sized Row cells cannot align into columns).

  • WidgetStyle gains wsWidth in platform-native units like wsPadding; applied by Render.applyStyle, lerped by keyframe animations (lerpStyle/interpolateStyle).
  • Android: sets ViewGroup.LayoutParams(width, WRAP_CONTENT) via the cached JNI handles, the same pattern the gravity case already uses in production.
  • iOS: pins a widthAnchor constraint, deactivating any width constraint from an earlier render first.
  • watchOS: .frame(width:) on the SwiftUI node.
  • Housekeeping: 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 Move text color from WidgetStyle into the text-bearing configs #243).

Full suite green including new width render/lerp tests. kbeacon's table adopts it in the PR #6 branch (fixed column widths) once this lands.

🤖 Generated with Claude Code

jappeace-sloth and others added 2 commits July 14, 2026 19:35
Resolves jappeace#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 jappeace#243).

Prompt: just go implement this too if you need it for my request:
jappeace#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]>
The positional-to-record conversion left the demo without the
defaultStyle import; nix-build (library + suite) stayed green while
every platform job compiling the demos failed. The demo typecheck
sweep now runs before push, which is what should have caught it.

Co-Authored-By: Claude Fable 5 <[email protected]>
@jappeace jappeace merged commit a20ad8e into jappeace:master Jul 14, 2026
6 checks passed
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.

No width/weight layout property, so table-like UIs cannot align columns

2 participants