Cap the list pane at 440 px beside an open item

On very wide windows (a 4K monitor) the list took 40% of the window; past
440 px the extra width now goes to the open item. Fold and laptop widths
keep the 60/40 split.
This commit is contained in:
2026-11-02 16:14:50 +00:00
parent 1f214d36bf
commit 885234e0e4
3 changed files with 36 additions and 2 deletions
+19
View File
@@ -0,0 +1,19 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/shell/list_detail.dart';
void main() {
test('the list pane stops growing at its cap on very wide windows', () {
for (final width in [1920.0, 2560.0, 3840.0]) {
expect(listDetailListWidth(width, width), kListPaneMaxWidth);
expect(listDetailBodyWidth(width, width), width - 1 - kListPaneMaxWidth);
}
});
test('narrower windows keep the 60/40 split', () {
// An open Fold and a laptop window: the list is under its cap.
for (final width in [880.0, 1100.0]) {
expect(listDetailBodyWidth(width, width), closeTo(width * 0.6, 0.01));
expect(listDetailListWidth(width, width), lessThan(kListPaneMaxWidth));
}
});
}