Wrap TX strip controls so CQ isn't clipped in portrait#167
Merged
Conversation
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 Report❌ Patch coverage is
Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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
Rowlayout with anExperimentalLayoutApiFlowRowso 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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
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
RowwithArrangement.SpaceBetween:[FT4] · [14.080 MHz · 20m ▾] · [DX] · [HUNT] · [CQ] · [TX1]+ the status labelTheir 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)FlowRowalready used inActiveQsoPanel.kt) so overflow controls wrap onto a second line instead of running off-screen. The six pills are now directFlowRowchildren, each centered within its line viaModifier.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.status · mode · frequency · DX/HUNT · CQ · TX.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:
…[HUNT][CQ][T← TX clipped, CQ at edge● LISTENING FT4 14.080 MHz · 20m ▾ DXline 2:
HUNT CQ TX1This 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 (
testDebugUnitTestgreen).🤖 Generated with Claude Code