Skip to content

Even out the collapsed controls drawer's spacing - #913

Merged
patrickrb merged 1 commit into
devfrom
fix/controls-peek-spacing
Sep 26, 2026
Merged

patrickrb merged 1 commit into
devfrom
fix/controls-peek-spacing

Conversation

@patrickrb

@patrickrb patrickrb commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Why

The collapsed operate-controls drawer (the peek showing Call CQ + Hunt) felt off — reported as "something about margins and whitespacing".

Measuring it, the geometry was genuinely lopsided:

before after
padding above the Call CQ / Hunt row 0 dp (butted against the handle) 10 dp
padding below it (i.e. above the tab bar) 6 dp 14 dp
gap between the docked status line and the sheet's rounded top edge 0 dp 10 dp

OperateDrawerPeekHeight was a flat 120.dp that happened to land 6 dp past the bottom of the 72 dp button row, so the buttons sat jammed onto the tab bar with all the peek's whitespace stacked above them in the 42 dp handle strip.

before after
before after

What changed

  • The peek height is derived, not hard-coded: handle + top gap + the (now shared) OperatePrimaryRowHeight + bottom padding. It can no longer clip the primary row, and because the inter-row gap is larger than the bottom padding, the next row still can't peek through. Both invariants are unit-tested, so a future change to the button height or the row spacing can't silently re-break it.
  • Handle strip 42 → 36 dp, and the "More controls" hint no longer bobs. A caption drifting up and down on an infinite animation directly above fixed buttons reads as uneven spacing rather than as an affordance — the up-chevron carries the message. (Easy to revert if you liked the bob.)

Verification

  • testDebugUnitTest --tests …OperateControlsDrawerTest (13 tests, incl. 4 new geometry ones) — pass.
  • Installed on an emulator (1080x2400, xhdpi) and measured from the screenshots above: clearance under the Call CQ row 6.1 dp → 14.1 dp.

Not yet checked on real hardware — no phone was attached to this machine.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Lbd9brnZDMCzipgsu9n8Xg

The collapsed peek looked cramped and lopsided. The 120.dp peek height was a
flat constant that happened to sit 6.dp past the bottom of the 72.dp Call CQ /
Hunt row, while the row itself butted straight against the 42.dp handle strip:
0.dp of padding above the buttons, 6.dp below, and the buttons effectively
jammed onto the tab bar. The status line above had no gap either, so the
sheet's rounded top edge read as clipping it.

- Derive OperateDrawerPeekHeight from its parts (handle + top gap + the shared
  OperatePrimaryRowHeight + bottom padding) instead of hard-coding it, so the
  peek can neither clip the primary row nor reveal the row below it when any of
  those change. Row spacing is now larger than the bottom padding, which is what
  keeps the next row hidden; both invariants are unit-tested.
- 10.dp above the primary row, 14.dp below it (was 0 / 6), and a 10.dp gap
  between the docked status line and the sheet's top edge.
- Shrink the handle strip 42 -> 36.dp and stop the "More controls" hint bobbing.
  A caption drifting up and down directly above fixed buttons reads as uneven
  spacing, not as an affordance; the up-chevron already says "pulls up".

Measured on an emulator (1080x2400, xhdpi): clearance under the Call CQ row
goes from 6.1.dp to 14.1.dp.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lbd9brnZDMCzipgsu9n8Xg
@codecov

codecov Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 31.81818% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.51%. Comparing base (c603d1c) to head (083ecf4).

Files with missing lines Patch % Lines
...s3ckc/ft8af/ui/components/OperateControlsDrawer.kt 42.85% 8 Missing ⚠️
...app/src/main/kotlin/radio/ks3ckc/ft8af/FT8AFApp.kt 0.00% 5 Missing ⚠️
...kotlin/radio/ks3ckc/ft8af/ui/components/TxStrip.kt 33.33% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##                dev     #913   +/-   ##
=========================================
  Coverage     41.50%   41.51%           
  Complexity      252      252           
=========================================
  Files           280      280           
  Lines         33973    33980    +7     
  Branches       4033     4033           
=========================================
+ Hits          14100    14106    +6     
- Misses        19584    19585    +1     
  Partials        289      289           
Flag Coverage Δ
android 17.61% <31.81%> (+0.02%) ⬆️
native 9.93% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...kotlin/radio/ks3ckc/ft8af/ui/components/TxStrip.kt 5.17% <33.33%> (+0.18%) ⬆️
...app/src/main/kotlin/radio/ks3ckc/ft8af/FT8AFApp.kt 0.37% <0.00%> (-0.01%) ⬇️
...s3ckc/ft8af/ui/components/OperateControlsDrawer.kt 7.53% <42.85%> (+3.36%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@patrickrb
patrickrb merged commit 27cea16 into dev Sep 26, 2026
18 checks passed
@patrickrb
patrickrb deleted the fix/controls-peek-spacing branch September 26, 2026 16:20
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