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:
@@ -98,7 +98,6 @@ class _SearchScreenState extends State<SearchScreen> {
|
||||
// The field takes the title's place and fills the bar.
|
||||
return ShellBar(
|
||||
titleWidget: _controls(cupertino),
|
||||
titleWidgetMaxWidth: kSearchPillMaxWidth,
|
||||
child: _body(cupertino),
|
||||
);
|
||||
}
|
||||
@@ -106,7 +105,6 @@ class _SearchScreenState extends State<SearchScreen> {
|
||||
cupertino: cupertino,
|
||||
title: 'Search',
|
||||
titleWidget: _controls(cupertino),
|
||||
titleWidgetMaxWidth: kSearchPillMaxWidth,
|
||||
);
|
||||
if (cupertino) {
|
||||
return CupertinoPageScaffold(navigationBar: bar, child: _body(cupertino));
|
||||
|
||||
@@ -4,17 +4,12 @@ import 'package:flutter/material.dart';
|
||||
import '../../../ui/input/app_search_field.dart';
|
||||
import '../../../ui/navigation/bar_icon_button.dart';
|
||||
import '../domain/search_models.dart';
|
||||
import 'search_layout.dart';
|
||||
|
||||
const searchFieldKey = ValueKey<String>('search.field');
|
||||
const searchKindKey = ValueKey<String>('search.kind');
|
||||
const searchHelpKey = ValueKey<String>('search.help');
|
||||
const searchBarControlsKey = ValueKey<String>('search.bar');
|
||||
|
||||
/// The widest the search pill grows on a wide window: the result column's
|
||||
/// width, so on a wide window the field and the results share both edges.
|
||||
const double kSearchPillMaxWidth = kSearchContentMaxWidth;
|
||||
|
||||
const searchTokenHint =
|
||||
'Filter with t:pipeline or type:artifact (pipeline, run, step, field, '
|
||||
'artifact, version). Last type wins; choosing Kind replaces it. Quote '
|
||||
@@ -46,9 +41,10 @@ class SearchBarControls extends StatelessWidget {
|
||||
final bool autofocus;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => ConstrainedBox(
|
||||
// The pill grows with the bar, so the field and the results share both
|
||||
// edges at every width.
|
||||
Widget build(BuildContext context) => KeyedSubtree(
|
||||
key: searchBarControlsKey,
|
||||
constraints: const BoxConstraints(maxWidth: kSearchPillMaxWidth),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
|
||||
@@ -2,16 +2,13 @@ import 'package:flutter/widgets.dart';
|
||||
|
||||
import '../../../ui/adaptive/floating_bar_layout.dart';
|
||||
|
||||
/// The widest the result column grows on a wide window.
|
||||
const double kSearchContentMaxWidth = 840;
|
||||
|
||||
/// The bar's own side inset, so the column starts under the title pill.
|
||||
const double kSearchContentInset = 12;
|
||||
|
||||
/// Search's scroll view: it runs behind the floating top bar (the first item
|
||||
/// starts below the bar's height, read from the media padding), ends clear of
|
||||
/// a floating tab bar, and keeps each sliver to a start-aligned column no
|
||||
/// wider than [kSearchContentMaxWidth].
|
||||
/// a floating tab bar, and spans each sliver across the whole pane between
|
||||
/// the bar's own side insets, at every width.
|
||||
class SearchScrollView extends StatelessWidget {
|
||||
const SearchScrollView({super.key, required this.slivers});
|
||||
|
||||
@@ -29,10 +26,7 @@ class SearchScrollView extends StatelessWidget {
|
||||
start: kSearchContentInset + padding.left,
|
||||
end: kSearchContentInset + padding.right,
|
||||
),
|
||||
sliver: SliverConstrainedCrossAxis(
|
||||
maxExtent: kSearchContentMaxWidth,
|
||||
sliver: sliver,
|
||||
),
|
||||
sliver: sliver,
|
||||
),
|
||||
const SliverFloatingBarClearance(),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user