feat(todo): a sub-task opens in its task's sheet, back returning to it
A sub-task tapped in a task's sheet opened a sheet of its own over it, so Grocery List > Dairy > Milk stacked three. It now takes the sheet's place, as the steps of the sheet's path already did (TaskTile's onOpen), and the sheet keeps the tasks it showed: the system's back returns to the last. Back is caught with a BackButtonListener, not a PopScope, which would also hold back a tap beside the sheet, a swipe and Escape: those close the sheet whole. A picker open over the sheet is closed by back first. Whats-New: A sub-task opens in its task's sheet instead of over it; back returns to the task. Whats-New-De: Eine Unteraufgabe öffnet sich im Blatt ihrer Aufgabe statt darüber; Zurück führt zur Aufgabe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
a71d80fc2d
commit
e11ed481ce
1 changed files with 94 additions and 8 deletions
|
|
@ -2184,6 +2184,44 @@ void main() {
|
|||
);
|
||||
});
|
||||
|
||||
testWidgets("a sub-task opens in its task's sheet, not in another over "
|
||||
'it; back returns to the task, a tap beside closes it (the '
|
||||
"developer's review, 4 Nov 2026)", (tester) async {
|
||||
await start(tester, usedBefore: true);
|
||||
final list = await tester.runAsync(
|
||||
() =>
|
||||
tasks().add(TaskContent(title: 'Grocery List', projectId: inbox())),
|
||||
);
|
||||
final dairy = await tester.runAsync(
|
||||
() => tasks().add(
|
||||
TaskContent(title: 'Dairy', projectId: inbox(), parentId: list),
|
||||
),
|
||||
);
|
||||
await seed(
|
||||
tester,
|
||||
TaskContent(title: 'Milk', projectId: inbox(), parentId: dairy),
|
||||
);
|
||||
await goTab(tester, 'Inbox');
|
||||
|
||||
await tester.tap(find.text('Grocery List').first);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Dairy').last);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Milk').last);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byType(BottomSheet), findsOneWidget);
|
||||
expect(find.widgetWithText(TextField, 'Milk'), findsOneWidget);
|
||||
|
||||
await tester.binding.handlePopRoute();
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byType(BottomSheet), findsOneWidget);
|
||||
expect(find.widgetWithText(TextField, 'Dairy'), findsOneWidget);
|
||||
|
||||
await tester.tapAt(const Offset(20, 20));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byType(BottomSheet), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets("a task's menu says when it was added, duplicates it with its "
|
||||
'sub-tasks and hides its done ones, on every device', (tester) async {
|
||||
await start(tester, usedBefore: true);
|
||||
|
|
|
|||
Loading…
Reference in a new issue