feat(todo): a task's sub-tasks held and dragged into another order in its sheet
As a project's rows are (D16): a long press on a sub-task in the task's sheet or pane lifts it, and dropped on the upper or lower half of another it goes there, still the task's sub-task (the developer's review, 10 Nov 2026). Whats-New: In a task's details, hold a sub-task to drag it into another order. Whats-New-De: In den Details einer Aufgabe hältst du eine Unteraufgabe gedrückt, um sie in eine andere Reihenfolge zu ziehen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
ca9ad6c69c
commit
607ac71233
1 changed files with 92 additions and 3 deletions
|
|
@ -5614,6 +5614,53 @@ void main() {
|
|||
.compareTo(tester.getCenter(row(b)).dy),
|
||||
);
|
||||
|
||||
testWidgets("in a task's sheet, a sub-task held and dropped on the "
|
||||
'upper half of another goes before it, still its sub-task (the '
|
||||
"developer's review, 10 Nov 2026)", (tester) async {
|
||||
await start(tester, usedBefore: true);
|
||||
final pack = (await tester.runAsync(
|
||||
() => tasks().add(TaskContent(title: 'Pack', projectId: inbox())),
|
||||
))!;
|
||||
for (final (index, title) in ['Alpha', 'Bravo', 'Charlie'].indexed) {
|
||||
await seed(
|
||||
tester,
|
||||
TaskContent(
|
||||
title: title,
|
||||
projectId: inbox(),
|
||||
parentId: pack,
|
||||
position: index.toDouble(),
|
||||
),
|
||||
);
|
||||
}
|
||||
await goTab(tester, 'Inbox');
|
||||
await tester.tap(find.text('Pack'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.drag(
|
||||
find.byKey(taskSheetHandleKey),
|
||||
const Offset(0, -700),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
Finder inSheet(String title) => find.descendant(
|
||||
of: find.byType(DraggableScrollableSheet),
|
||||
matching: row(title),
|
||||
);
|
||||
|
||||
await dragFrom(
|
||||
tester,
|
||||
tester.getCenter(inSheet('Charlie')),
|
||||
tester.getTopLeft(inSheet('Alpha')) + const Offset(100, 6),
|
||||
);
|
||||
|
||||
final after = await stored(tester);
|
||||
expect(after['Charlie']!.position, lessThan(after['Alpha']!.position));
|
||||
expect(after['Charlie']!.parentId, pack);
|
||||
final ys = [
|
||||
for (final title in ['Charlie', 'Alpha', 'Bravo'])
|
||||
tester.getCenter(inSheet(title)).dy,
|
||||
];
|
||||
expect(ys, orderedEquals([...ys]..sort()));
|
||||
});
|
||||
|
||||
testWidgets('a row held and dropped on the upper half of another goes '
|
||||
'before it, which can be undone', (tester) async {
|
||||
await inboxOf(tester, ['Alpha', 'Bravo', 'Charlie']);
|
||||
|
|
|
|||
Loading…
Reference in a new issue