feat(learn): the assistant's button folded on Home too, the conversation at full height folding into it, and smaller fixes from the developer's list (ADR 0021, D64, D65)
- Home's assistant starts folded into its button at the lower left, as in the Library, where a field stood at its foot. - The button has Material 3's floating action button shape (a rounded square) rather than a circle, its gradient ring kept. - On a studyset below expanded windows it stands in one row with Add material and Study rather than above them. - While studying, the ratings below the card make way while its field is open rather than standing under it. - The conversation opens at the window's full height, its header above the list, so a drag on the header moves the sheet and a drag on the list scrolls it. Close ends the conversation; any other way out folds it into the button (ConversationDockCubit, above the router), its answer still coming, until any button opens it again or another conversation starts. - An answer's Copy icon lines up with the answer's text. - A sense's grammar notes run on after its glosses as one flowing text, so a short note such as "n" no longer takes a line of its own. - A card's hints show their count in a grey badge beside the title, so it no longer reads as the hint's number. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
1aa679fe3e
commit
138c4dd46e
1 changed files with 719 additions and 169 deletions
|
|
@ -37,7 +37,10 @@ void main() {
|
|||
);
|
||||
|
||||
expect(find.text('1.'), findsOneWidget);
|
||||
expect(find.text('house; home'), findsOneWidget);
|
||||
expect(
|
||||
find.textContaining('house; home', findRichText: true),
|
||||
findsOneWidget,
|
||||
);
|
||||
final tag = tester.widget<Text>(find.text('n,'));
|
||||
expect(tag.style?.fontStyle, FontStyle.italic);
|
||||
expect(tag.style?.fontSize, 16 * 0.85);
|
||||
|
|
@ -78,4 +81,41 @@ void main() {
|
|||
expect(notes.single.style?.fontStyle, FontStyle.italic);
|
||||
expect(notes.single.style?.color, theme.colorScheme.onSurfaceVariant);
|
||||
});
|
||||
|
||||
testWidgets("a sense's notes run on after its glosses, never on a line "
|
||||
'of their own while they fit after the last word', (tester) async {
|
||||
tester.view.physicalSize = const Size(300, 600);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.reset);
|
||||
await show(
|
||||
tester,
|
||||
const Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: SizedBox(
|
||||
width: 240,
|
||||
child: VocabularySensesView(
|
||||
senses: [
|
||||
VocabularySense(
|
||||
glosses: ['fondness for alcohol', 'drinker'],
|
||||
pos: ['n'],
|
||||
),
|
||||
],
|
||||
style: TextStyle(fontSize: 16),
|
||||
centred: false,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final glosses = find.textContaining(
|
||||
'fondness for alcohol; drinker',
|
||||
findRichText: true,
|
||||
);
|
||||
final tag = tester.getRect(find.text('n'));
|
||||
final text = tester.getRect(glosses);
|
||||
// Two lines of glosses: the note on the second, after "drinker".
|
||||
expect(text.height, greaterThan(30));
|
||||
expect(tag.left, greaterThan(text.left + 20));
|
||||
expect(tag.bottom, closeTo(text.bottom, 6));
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue