Skip to content

fix(search): fix TV filter focus reversion and align mobile catalog layout - #649

Merged
ProdigyV21 merged 4 commits into
ProdigyV21:mainfrom
Himanth-reddy:fix/search-tv-filter-and-mobile-layout
Sep 5, 2026
Merged

fix(search): fix TV filter focus reversion and align mobile catalog layout#649
ProdigyV21 merged 4 commits into
ProdigyV21:mainfrom
Himanth-reddy:fix/search-tv-filter-and-mobile-layout

Conversation

@Himanth-reddy

Copy link
Copy Markdown
Collaborator

Summary

This PR addresses two search screen issues:

  1. TV Search Filter Focus & Reversion Bugs:

    • In TV mode, changing the discover filter (e.g. from "All" to "Movies") was previously broken because GlowChip had competing Compose .clickable, .focusable(), and native focus hooks where only chip 0 had a FocusRequester. On D-pad selection, native click/KeyUp on chip 0 immediately reverted selection to "All".
    • When changing filters on TV, the category reload unmounted the existing rows, causing Compose's fallback focus search to focus SearchInputBar, whose onFocused callback reset focusZone = FocusZone.SEARCH_INPUT.
    • Anchored native focus with a dedicated filtersFocusRequester on DiscoverFilterStrip's LazyRow, guarded SearchInputBar.onFocused so background Compose focus events cannot hijack the active zone away from FILTERS, and preserved the active filter selection when navigating down from the search bar.
    • Removed the behavior where pressing Left on chip 0 ("All") reset focus to the search bar (navigating to the search bar is now purely triggered by D-pad Up).
  2. Mobile Search Screen Layout Alignment with Home:

    • Removed the rigid 289.dp row container height on mobile (isTouchDevice), allowing catalog rows to wrap content naturally in a Column spaced by 20.dp on the parent LazyColumn (matching MobileHomeRowsLayer).
    • Aligned card dimensions (120.dp portrait / 200.dp landscape) and horizontal spacing (14.dp in LazyRow), matching HomeScreen.kt.
    • Removed TV-style row dimming (rowAlpha = 1f) and focus outlines on touch devices.
    • Added statusBarsPadding() and aligned horizontal insets (16dp padding) to respect device notches and display edges.

Testing

  • Verified Kotlin compilation with ./gradlew compileSideloadDebugKotlin.
  • Built universal multi-ABI debug APK (arm64-v8a, armeabi-v7a, x86, x86_64) via ./gradlew assembleSideloadDebug -PincludeX86Abis=true.
  • Verified deployment and speed compilation on Android TV.

…ayout

- Fix TV D-pad filter selection: isolate selection to D-pad modifier, remove competing focusable/click modifiers on TV GlowChips, and preserve selected filter index when navigating down from the search bar.
- Fix focus jumping to search bar on TV filter selection: anchor native focus with filtersFocusRequester and guard search bar onFocused so background category reload passes cannot hijack the active zone away from FILTERS.
- Unify mobile search screen layout with HomeScreen: remove 289dp rigid row height and replace with natural Column spacing (spacedBy 20dp), align card dimensions (120dp portrait / 200dp landscape) and horizontal spacing (14dp), disable TV row dimming and focus outlines on touch devices, and add statusBarsPadding with 16dp horizontal insets.
@github-actions github-actions Bot added the area: android Changes to the Android app or Gradle build label Sep 5, 2026
@ProdigyV21
ProdigyV21 merged commit 1e5150e into ProdigyV21:main Sep 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: android Changes to the Android app or Gradle build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants