feat(ui): Profile's tab row slides back in on any scroll up, the tab's name fading under the title

FoldingTabs, as Strava's Groups (the developer's review, 9 Nov 2026):
the tab row is a floating header now, following the finger out as the
content scrolls down and back in as it scrolls up however little, wherever
the content is; before, it came back only at the top. Folded is read from
how much of the row shows. The chosen tab's name fades in and out under
the title as its room opens and closes, where it appeared at once: the
title keeps one tree folded or not, as a tree changing under it made its
switcher start over without a fade.

Whats-New: Profile's tabs slide back in as soon as you scroll up, and the tab's name fades in under the title as they go.
Whats-New-De: Die Tabs im Profil gleiten zurück, sobald du nach oben scrollst, und der Name des Tabs blendet unter dem Titel ein, wenn sie verschwinden.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-11-09 23:18:14 +01:00
commit 83c61b8d81
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -87,6 +87,55 @@ void main() {
expect(inBar('Progress'), findsNothing);
});
testWidgets('scrolled down far, a little back up brings the tabs back '
"over the content, as Strava's do (the developer's review, 9 Nov "
'2026)', (tester) async {
await show(tester);
await tester.drag(find.text('Progress 3'), const Offset(0, -1200));
await tester.pumpAndSettle();
expect(tabRowShows(tester), isFalse);
await tester.drag(find.text('Progress 22'), const Offset(0, 120));
await tester.pumpAndSettle();
expect(tabRowShows(tester), isTrue);
expect(inBar('Progress'), findsNothing);
expect(
find.text('Progress 0'),
findsNothing,
reason: 'the content stays where it was scrolled to',
);
await tester.drag(find.text('Progress 22'), const Offset(0, -200));
await tester.pumpAndSettle();
expect(tabRowShows(tester), isFalse, reason: 'and goes again down');
expect(inBar('Progress'), findsOneWidget);
});
testWidgets("the chosen tab's name fades in under the title as the tabs "
'go', (tester) async {
await show(tester);
await tester.drag(find.text('Progress 3'), const Offset(0, -400));
// The row's frame, the title's, then midway through the fade.
await tester.pump();
await tester.pump();
await tester.pump(const Duration(milliseconds: 80));
final opacity = tester
.widgetList<FadeTransition>(
find.ancestor(
of: inBar('Progress'),
matching: find.byType(FadeTransition),
),
)
.map((fade) => fade.opacity.value)
.reduce((a, b) => a * b);
expect(opacity, inExclusiveRange(0, 1));
await tester.pumpAndSettle();
expect(inBar('Progress'), findsOneWidget);
});
testWidgets('the small name follows the tab swiped to', (tester) async {
await show(tester);
await tester.drag(find.text('Progress 3'), const Offset(0, -400));