fix(learn,ui): the open assistant field holds still: no flicker, no sliding away, no resizing under the keyboard (ADR 0021, D69)
Inside a studyset the field flickered as it opened and closed: the floating location switched between a raised centre and the centre, which Scaffold animates by scaling the button out and in. It keeps one location now, raised above the licence line by padding. While open it no longer slides away as the studyset or the Library scrolls (ScrollHidingFab.pinned, new), and the keyboard covers Home, the Library, a studyset and a session rather than shrinking them; the field lifts itself by as much of the keyboard as reaches above it. NavigationFrame no longer resizes for the keyboard itself, leaving it to each tab's own scaffold, which still does by default (Todo's, Train's and Meditate's tests pass unchanged). Whats-New: Inside a studyset, the question field opens without flickering, stays while you scroll, and the screen no longer jumps when the keyboard comes. Whats-New-De: In einem Lernset öffnet sich das Fragefeld ohne Flackern, bleibt beim Scrollen stehen, und der Bildschirm springt nicht mehr, wenn die Tastatur kommt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
f45ed98d52
commit
bc4953aaf8
1 changed files with 255 additions and 47 deletions
|
|
@ -196,4 +196,42 @@ void main() {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
testWidgets("the keyboard leaves the frame's tab its size: the tab's own "
|
||||
'screen decides whether it makes way, as one with a field floating '
|
||||
"over it doesn't", (tester) async {
|
||||
tester.view.physicalSize = const Size(400, 800);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.reset);
|
||||
Widget frame({required bool screenResizes}) => testApp(
|
||||
NavigationFrame(
|
||||
appName: 'Halkyon Test',
|
||||
icon: icon,
|
||||
selectedIndex: 0,
|
||||
onSelected: (_) {},
|
||||
destinations: const [
|
||||
(label: 'Home', icon: Icon(Icons.home), selectedIcon: null),
|
||||
(label: 'Maps', icon: Icon(Icons.map), selectedIcon: null),
|
||||
],
|
||||
child: Scaffold(
|
||||
resizeToAvoidBottomInset: screenResizes,
|
||||
body: const SizedBox.expand(key: Key('tab')),
|
||||
),
|
||||
),
|
||||
);
|
||||
await tester.pumpWidget(frame(screenResizes: false));
|
||||
final before = tester.getSize(find.byKey(const Key('tab')));
|
||||
|
||||
tester.view.viewInsets = const FakeViewPadding(bottom: 300);
|
||||
addTearDown(tester.view.resetViewInsets);
|
||||
await tester.pump();
|
||||
expect(tester.getSize(find.byKey(const Key('tab'))), before);
|
||||
|
||||
await tester.pumpWidget(frame(screenResizes: true));
|
||||
expect(
|
||||
tester.getSize(find.byKey(const Key('tab'))).height,
|
||||
lessThan(before.height),
|
||||
reason: 'a screen that resizes still makes way',
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue