Shell: on wide split layouts the destination tabs sit under the list pane
The four destination buttons move from the bottom right over the detail pane to the bottom of the list pane, centred in the (dragged) list width. The list now keeps the bar's height as bottom clearance; the detail pane clears only the system inset, so its tabs, the chat composer and the artifact actions sit at its bottom edge. Phone layout is unchanged. kStackedBarGap is gone with the stacked bars.
This commit is contained in:
@@ -78,23 +78,26 @@ void main() {
|
||||
for (final cupertino in [false, true]) {
|
||||
final host = cupertino ? 'Cupertino' : 'Material';
|
||||
|
||||
testWidgets('$host 1200: run tabs float above the shell bar, and the '
|
||||
'stage page opens in the pane with its tabs above it too', (
|
||||
testWidgets('$host 1200: run tabs float at the pane\'s bottom beside the '
|
||||
'shell bar under the list, and the stage page opens in the pane', (
|
||||
tester,
|
||||
) async {
|
||||
await pumpSplitRun(tester, cupertino);
|
||||
final body = tester.getRect(
|
||||
find.byKey(const ValueKey('list-detail-body')),
|
||||
);
|
||||
final list = tester.getRect(
|
||||
find.byKey(const ValueKey('list-detail-list')),
|
||||
);
|
||||
var main = shellPill(tester);
|
||||
expect(main.right, closeTo(1200 - kFloatingBarMargin, 0.5));
|
||||
expect(main.center.dx, closeTo(list.center.dx, 0.5));
|
||||
expect(main.bottom, closeTo(800 - kFloatingBarMargin, 0.5));
|
||||
|
||||
final runTabs = pillOf(tester, find.byKey(const Key('run-detail-tabs')));
|
||||
expect(runTabs.left, greaterThanOrEqualTo(body.left));
|
||||
expect(runTabs.right, closeTo(1200 - kFloatingBarMargin, 0.5));
|
||||
expect(runTabs.overlaps(main), isFalse);
|
||||
expect(main.top - runTabs.bottom, closeTo(kStackedBarGap, 0.5));
|
||||
expect(runTabs.bottom, closeTo(800 - kFloatingBarMargin, 0.5));
|
||||
|
||||
// Open the stage page from the timeline.
|
||||
await openRunDetailTab(tester, RunDetailTab.timeline);
|
||||
@@ -115,14 +118,14 @@ void main() {
|
||||
final back = tester.getRect(find.byKey(const Key('run-visit-back')));
|
||||
expect(back.left, greaterThanOrEqualTo(body.left));
|
||||
main = shellPill(tester);
|
||||
expect(main.right, closeTo(1200 - kFloatingBarMargin, 0.5));
|
||||
expect(main.center.dx, closeTo(list.center.dx, 0.5));
|
||||
final visitTabs = pillOf(
|
||||
tester,
|
||||
find.byKey(const Key('run-visit-tabs')).last,
|
||||
);
|
||||
expect(visitTabs.left, greaterThanOrEqualTo(body.left));
|
||||
expect(visitTabs.overlaps(main), isFalse);
|
||||
expect(main.top - visitTabs.bottom, closeTo(kStackedBarGap, 0.5));
|
||||
expect(visitTabs.bottom, closeTo(800 - kFloatingBarMargin, 0.5));
|
||||
expect(tester.takeException(), isNull);
|
||||
|
||||
// The shell's tabs still work over the open stage page.
|
||||
|
||||
Reference in New Issue
Block a user