Skip to content

fix(timer): guarantee no dial/endet overlap and centre text in landscape#26

Merged
Xitee1 merged 1 commit into
mainfrom
fix/rotation-endet-overlap
Apr 18, 2026
Merged

fix(timer): guarantee no dial/endet overlap and centre text in landscape#26
Xitee1 merged 1 commit into
mainfrom
fix/rotation-endet-overlap

Conversation

@Xitee1
Copy link
Copy Markdown
Owner

@Xitee1 Xitee1 commented Apr 18, 2026

Summary

  • Endet slot height now matches the rotated text's axis-aligned bounding box, driven from the same animatedAngle that rotates the text — overlap is structurally impossible at every frame, including during the transition and for long localised time strings on tablets.
  • Dial size is bounded by available height minus the slot, so it shrinks on tight screens instead of letting the rotated text bleed into it.
  • In landscape, a layout offset (eased in with |sin θ|) shifts the slot centre to the midpoint between dial bottom and the button row, so the text reads as equidistant from dial and buttons instead of hugging the dial.

Test plan

  • Portrait on phone: layout unchanged — dial 360dp, endet text sits 20dp below with a small gap.
  • Tilt phone into landscape: endet text sits halfway between dial and the button row, no overlap at any point in the rotation.
  • Tablet in portrait and tilted into landscape: no overlap, text centred between dial and buttons.
  • 24h and 12h time formats (long "Ending at 12:45 PM"): still fits.
  • Flip 180° (reversed portrait): endet text sits right below the (upside-down) dial as in normal portrait.

🤖 Generated with Claude Code

Replace the scalar translationY shift with a layout-derived slot whose
height equals the rotated text's axis-aligned bounding box, driven from
the same animatedAngle that rotates the text. The dial size is now
constrained by the available height minus this slot, so the dial
shrinks when space is tight instead of letting the rotated text bleed
back into it.

In landscape, apply a layout offset that places the slot's centre at
the midpoint between dial bottom and the button row, eased in with the
rotation via |sin θ|, so the endet text no longer hugs the dial.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Xitee1 Xitee1 merged commit c4c76bf into main Apr 18, 2026
1 check passed
@Xitee1 Xitee1 deleted the fix/rotation-endet-overlap branch April 18, 2026 21:36
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