fix(todo): the hours' time now no longer overlaps an hour, and run down to the bar

The hours' column labelled 22:00 and, in red, the time now 22:12 over
each other. As Todoist's (its screenshots at 21:50, 21:51, 21:55, 22:05,
22:09 and 22:10): an hour's label gives way while the time now is within
nine minutes of it, either side, wherever the line at the time now is
drawn (Today's Calendar, Upcoming's 3-day, the Inbox's 3-day), so at
21:51 to 22:09 the time now stands alone and at 21:50 and 22:10 both do
(`hourLabelShown`).

The hours left a strip as high as the add button empty below midnight,
above the floating navigation bar. They run on down to the bar now, the
day's end just above it and the hours scrolling on under it before, as
Todoist's; the add button slides away as they scroll down. Where a
phone's Plan covers their foot, they still end above it.

Whats-New: The calendar's hours no longer show an hour over the time now, and run on down to the navigation bar.
Whats-New-De: Die Stunden des Kalenders zeigen keine Stunde mehr über der aktuellen Uhrzeit und reichen bis zur Navigationsleiste.
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-07 23:03:32 +01:00
commit 6c095fab47
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -1834,6 +1834,34 @@ void main() {
await done(tester);
}
testWidgets("the hours run on down to the navigation bar, the day's "
"end just above it, as Todoist's (the developer's review, 7 Nov "
'2026)', (tester) async {
await start(tester, usedBefore: true);
await threeDay(tester);
final hours = find.descendant(
of: find.byKey(HourGrid.hoursKey),
matching: find.byType(Scrollable),
);
final position = tester.state<ScrollableState>(hours).position;
position.jumpTo(position.maxScrollExtent);
await tester.pumpAndSettle();
final today = Day.of(DateTime.now());
final bar = tester.getTopLeft(find.byType(FloatingNavigationBar)).dy;
expect(
tester.getBottomLeft(find.byKey(HourGrid.columnKey(today))).dy,
moreOrLessEquals(bar, epsilon: 1),
);
// Further up, the hours go on under the bar.
position.jumpTo(position.maxScrollExtent - 200);
await tester.pumpAndSettle();
expect(
tester.getBottomLeft(find.byKey(HourGrid.columnKey(today))).dy,
greaterThan(900 - 1),
);
});
testWidgets('the arrows stay at the left, whatever the way back to '
'today or what is overdue beside them', (tester) async {
await start(tester, usedBefore: true);