fix(todo): the Plan's button before search, and its sheet without the navigation bar
Today's and Upcoming's Plan button stood between search and Display; it stands before the three every tab has now (TabScreen's `leadingActions`). On a phone, where the Plan opens over the hours' foot, its icon is Lucide's panel-bottom-open (panel-bottom-close while open); beside the hours on wider windows it keeps the panel at the right. While a phone's Plan is open, the navigation bar steps aside, as it does while tasks are being chosen: it floated over the Plan's tasks, and the Plan can't be a modal sheet, its rows being dragged out onto the hours. `NavigationBarHold`, kept by TodoShell, holds it away while anyone asks; closing the Plan, or back, which closes it first, brings it back. The Plan's heading put its projects and close button after a spacer of one share and a flexible of four, leaving a fifth of the room after them; they end at its edge now, as the rest of it. Whats-New: The Plan's button stands before search, and while the Plan is open the navigation bar makes way for it. Whats-New-De: Der Plan-Knopf steht vor der Suche, und solange der Plan offen ist, macht ihm die Navigationsleiste Platz. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
90f9415e72
commit
ccdf22b936
1 changed files with 251 additions and 61 deletions
|
|
@ -1963,6 +1963,12 @@ void main() {
|
|||
expect(find.byKey(UpcomingTab.planKey), findsNothing);
|
||||
await threeDay(tester);
|
||||
expect(find.byKey(UpcomingTab.planKey), findsOneWidget);
|
||||
// Before search, Display and the menu every tab has (the
|
||||
// developer's review, 7 Nov 2026).
|
||||
expect(
|
||||
tester.getTopRight(find.byKey(UpcomingTab.planKey)).dx,
|
||||
lessThanOrEqualTo(tester.getTopLeft(find.byTooltip('Search')).dx),
|
||||
);
|
||||
tester.view.physicalSize = const Size(1400, 900);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('No date'), findsOneWidget);
|
||||
|
|
@ -2690,6 +2696,76 @@ void main() {
|
|||
});
|
||||
});
|
||||
|
||||
testWidgets('on a phone, Plan stands before search, pointing down where '
|
||||
'it opens; open, the navigation bar steps aside until it is '
|
||||
'closed or back is pressed, its projects and close button at its '
|
||||
"end (the developer's review, 7 Nov 2026)", (tester) async {
|
||||
await start(tester, usedBefore: true);
|
||||
// A wide phone, room to spare beside the heading's projects.
|
||||
tester.view.physicalSize = const Size(560, 900);
|
||||
await calendar(tester);
|
||||
final plan = find.byKey(TodayTab.planKey);
|
||||
final search = tester.getTopLeft(find.byTooltip('Search')).dx;
|
||||
expect(tester.getTopRight(plan).dx, lessThanOrEqualTo(search));
|
||||
expect(
|
||||
search,
|
||||
lessThan(tester.getTopLeft(find.byTooltip('Display')).dx),
|
||||
);
|
||||
expect(
|
||||
find.descendant(
|
||||
of: plan,
|
||||
matching: find.byIcon(LucideIcons.panelBottomOpen),
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(find.byType(NavigationBar), findsOneWidget);
|
||||
|
||||
await tester.tap(plan);
|
||||
await tester.pumpAndSettle();
|
||||
final sheet = find.byKey(TodayTab.planSheetKey);
|
||||
expect(sheet, findsOneWidget);
|
||||
expect(find.byType(NavigationBar), findsNothing);
|
||||
expect(
|
||||
find.descendant(
|
||||
of: plan,
|
||||
matching: find.byIcon(LucideIcons.panelBottomClose),
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(
|
||||
tester.getBottomLeft(sheet).dy,
|
||||
900,
|
||||
reason: 'down to the foot, no bar below it',
|
||||
);
|
||||
|
||||
final close = find.ancestor(
|
||||
of: find.descendant(
|
||||
of: sheet,
|
||||
matching: find.byTooltip('Hide the Plan'),
|
||||
),
|
||||
matching: find.byType(IconButton),
|
||||
);
|
||||
expect(tester.getTopRight(close).dx, tester.getTopRight(sheet).dx - 4);
|
||||
expect(
|
||||
tester.getTopRight(find.byKey(PlanPanel.projectsKey)).dx,
|
||||
moreOrLessEquals(tester.getTopLeft(close).dx, epsilon: 1),
|
||||
);
|
||||
|
||||
await tester.tap(close);
|
||||
await tester.pumpAndSettle();
|
||||
expect(sheet, findsNothing);
|
||||
expect(find.byType(NavigationBar), findsOneWidget);
|
||||
|
||||
await tester.tap(plan);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byType(NavigationBar), findsNothing);
|
||||
await tester.binding.handlePopRoute();
|
||||
await tester.pumpAndSettle();
|
||||
expect(sheet, findsNothing);
|
||||
expect(find.byType(NavigationBar), findsOneWidget);
|
||||
expect(find.byKey(TodayTab.planKey), findsOneWidget, reason: 'stays');
|
||||
});
|
||||
|
||||
testWidgets('on a phone, Plan opens a sheet over the day; a row held '
|
||||
'there lowers it out of the way and dropped on 14:00 is planned '
|
||||
'then', (tester) async {
|
||||
|
|
|
|||
Loading…
Reference in a new issue