fix(todo): the + is not dragged over a day's hours, in Today's Calendar and Upcoming's 3-day

There a tap, a click or a stretch dragged says when (the developer's
review, 10 Nov 2026); Upcoming's agenda and the lists keep dragging it.

Whats-New: In Calendar and 3-day, the + button no longer drags; tap the hours instead.
Whats-New-De: In Kalender und 3 Tage lässt sich der +-Knopf nicht mehr ziehen; tippe stattdessen auf die Stunden.

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-10 01:03:25 +01:00
commit f9cd30dd5e
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -2069,6 +2069,26 @@ void main() {
expect(find.byKey(quickAddTitleKey), findsOneWidget);
});
testWidgets('its + is not dragged, the hours taking a tap '
"instead (the developer's review, 10 Nov 2026); a tap opens quick "
'add', (tester) async {
await start(tester, usedBefore: true);
await threeDay(tester);
final button = tester.getCenter(find.byType(AddTaskButton));
final gesture = await tester.startGesture(button);
for (var step = 1; step <= 5; step++) {
await gesture.moveTo(button - Offset(0, 40.0 * step));
await tester.pump();
}
expect(find.byKey(AddTaskButton.cancelKey), findsNothing);
await gesture.up();
await tester.pumpAndSettle();
await tester.tap(find.byType(AddTaskButton));
await tester.pumpAndSettle();
expect(find.byKey(quickAddTitleKey), findsOneWidget);
});
group('a stretch of time chosen by holding and dragging, as Proton '
"Calendar's (the developer's review, 10 Nov 2026)", () {
/// Presses at [from] down the [day]'s column with [kind], holds
@ -2449,6 +2469,26 @@ void main() {
await tester.pumpAndSettle();
}
testWidgets('its + is not dragged, the hours taking a tap '
"instead (the developer's review, 10 Nov 2026); a tap opens quick "
'add', (tester) async {
await start(tester, usedBefore: true);
await calendar(tester);
final button = tester.getCenter(find.byType(AddTaskButton));
final gesture = await tester.startGesture(button);
for (var step = 1; step <= 5; step++) {
await gesture.moveTo(button - Offset(0, 40.0 * step));
await tester.pump();
}
expect(find.byKey(AddTaskButton.cancelKey), findsNothing);
await gesture.up();
await tester.pumpAndSettle();
await tester.tap(find.byType(AddTaskButton));
await tester.pumpAndSettle();
expect(find.byKey(quickAddTitleKey), findsOneWidget);
});
/// Scrolls the day so that [hour] is at the top of its hours.
Future<void> showHour(WidgetTester tester, int hour) async {
tester