Skip to content

Animate the Sessions header on Android as the list scrolls - #33

Merged
jfversluis merged 6 commits into
simonrozsival-collapsing-sessions-headerfrom
simonrozsival-android-collapsing-header
Nov 18, 2026
Merged

jfversluis merged 6 commits into
simonrozsival-collapsing-sessions-headerfrom
simonrozsival-android-collapsing-header

Conversation

@simonrozsival

@simonrozsival simonrozsival commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Enable Android Sessions header collapse on top of the shared implementation in Animate the Sessions header on iOS as the list scrolls #32: 32 units downward hide the heading/search; 24 units upward, returning to the top, or changing filters reveal them. Day/topic controls remain pinned in unconstrained layouts.
  • Retain the 200 ms header transition, toolbar search reveal/focus, focused-search and constrained-layout expansion, viewport rebasing, and animation cancellation. Preserve Animate the Sessions header on iOS as the list scrolls #32's iOS behavior and Reduce Motion handling, plus Avoid redundant agenda projection and tab update work #31's day-tab/performance changes.
  • Settle the header when Android system animations are off: the disabled ticker reports the animation as cancelled, which previously skipped the final state (collapsed header stayed IsVisible=True at height 0; toolbar search didn't focus the field). A generation counter now applies the final state unless a newer animation superseded it, and animation is skipped when ValueAnimator.AreAnimatorsEnabled() is false.
  • After an instant (animations-off) collapse/expand, rebase scroll travel for one animation length so the resulting layout shift can't toggle the header back.
  • Insert the Android search toolbar item before the filter item and clear the native filter badge from it, so the active-filter count isn't duplicated on the search icon.
  • Expand the header when Android recreates the results list's native view (BACK at the root, then relaunching in the same process). AppShell is a singleton, so the page and its collapsed state survive while the new list starts at the top; previously the header stayed hidden and couldn't be revealed by scrolling.
  • Filter/day/search changes made on pushed pages (Android Shell unloads Sessions underneath) reveal the header on return through Animate the Sessions header on iOS as the list scrolls #32's RevealIfCriteriaChanged() reconciliation; this layer relies on that.
  • Document both mobile platforms and retain scroll-state regression tests.

Stack

main <- #31 <- #32 <- #33

This PR targets simonrozsival-collapsing-sessions-header (#32), not main. Merge in stack order. Rebased onto #32 at 9e4e13110b22a025bab36478425ff31ba054d372 (adds SessionMatchMode to the criteria snapshot); the rebase was clean, and range-diff showed only test-context changes. Head: 33a052c4dc42d8607948be9e99f4007f2630f84f.

Validation

At 33a052c, with the pinned SDK 11.0.100 and workload set 11.0.100.1:

  • Core tests: 1,431 passed. App tests: 314 passed. Local Android Debug build succeeded; CI Core tests, Android build, and iOS build all pass.
  • A second-model code review of this layer found no issues.

Android runtime checks were run on the integrated stack at 0aa8800 (debug logging) and 33a052c, on the isolated read-only Pixel AVD (emulator-5582), with animations both on and off. Results:

Check Animations off Animations on
Collapse/expand cycles (long and filtered lists) 16/16 collapses + 16/16 expansions; collapse ends IsVisible=False 16/16 + 16/16
Same-process background/resume keeps a collapsed header collapsed ✅ ✅
Filters page: unchanged criteria stay collapsed; changing a topic reveals the header on return ✅ ✅
Toolbar search reveals the header, focuses the field, and shows the keyboard ✅ ✅
Wednesday selection survives detail navigation ✅ ✅
Detail return recreates the native list; after recollapsing, toolbar order is [search, filter] ✅ ✅
Filter count badge appears only on the filter item ✅ ✅
BACK at root then relaunch in the same process: header is expanded, no stale search item ✅ ✅

Screenshots and geometry are saved in the session's files/top/ artifacts, including final-33a052-resume-before.png, final-33a052-resume-after.png, final-33a052-after-filter-return.png, final-33a052-collapsed-anim-off.png, final-33a052-search-reveal-off-native.png, and final-33a052-selected-day-touch.png. The existing emulator-5554 and attached Pixel device were left untouched; the read-only AVD was stopped after testing.

The iOS build passes, but iOS runtime behavior was not verified at this head. On a fresh simulator the native screenshot showed the .NET Conf onboarding screen, while the DevFlow agent screenshot returned a different screen; I stopped without interacting further rather than risk controlling the wrong simulator. The temporary simulator was removed.

A fresh local microbenchmark compared baseline faacb24 with integrated top 833e438, using a fixture of 80 sessions, 77 speakers, and 4 days, across two rounds. Empty-query filtering allocations fell from 40,072 to 576 B/op with a day filter and 140,736 to 576 B/op without one. CollectionUpdates.Apply on an identical list fell from about 30.1 to 0.32–0.59 µs and from 768 to 192 B/op. For the non-empty ai query, measured medians were 8.35–8.96 µs at baseline versus 12.33–16.54 µs at top, with allocations essentially unchanged (~40 KB/op). This narrow fixture-based microbenchmark supports specific allocation/no-op improvements, but does not substantiate a broad end-to-end performance claim; the non-empty query timing was inconclusive or worse.

Limitations: scroll gestures exercised native scroll events, but not finger-drag physics; large-font, rotation, and iOS runtime behavior were not rechecked at this head. Local test restore emitted a NU1900 warning because NuGet vulnerability data could not be reached; both test suites passed.

CI checks on the pushed head: Core tests, Android build, iOS build.

@jfversluis
jfversluis force-pushed the simonrozsival-android-collapsing-header branch from 3ff32d9 to dbbb000 Compare November 17, 2026 13:29
@jfversluis
jfversluis force-pushed the simonrozsival-android-collapsing-header branch from dbbb000 to 833e438 Compare November 17, 2026 14:27
@jfversluis
jfversluis changed the base branch from main to simonrozsival-collapsing-sessions-header November 17, 2026 14:29
@jfversluis
jfversluis added this pull request to stack #50 November 17, 2026 14:37
@jfversluis
jfversluis force-pushed the simonrozsival-android-collapsing-header branch from 833e438 to 07be7a0 Compare November 18, 2026 17:06
simonrozsival and others added 5 commits November 18, 2026 18:48
Collapse the headline and search while preserving day filters, and reveal search on upward scrolling or from the toolbar. Animate height, opacity, and position with safe scroll rebasing and navigation cancellation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep scroll-driven collapse and toolbar search reveal Android-only while retaining the shared header foundation for an independent main-targeted PR.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep behavioral regression coverage for collapse, reveal, focus, and viewport changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Apply the final header state whenever the current animation finishes,
including when Android's disabled ticker reports it as cancelled, so the
collapsed header hides and toolbar search focuses the field. Skip
animating entirely when Android animators are off.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jfversluis
jfversluis force-pushed the simonrozsival-android-collapsing-header branch from 07be7a0 to 0aa8800 Compare November 18, 2026 17:50
The singleton Shell keeps SessionsPage and its header state across Android
activity recreation, but the new native list starts at the top. Reset the
collapsed header when the results handler changes so it is not stuck hidden.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@jfversluis jfversluis left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed with multiple models and validated at the stack top (#33 @ 33a052c): Core 1431/1431, App 314/314, Android/iOS Debug builds, and runtime checks on iOS simulator and Android emulator (collapse/reveal, resume, filters, animations off, toolbar order). Approving as part of the #31 → #32 → #33 stack.

@jfversluis
jfversluis merged commit 1bb731e into main Nov 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants