Files
pipelines/app/lib/features/search/ui/search_layout.dart
T
alan 3704d98d4d Search field in the bar, refresh and Back as bar pieces, even Cupertino actions (F8/F28/F10/F11/F20/F1)
- Search: field, compact Kind menu and syntax help in the bar's actions pill;
  bounds shown only when truncated; rows with bold title, kind tag and one
  muted line; results run behind the bar in a start-aligned 840 column.
- AppSearchField: one search field per platform (Search, Schedules, Runs filter).
- BarIconButton: whole 44pt/48dp bar actions; Runs, bell and Pipelines icons
  use the same 44pt targets on Cupertino.
- Templates and Schedules pages put Refresh in the bar and use the shared
  round SegmentedBackButton; Templates shows one Back at a time.
- PipelineBackButton is the round segmented Back.
- notes/pages-fixes.md records the batch, tests and evidence.
2026-10-31 03:31:25 +00:00

42 lines
1.4 KiB
Dart

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].
class SearchScrollView extends StatelessWidget {
const SearchScrollView({super.key, required this.slivers});
final List<Widget> slivers;
@override
Widget build(BuildContext context) {
final padding = MediaQuery.paddingOf(context);
return CustomScrollView(
slivers: [
SliverToBoxAdapter(child: SizedBox(height: padding.top + 4)),
for (final sliver in slivers)
SliverPadding(
padding: EdgeInsetsDirectional.only(
start: kSearchContentInset + padding.left,
end: kSearchContentInset + padding.right,
),
sliver: SliverConstrainedCrossAxis(
maxExtent: kSearchContentMaxWidth,
sliver: sliver,
),
),
const SliverFloatingBarClearance(),
],
);
}
}