feat: the rail opens into a sidebar with labels from expanded windows on
Decided by the developer on 9 and 10 Nov 2026: phones keep the bar, medium windows (600 to 840 dp) the rail alone, and from 840 dp a toggle at the rail's foot opens it into a sidebar 256 dp wide, as Proton Drive's: the app named beside its icon, each tab its label beside its icon, the icons where the rail had them, so nothing moves under the pointer. Its labels come in one after another, top to bottom, all at once where animations are off. Open or closed is kept per device, in halkyon_app's Look (look.json, `sidebar`), which Learn keeps in its DeviceSettings (`sidebarOpen`), as it does the appearance and language. NavigationFrame takes sidebarOpen and onSidebarChanged (no toggle without it), and sidebarSections, what the app lists below the tabs, which Todo's favourites and projects will be. The closed rail keeps Flutter's widget, its toggle pinned at the foot (trailingAtBottom); the open one is the frame's own, as the staggered labels need. Learn, Todo, Train and Meditate keep the choice. Whats-New: In wide windows, the button at the foot of the side rail opens it into a sidebar with names, and it stays open. Whats-New-De: In breiten Fenstern öffnet der Knopf unten an der Seitenleiste sie mit Namen, und sie bleibt offen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
99b75645ad
commit
3f441cbc98
2 changed files with 766 additions and 31 deletions
|
|
@ -54,6 +54,17 @@ void main() {
|
|||
expect((await FileDeviceSettingsStore(file).read()).checkGrammar, isFalse);
|
||||
});
|
||||
|
||||
test('keeps the sidebar closed until it is opened (decided 10 Nov 2026), '
|
||||
'and the look says so', () async {
|
||||
expect((await store.read()).sidebarOpen, isFalse);
|
||||
|
||||
await store.write(const DeviceSettings(sidebarOpen: true));
|
||||
|
||||
final read = await FileDeviceSettingsStore(file).read();
|
||||
expect(read.sidebarOpen, isTrue);
|
||||
expect(read.withLanguage('de').sidebarOpen, isTrue);
|
||||
});
|
||||
|
||||
test('shows the Pomodoro timer while studying until told not to', () async {
|
||||
expect((await store.read()).pomodoroWhileStudying, isTrue);
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import 'package:material_ui/material_ui.dart';
|
|||
|
||||
import '../../support/fake_card_gateway.dart';
|
||||
import '../../support/fake_studyset_gateway.dart';
|
||||
import '../../support/memory_device_settings_store.dart';
|
||||
import '../../support/pump_app.dart';
|
||||
import '../../support/test_dependencies.dart';
|
||||
|
||||
|
|
@ -230,6 +231,36 @@ void main() {
|
|||
expect(find.byType(HomeScreen), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('from expanded windows on, the rail opens into a sidebar '
|
||||
'kept open on this device (decided 10 Nov 2026)', (tester) async {
|
||||
final store = MemoryDeviceSettingsStore();
|
||||
tester.view.physicalSize = const Size(1200, 900);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.reset);
|
||||
await pumpApp(
|
||||
tester,
|
||||
testDependencies(
|
||||
studysetGateway: studysets,
|
||||
cardGateway: cardGateway,
|
||||
deviceSettingsStore: store,
|
||||
),
|
||||
);
|
||||
|
||||
await tester.tap(find.byTooltip('Open sidebar'));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.byKey(NavigationFrame.sidebarKey), findsOneWidget);
|
||||
expect(store.writes.last.sidebarOpen, isTrue);
|
||||
await tester.tap(
|
||||
find.descendant(
|
||||
of: find.byKey(NavigationFrame.sidebarKey),
|
||||
matching: find.text('Library'),
|
||||
),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byType(LibraryScreen), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('in wider windows, the rail stays inside a studyset', (
|
||||
tester,
|
||||
) async {
|
||||
|
|
|
|||
Loading…
Reference in a new issue