Skip to content

Re-tapping the current bottom tab does nothing, so getting back to a tab's root means backing out one page at a time #200

Closed

Description

@zhollis21

Found on 2026-11-16 while driving the app to verify #173. A few pages deep in details pages, the only way back to a tab's root is pressing Back once per page.

Problem

Tapping the bottom-bar tab you are already on does nothing. If you are ten pages deep in the Library (media → character → voice actor → media → …), you have to back out of every one to get to the list.

Observed on device 2026-11-16 with -p:CiBuild=true on the Pixel 10 Pro XL / API 37 emulator: with ONE PIECE's details page pushed on the Library tab, a real tap on the Library tab icon (adb shell input tap, not a DevFlow tap, which sets the Shell item directly and isn't a fair test) left ONE PIECE on screen. No NAVTRACE navigation was logged.

Most apps with a bottom tab bar pop the tab's stack to its root on a re-tap, and scroll to the top when it is already at the root, so users expect it.

Our code does nothing with a reselect. A search of src/ for reselect, PopToRoot, OnTabReselected and ShellItemRenderer finds nothing (checked at origin/main 14af4cd). Android Shell is rendered by the legacy ShellRenderer (src/AniSprinkles/MauiProgram.cs:74, pinned in #177), so whatever hook a fix uses has to work with that renderer, and still work if #177 later moves us back to MAUI 11's handler.

Scope

  • Every tab: Library, Discover, Search, Feed, Settings. A tab with nothing pushed has nothing to pop.
  • At the root already, a re-tap scrolls the page to the top.
  • A pop does not also scroll. Popping lands you on the root page wherever you left it scrolled, and only a second tap scrolls up (decided at kickoff).
  • No refresh on a re-tap (decided at kickoff). Pull-to-refresh stays the way to refresh, so a re-tap spends no AniList requests.
  • On the Search tab, a re-tap at the root also focuses the search box, keeping the query (decided at kickoff).

Options

Settled at kickoff: A. These are the shapes recorded while the context was fresh.

A. Handle the native reselect. Hook the bottom navigation view's item-reselected callback in the Android renderer, then PopToRootAsync on the current section's navigation, or scroll to the top when the stack is already at the root. It is the precise signal, but it is platform code on the app side of the test boundary, and it is tied to the renderer #177 pinned.

B. Detect it in Shell. Watch Shell.Navigating / Navigated for a tab change to the current item. It is cross-platform and closer to Core, but whether Shell raises anything at all for a reselect on the legacy renderer is unverified, and the on-device test above suggests it may not.

A, because both Android Shell renderers (the legacy one and MAUI 11's handler) already route a reselect to an overridable OnTabReselected(ShellSection), so B's indirect detection is not needed.

Constraint

Related

Activity

  1. added
    enhancement
    UI/UX
    p3-medium
    on Nov 17, 2026
  2. zhollis21 commented on Nov 17, 2026

    @zhollis21
    OwnerAuthor

    Kickoff notes (checked against origin/main cb87e24, MAUI 11.0.10):

    • Both Android Shell renderers already route a reselect to an empty virtual hook, OnTabReselected(ShellSection):
      • legacy (what we run, src/AniSprinkles/MauiProgram.cs:74): ShellItemRenderer.OnItemSelected calls it when the tapped item IsChecked (dotnet/maui 11.0.10, src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellItemRenderer.cs:387-389, :556).
      • MAUI 11 handler: ShellItemHandler wires TabbedViewManager.OnTabReselected to the same-named virtual, commented as matching the legacy extension point (src/Controls/src/Core/Handlers/Shell/ShellItemHandler.Android.cs:198-206, :421).
    • The legacy hook is reached through ShellRenderer.CreateShellItemRenderer(ShellItem) (protected virtual, ShellRenderer.cs:153).
    • Pushed details pages cancel their loads in OnNavigatedFrom, not OnDisappearing (src/AniSprinkles/Pages/MediaDetailsPage.xaml.cs:113-121).
    • Scroll containers on the tab roots: Library MediaListLoadedContentView CollectionView (Views/MediaListLoadedContentView.xaml:372), Discover and Settings a ScrollView inside SfPullToRefresh (Views/DiscoverLoadedContentView.xaml:15, Views/SettingsLoadedContentView.xaml:14), Search SearchResultsList (Pages/SearchPage.xaml:76). Feed is a static placeholder with nothing to scroll (Pages/FeedPage.xaml).
  3. zhollis21 commented on Nov 17, 2026

    @zhollis21
    OwnerAuthor

    Updated during planning: the two open questions are answered (a pop does not also scroll; no refresh on re-tap), a Search-tab scope line is added (a re-tap at the root also focuses the search box, keeping the query), and Options now records A as settled, because both Android Shell renderers already expose an OnTabReselected(ShellSection) hook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    UI/UXenhancementp3-medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions