Fix recently installed card heights - #161
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 80617b50-b658-4957-b490-63650c0a4d47
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new regression test is brittle (forced newline and zero-delta float equality) and should be made more robust to avoid missing real wrap regressions and causing flaky failures.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR adjusts the “Recently installed” horizontal card row so the row height is driven by the tallest card and all cards stretch to the same height, and it adds a regression test to validate equal-height cards when titles occupy different line counts.
Changes:
- Update the recently installed row layout to measure height from the tallest card and stretch each card to match (
IntrinsicSize.Max+fillMaxHeight()). - Pass
appIconLoaderexplicitly into the recently installed item path. - Add a Robolectric Compose regression test covering mixed one-line vs two-line titles.
File summaries
| File | Description |
|---|---|
| app/src/main/java/com/anod/appwatcher/watchlist/WatchListPage.kt | Makes recently installed cards share a common (tallest) height by sizing the row intrinsically and stretching cards to fill it. |
| app/src/test/java/com/anod/appwatcher/watchlist/RecentlyInstalledCardsTest.kt | Adds a Compose UI regression test asserting equal card heights when title heights differ. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+34
to
+37
| val apps = persistentListOf( | ||
| createApp(rowId = 1, packageName = "eden", title = "Eden"), | ||
| createApp(rowId = 2, packageName = "adaptive", title = "Simply\nAdaptive App") | ||
| ) |
Comment on lines
+66
to
+69
| assertEquals(2, cardHeights.size) | ||
| assertTrue(titleHeights.last() > titleHeights.first()) | ||
| assertEquals(cardHeights.first(), cardHeights.last(), 0f) | ||
| } |
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.
Summary
Testing
.\gradlew.bat :app:testDebugUnitTest --tests "com.anod.appwatcher.watchlist.RecentlyInstalledCardsTest".\gradlew.bat :app:ktlintCheck