Some checks are pending
Security / Security check (push) Waiting to run
The icon-only rail forced first-time users to guess (usertest: Senior, a11y, UX personas). Three changes: - Nav tooltips appear instantly and carry the page shortcut (Cmd+1..9, Ctrl on non-mac — Ctrl activators added); expanded labels show the same hint. Explicit button semantics for screen readers on every destination. - A visible 'Search & commands' row above the footer opens the existing Cmd+K palette, which nothing in the UI advertised. - Settings -> Appearance gains 'Keep the navigation expanded': pins the rail with permanent labels (persisted preference). Footer strip and pillar toggle made overflow-safe for the animating rail; responsive test scrolls the by-design scrollable destinations list. Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
23 lines
806 B
Dart
23 lines
806 B
Dart
// Operator preference: keep the sidebar permanently expanded so
|
|
// every destination shows its text label without hovering. Off by
|
|
// default (hover-expand rail); a11y/senior operators flip it in
|
|
// Settings → Appearance.
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
import 'package:shared_preferences/shared_preferences.dart';
|
|
|
|
class SidebarPrefs {
|
|
static const _kPinnedKey = 'sidebar.pinned';
|
|
static final ValueNotifier<bool> pinned = ValueNotifier(false);
|
|
|
|
static Future<void> load() async {
|
|
final prefs = await SharedPreferences.getInstance();
|
|
pinned.value = prefs.getBool(_kPinnedKey) ?? false;
|
|
}
|
|
|
|
static Future<void> setPinned(bool value) async {
|
|
pinned.value = value;
|
|
final prefs = await SharedPreferences.getInstance();
|
|
await prefs.setBool(_kPinnedKey, value);
|
|
}
|
|
}
|