feat(app): the bibliography at the foot of the side bar on the desktop
As on a phone's drawer: Bibliography at the end of the topics' foot, across from New sub-studyset, instead of a button above the content. One rail serves both now, the drawer and the side bar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MMm7usAo6q9ZZRoPkWjoxi Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
02efa2cdcf
commit
fc2f55046b
1 changed files with 43 additions and 34 deletions
|
|
@ -19,6 +19,7 @@ import 'package:halkyon_learn_flutter/src/feature/study/widget/study_progress.da
|
|||
import 'package:halkyon_learn_flutter/src/feature/studyset/data/studyset_payload.dart';
|
||||
import 'package:halkyon_learn_flutter/src/feature/studyset/model/studyset_content.dart';
|
||||
import 'package:halkyon_learn_flutter/src/feature/studyset/widget/studyset_breadcrumb.dart';
|
||||
import 'package:halkyon_learn_flutter/src/feature/studyset/widget/studyset_rail.dart';
|
||||
import 'package:halkyon_learn_flutter/src/feature/studyset/widget/studyset_screen.dart';
|
||||
import 'package:lucide_icons_flutter/lucide_icons.dart';
|
||||
import 'package:material_ui/material_ui.dart';
|
||||
|
|
@ -382,8 +383,10 @@ void main() {
|
|||
expect(find.byTooltip('Copy'), findsNWidgets(2));
|
||||
});
|
||||
|
||||
testWidgets('the bibliography is a button above the content, not in the '
|
||||
'app bar; on a phone at the foot of the topics', (tester) async {
|
||||
testWidgets('the bibliography is a button at the foot of the topics, not '
|
||||
'in the app bar: in the side bar, and on a phone in the drawer', (
|
||||
tester,
|
||||
) async {
|
||||
stored('japanese', 'Japanese');
|
||||
await openFromLibrary(tester, 'Japanese');
|
||||
expect(
|
||||
|
|
@ -393,7 +396,13 @@ void main() {
|
|||
),
|
||||
findsNothing,
|
||||
);
|
||||
expect(find.byTooltip('Bibliography'), findsOneWidget);
|
||||
expect(
|
||||
find.descendant(
|
||||
of: find.byType(StudysetRail),
|
||||
matching: find.byTooltip('Bibliography'),
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
|
||||
await showApp(
|
||||
tester,
|
||||
|
|
@ -412,6 +421,27 @@ void main() {
|
|||
);
|
||||
});
|
||||
|
||||
testWidgets('in the side bar, the bibliography shares the foot of the '
|
||||
'topics with New sub-studyset: that at the start, the bibliography at '
|
||||
'the end', (tester) async {
|
||||
stored('japanese', 'Japanese');
|
||||
stored('kana', 'Kana', parent: 'japanese');
|
||||
await showApp(tester, location: RoutePaths.studyset('japanese'));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
final rail = tester.getRect(find.byType(StudysetRail));
|
||||
final create = tester.getRect(
|
||||
find.ancestor(
|
||||
of: find.text('New sub-studyset'),
|
||||
matching: find.byWidgetPredicate((widget) => widget is FilledButton),
|
||||
),
|
||||
);
|
||||
final bibliography = tester.getRect(find.byTooltip('Bibliography'));
|
||||
expect(bibliography.center.dy, moreOrLessEquals(create.center.dy));
|
||||
expect(create.left, moreOrLessEquals(rail.left + 16));
|
||||
expect(bibliography.right, moreOrLessEquals(rail.right - 16));
|
||||
});
|
||||
|
||||
testWidgets('on a phone, the bibliography shares the foot of the topics '
|
||||
'with New sub-studyset: that at the start, the bibliography at the '
|
||||
'end', (tester) async {
|
||||
|
|
|
|||
Loading…
Reference in a new issue