Show shared resize grips on list pane dividers

This commit is contained in:
2026-11-08 14:50:07 +00:00
parent 4f51470202
commit e1da589396
6 changed files with 53 additions and 27 deletions
+22
View File
@@ -10,6 +10,7 @@ import 'package:pipelines_app/shell/list_detail.dart';
import 'package:pipelines_app/shell/list_pane_divider.dart';
import 'package:pipelines_app/shell/list_pane_widths.dart';
import 'package:pipelines_app/shell/shell_bar.dart';
import 'package:pipelines_app/ui/adaptive/resize_grip.dart';
/// Dragging the divider between a list and its open item resizes the list,
/// within bounds, per destination, remembered on this device.
@@ -209,6 +210,27 @@ void main() {
expect(listWidth(tester), kListPaneMaxWidth);
semantics.dispose();
});
testWidgets('$host: the native resize grip is visible at rest and gains '
'emphasis on focus', (tester) async {
await setSize(tester, const Size(1200, 800));
await tester.pumpWidget(
shell(cupertino: cupertino, store: MemoryListPaneWidthStore()),
);
await settle(tester);
AdaptiveResizeGrip grip() => tester.widget<AdaptiveResizeGrip>(
find.descendant(
of: find.byType(ListPaneDivider),
matching: find.byType(AdaptiveResizeGrip),
),
);
expect(grip().emphasized, isFalse);
Focus.of(tester.element(divider)).requestFocus();
await tester.pump();
expect(grip().emphasized, isTrue);
});
}
test('bounds: list at least 240, open item at least half the window', () {