Skip to content

Wrap TX strip controls so CQ isn't clipped in portrait#167

Merged
patrickrb merged 2 commits into
devfrom
fix/txstrip-cq-clipped-portrait
Jun 9, 2026
Merged

Wrap TX strip controls so CQ isn't clipped in portrait#167
patrickrb merged 2 commits into
devfrom
fix/txstrip-cq-clipped-portrait

Conversation

@patrickrb

Copy link
Copy Markdown
Owner

Problem

On a Pixel 8 in portrait, the CQ button was pushed off the right edge of the TX strip and couldn't be tapped (the TX1/TX2 toggle was also clipped).

The TX strip packed six controls into a single non-wrapping Row with Arrangement.SpaceBetween:

[FT4] · [14.080 MHz · 20m ▾] · [DX] · [HUNT] · [CQ] · [TX1] + the status label

Their combined intrinsic width (~445 dp, the frequency pill alone ~180 dp) exceeds the ~411 dp portrait width, so the row overflowed the right edge. The strip got tighter once the FT4 mode pill (#163) and DX/Hound toggle (#162) merged into dev — four controls became six.

Fix

Convert the strip to a FlowRow (the same @OptIn(ExperimentalLayoutApi::class) FlowRow already used in ActiveQsoPanel.kt) so overflow controls wrap onto a second line instead of running off-screen. The six pills are now direct FlowRow children, each centered within its line via Modifier.align(Alignment.CenterVertically), with 8 dp horizontal / 6 dp vertical spacing. The status text is capped to one line so a long localized label can't balloon its row.

  • Portrait: wraps to two lines — status · mode · frequency · DX / HUNT · CQ · TX.
  • Wider screens: stays a single line.
  • No control logic, colors, mutual-exclusion behavior, or callbacks changed.

Verification

Built and installed on a Pixel 8; confirmed in portrait that all six controls are visible and tappable and CQ is no longer clipped:

Before After
…[HUNT][CQ][T ← TX clipped, CQ at edge line 1: ● LISTENING FT4 14.080 MHz · 20m ▾ DX
line 2: HUNT CQ TX1

This is a declarative Compose layout change with no extractable decision/geometry logic, so there's no new unit-testable surface (the project's tests are JUnit4 + Truth logic tests; Compose layout is verified on-device per CLAUDE.md). The existing unit suite still passes (testDebugUnitTest green).

🤖 Generated with Claude Code

The TX strip packed six controls — status, mode, frequency, DX, HUNT, CQ,
and the TX-slot toggle — into a single non-wrapping Row with
SpaceBetween. On a Pixel 8 in portrait (~411 dp) their combined intrinsic
width overflowed the right edge, clipping the CQ and TX1/TX2 buttons off
screen so CQ couldn't be tapped. The row got tighter once the FT4 mode
pill (#163) and DX/Hound toggle (#162) were added.

Convert the strip to a FlowRow (matching the ExperimentalLayoutApi
FlowRow already used in ActiveQsoPanel) so overflow controls wrap onto a
second line instead of running off the edge. The six pills are now direct
FlowRow children, each centered within its line via Modifier.align, with
8.dp horizontal and 6.dp vertical spacing. In portrait this lays out as
status/mode/frequency/DX on line one and HUNT/CQ/TX on line two; on wider
screens it stays a single line. The status text is capped to one line so
a long localized label can't balloon its row.

No control logic, colors, or callbacks changed. This is a declarative
layout change with no extractable decision/geometry logic to unit-test
(the project's tests are JUnit4 + Truth logic tests; Compose layout is
verified on-device). Verified on a Pixel 8 in portrait: all six controls
visible and tappable, CQ no longer clipped. Existing unit suite still
passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 134 lines in your changes missing coverage. Please review.
✅ Project coverage is 6.56%. Comparing base (4f2e2e4) to head (71c7730).
⚠️ Report is 5 commits behind head on dev.

Files with missing lines Patch % Lines
...kotlin/radio/ks3ckc/ft8us/ui/components/TxStrip.kt 0.00% 134 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##               dev    #167      +/-   ##
==========================================
- Coverage     6.56%   6.56%   -0.01%     
  Complexity     695     695              
==========================================
  Files          272     272              
  Lines        31563   31569       +6     
  Branches      4982    4982              
==========================================
  Hits          2071    2071              
- Misses       29348   29354       +6     
  Partials       144     144              
Files with missing lines Coverage Δ
...kotlin/radio/ks3ckc/ft8us/ui/components/TxStrip.kt 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the TxStrip Compose layout to prevent TX controls (notably CQ and the TX1/TX2 toggle) from being clipped off-screen on narrow portrait devices by allowing the control “pills” to wrap onto a second line.

Changes:

  • Replaces the single non-wrapping Row layout with an ExperimentalLayoutApi FlowRow so overflow controls wrap instead of running off-screen.
  • Adds consistent horizontal/vertical spacing between items and vertically centers each item within wrapped lines.
  • Caps the status label to one line with ellipsis to avoid long localized strings expanding the layout vertically.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ft8cn/app/src/main/kotlin/radio/ks3ckc/ft8us/ui/components/TxStrip.kt Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@patrickrb patrickrb merged commit e8c6568 into dev Jun 9, 2026
4 checks passed
@patrickrb patrickrb deleted the fix/txstrip-cq-clipped-portrait branch June 9, 2026 01:28
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.

2 participants