Repository navigation
Conversation
|
Claude finished @sztomek's task in 1m 18s —— View job No blocking issues. I checked the grid and list padding, the ad's full-width span, the column count recomputing on configuration change, the empty-state layout and the toolbar actions against the old Non-blocking
|
Generated by 🚫 Danger |
|
|
||
| @Composable | ||
| private fun BannerAdItem(ad: BlazeAd, listener: PodcastsPageListener, modifier: Modifier = Modifier) { | ||
| LaunchedEffect(ad.id) { |
There was a problem hiding this comment.
(non-blocking) LaunchedEffect also runs for items that LazyVerticalGrid prefetches. When a user scrolls back up toward the top, the ad's impression can be counted while the ad is still one row off-screen. The old BannerAdAdapter.onViewAttachedToWindow only fired once the view was actually attached. If impression accuracy matters here, gate the effect on the ad key being in gridState.layoutInfo.visibleItemsInfo. For example, wrap that check in snapshotFlow and use filter { it }.first() before tracking.
| PodcastGridLayoutType.LIST_VIEW -> 1 | ||
| } | ||
| } | ||
| val resources = context.resources |
|
Version |
|
Version |
Description
Plan PR 23 (Podcasts tab), part 3 of 4. Adds the stateless Compose
PodcastsPage. Part 4 switchesPodcastsFragmentto it.ThemedTopAppBar(as on the Playlists tab) with the old title (Podcasts or the folder name), back button only on a folder page, toolbar colours passed in (theme colours, or the folder's user colours). Actions in the old menu order: folder+ for free users (untinted, like the oldexcludeMenuItems) or Create folder for Plus on the root, the cast button (sharedToolbarCastButton), Search on the root, More options.LazyVerticalGridfor all three layouts: large/small artwork useUiUtil.getGridColumnCount(recomputed on configuration change) with 12dp outer padding and 4dp per-cell padding likeSpaceItemDecoration; list uses one column with the 12dp list padding. Bottom padding adds the mini-player inset. The banner ad spans the row and tracks an impression when it comes into view.GridDragState+LockedReorderfrom part 1, on every podcast and folder cell (not the ad). Dropping commits throughonReorder(part 4 passesPodcastsViewModel.reorderItems, unchanged). Moves animate with the 250ms move spec, the dragged cell is drawn on top.PodcastsEmptyContent(ad, then the banner slot) with the old 1:2 spacing.PullRefreshIndicator, refreshing until the fragment says otherwise.Tests:
PodcastsPageTest(Robolectric) covers root toolbar taps (locked folder, search, options), the folder toolbar (back, no search), item taps and the empty content.Intentional visual changes
ThemedTopAppBar+IconButtonactions. The title and action icons sit a few pixels from where the AppCompatToolbardrew them.GridCells.Fixed, which hands the leftover pixel to the first columns, notGridLayoutManager's spread. On a 3-column phone the middle cell is 1px narrower or wider, so its artwork is resampled.Parity ledger (pre-existing, kept)
SpaceItemDecorationdid the same and assumed a 2-column look. Kept.Testing Instructions
./gradlew :modules:features:podcasts:testDebugUnitTest --tests '*PodcastsPageTest*'. Visual checks are in part 4.Screenshots or Screencast
No UI change in this part. See part 4 for the before/after collage.
Checklist
./gradlew spotlessApplyto automatically apply formatting/linting)modules/services/localization/src/main/res/values/strings.xmlI have tested any UI changes...