Search results and pill span the pane; lock stage page to the full detail pane

Remove the 840 px Search reading cap (results column and bar pill) so both
fill the pane at Fold and wide widths. Add a width test for the stage page
at 880 and 1400 and deep-link/query flags to the search probe entry.
This commit is contained in:
2026-10-31 22:01:28 +00:00
parent 62b56e66d0
commit 0ceafcb6d7
7 changed files with 215 additions and 38 deletions
@@ -146,18 +146,14 @@ void main() {
final barBottom = tester.getBottomLeft(find.byType(SegmentedBar)).dy;
final row = find.byKey(const ValueKey('search.result.pipeline:7'));
expect(tester.getTopLeft(row).dy, greaterThanOrEqualTo(barBottom - 8));
// Start-aligned under the bar's inset, no wider than the cap.
// The row spans the whole window between the bar's insets: no
// reading-width cap on a wide window.
final rect = tester.getRect(row);
expect(rect.left, greaterThanOrEqualTo(kSearchContentInset));
expect(rect.right, lessThanOrEqualTo(kSearchContentInset + 840));
// The search pill keeps to its own cap on a wide window.
expect(
tester.getSize(find.byKey(searchBarControlsKey)).width,
lessThanOrEqualTo(kSearchPillMaxWidth),
);
expect(rect.left, kSearchContentInset);
expect(rect.right, 1200 - kSearchContentInset);
});
for (final width in [390.0, 1200.0]) {
for (final width in [390.0, 880.0, 1200.0, 1400.0]) {
testWidgets('$host: at $width the field takes the title\'s place and '
'the results line up with it', (tester) async {
_size(tester, width);
@@ -188,16 +184,12 @@ void main() {
find.descendant(of: bar, matching: find.byType(GlassPill)),
);
expect(pill.left, kSearchContentInset);
expect(
pill.width,
width - 2 * kSearchContentInset < kSearchPillMaxWidth
? width - 2 * kSearchContentInset
: kSearchPillMaxWidth,
);
// The pill grows with the bar: the whole width between its insets.
expect(pill.width, width - 2 * kSearchContentInset);
// The field fills the pill beside Kind and the help.
final field = tester.getRect(find.byKey(searchFieldKey));
expect(field.width, greaterThan(pill.width * 0.6));
// The result column shares the pill's edges.
// The result column shares the pill's edges, so it spans the pane.
final row = tester.getRect(
find.byKey(const ValueKey('search.result.pipeline:7')),
);