3704d98d4d
- 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.
7.6 KiB
7.6 KiB
Search, Settings and page-chrome fixes (style review batch C)
Fixes from the whole-app style review (/tmp/app-style-review/report.md):
F8/F28 Search, F9 Settings, F10 refresh placement, F11 back/close, F20
Cupertino action spacing, and F1 for Search and Settings.
Shared pieces
lib/ui/input/app_search_field.dart—AppSearchField, the one search field per platform: Cupertino's stockCupertinoSearchTextField; on Material a stadiumTextField(leading search icon, clear button once there is text, no underline, no elevation). It is filled withsurfaceContainerHighon a page;inBardrops the fill (Cupertino: the grey) inside a bar's glass pill. It is used by Search, the Schedules toolbar and the Runs filter sheet. The chat search fields were left alone because chat belongs to another lane.lib/ui/navigation/bar_icon_button.dart—BarIconButton, one icon action of an actions pill. Material uses anIconButton(48dp, tooltip). Cupertino uses aCupertinoButtonwith no padding and a 44pt square minimum.busyshows the platform activity indicator in the same box.
Search (F8, F28, F1)
- The bar is the shell's title pill (Search) plus one actions pill holding
SearchBarControls(features/search/ui/search_bar_controls.dart): the field, a compact Kind menu, and an info button for the query syntax.- Kind is a filter icon while every kind is searched, and a small chip once
the search is narrowed. Material uses a
PopupMenuButtonofCheckedPopupMenuItems; Cupertino uses an action sheet. - The info button opens the syntax help in a dialog.
- As the shell's tab the screen publishes the controls through
ShellBar. Standalone, it gives them to its ownSegmentedBar. - The pill is at most 560 wide (
kSearchPillMaxWidth). SegmentedBarkeeps a 25% title share and right-aligns its actions, andlib/shellandlib/ui/adaptivewere out of scope. So the field sits beside the Search title rather than replacing it.
- Kind is a filter icon while every kind is searched, and a small chip once
the search is narrowed. Material uses a
- The bounds line (
N results · cap · scanned …) now appears only when the server truncated the answer. It is a muted note with an info icon (search_bounds_note.dart, keysearch.bounds). - Result rows: a bold title (up to 2 lines), a small kind tag at the trailing
edge (
SearchKindTag), and one muted line: recency, then the snippet (match in bold) or the kind's facts. The old bold kind line between title and metadata is gone. SearchScrollView(search_layout.dart):- There is no top
SafeArea. The scroll view reaches the top edge and starts its content below the bar's media padding. - Each sliver is start-aligned at the bar's 12px inset, at most 840 wide.
- The view ends with the floating tab bar's clearance.
- Cupertino results are one inset section filled with
systemGrey6, the same grey as the bar pills, instead of a white card framed by a grey band on the shell's white page.
- There is no top
- Keys kept:
search.field,search.kind,search.clear,search.retry,search.result.<target>. New keys:search.help,search.bar,search.bounds.
Settings (F9, F1)
Done in a separate worktree and fast-forwarded here (commit 3ec580c2).
- Flat grouped sections:
SettingsGroup/SettingsGroupItem: a Material primary header over a flatsurfaceContainergroup with dividers; CupertinoCupertinoListSection.insetGrouped.SettingsRowandSettingsStatusRowrows.- Server rows show a check mark, the address and a trailing
Use/Edit/Remove menu (key
settings.server.<id>.menu), plus an Add server row. - Templates and Schedules are chevron rows in a "Library" group.
- The ntfy rows use a
CupertinoSwitchon Cupertino. - The disabled Save workspace is a
FilledButton.tonal.
- No elevated cards:
SettingsCardwas removed. - Helper copy is shorter, and the trust warning is a section footer.
SettingsPageBody: no topSafeArea. The page pads by the bar's height, and its column is start-aligned at x=12 with a maximum width of 720.
Refresh and Back (F10, F11)
- Templates:
TemplatesFrameputs Refresh in the bar's actions pill. Standalone, it draws its ownSegmentedBar. Embedded, it publishes Back and Refresh throughShellBar.TemplatesDestinationowns aShellBarRegistry/ShellBarScopefor its page and builds its oneSegmentedBarfrom what the gallery publishes.- The round leading piece is the page Back (
templates-page-back) on the gallery and the detail Back (template-detail-back) on an open template, so there is only ever one Back. The body back row inTemplateDetailremains only with no bar above, as aSegmentedPill+SegmentedBackButton.
- Schedules:
SchedulesDestinationusesSegmentedBackButton(new keyschedules-page-back) and putsScheduleRefreshActionin the actions pill. The toolbar shows Refresh only when no bar carries it (SchedulesListView.refreshInToolbar; the standaloneSchedulesScreenstill shows it in the body). PipelineBackButtonis now the roundSegmentedPill+SegmentedBackButton(semantics "Back to pipelines" kept).
Cupertino action spacing (F20)
The Runs stats/filter/sort actions, the Needs-you bell, and the Pipelines filter and sort icons all use no padding and a 44pt square target. They are evenly spaced, and the last one no longer touches the pill's edge.
Tests
- New:
test/features/search/search_bar_layout_test.dart, on both hosts:- the controls are in the bar, with no SearchBar or dropdown
- the help is hidden until the info button is tapped
- stats show only when truncated
- rows have a kind tag and one line
- at 1200 the scroll view reaches y=0, rows start below the bar inside the 12 inset and the 840 cap, and the pill is no wider than 560
test/ui/navigation/bar_icon_button_test.dart: 44/48 targets that abut; one stadium search field with a clear button; no Material under Cupertino.
- Updated:
search_screen_test.dartandsearch_screen_states_test.dart(TextFieldinstead ofSearchBar, the Kind menu item)templates_wiring_test.dart(Refresh and the single Back are in the bar; one extra frame for the bar to hand Back back)schedules_destination_test.dart(Back and Refresh are bar pieces)- the Settings tests listed in commit
3ec580c2
Evidence
The captures are in /tmp/fix-c-evidence/.
- Setup:
- Web build of
tool/templates_wiring_probe_entry.dart(the real app with?host=cupertino). - Served by a copy of
tool/runs_probe_server.mjsin/tmp/fix-c-tools/. The copy adds fixturelist_templates/list_schedulesreplies and marks a search containing "many" as truncated. - Driven by
/tmp/fix-c-tools/shoot.mjs(headless Chrome).
- Web build of
- Files:
{m,c}-{search,settings,templates,schedules}-{560,1200}-{light,dark},{m,c}-search-560-{idle,truncated},{m,c}-runs-560-light,{m,c}-settings-560-scrolled. - The Settings worktree's own captures are
settings-app-*andsettings-probe-*.
Known gaps
- In the shell, Search and Settings content still stops below the bar: the
shell wraps each tab in a top
SafeArea(lib/shell, out of scope). Both pages already pad by the media padding, so they will run behind the bar once the shell stops consuming it. A standaloneSearchScreen(not mounted by the app, only by tests) already runs behind its own bar. - The Search field shares the bar with the Search title pill. Making it fill
the whole bar needs a
SegmentedBar/shell change. - The Cupertino Templates gallery still draws white rows in a grey band on the white page (gallery styling was not part of this batch).
- No device run: Android and iOS are unverified.