c6c6dcfe18
- Top-bar clearance helpers (withTopBarClearance, withBarClearance, SliverTopBarClearance, BelowTopBar, TopBarNotices); shell, DetailPane and the runs/pipelines/templates/artifacts/stage definition/filter/usage pages drop their top SafeArea and pad their own lists, pinned headers pin at the inset. - Wide windows: the shell bar narrows to the list pane (ShellPaneSplit) and the open item's bar shares its row; item tabs float at the pane's top (PageTabsEdge) instead of stacking on the shell's tab bar; the floating tab pill no longer swells over leftover media padding. - Pipeline detail is a DetailPane on wide too; Run/Runs move from FABs into the bar's actions; name and identity live in the title pill. - Run detail title pill shows the real title with Run N, pipeline and version (the pill links to the pipeline); the body keeps only status, actions and notices; standalone detail draws the same segmented bar. - One Runs tab badge: attention outranks running. - Tests for content-behind-bar padding and the no-stacking wide layout; notes/app-chrome-fixes.md.
152 lines
8.3 KiB
Markdown
152 lines
8.3 KiB
Markdown
# App chrome fixes (style review batch A: F1, F2, F3, F7, F15/F26, F19)
|
|
|
|
Follow-up to `notes/segmented-bar.md` and `notes/floating-tab-bars.md`, from
|
|
the independent review in `/tmp/app-style-review/report.md`.
|
|
|
|
## F1: content floats behind the top bar
|
|
|
|
Helpers (`lib/ui/adaptive/floating_bar_layout.dart`, next to
|
|
`withFloatingBarClearance`):
|
|
|
|
- `withTopBarClearance(context, padding)`, `withBarClearance` (top + bottom),
|
|
`TopBarClearance`, `topBarInset(context)`.
|
|
- `SliverTopBarClearance`: a *pinned*, empty, tap-through header, so the first
|
|
sliver starts below the bar and any later pinned header (sticky sections,
|
|
`StickyBar`) pins at the bar's inset instead of behind it.
|
|
- `BelowTopBar`: fixed content (a canvas, a header) starts below the bar and
|
|
its subtree no longer sees the bar's height.
|
|
- `lib/ui/adaptive/top_bar_notices.dart` `TopBarNotices(notices:, child:)`:
|
|
banners stay below the bar; without one the child reaches the top edge.
|
|
The child keeps its place, so a banner never remounts it.
|
|
|
|
Applied:
|
|
|
|
- Shell (`shell/adaptive_shell.dart`): no top `SafeArea` (Material body is the
|
|
destination stack directly; Cupertino `SafeArea(top: false, bottom: false)`).
|
|
Scaffold structure unchanged otherwise (the stack keeps its GlobalKey).
|
|
- `DetailPane` (`shell/detail_page.dart`): body `SafeArea(top: false, bottom:
|
|
false)`; passes the spec's subtitle / title press / title key to the bar.
|
|
- Runs list (`runs_list.dart`): the error notice and applied filters are the
|
|
first rows of the one `ListView` (default media padding), so they scroll
|
|
behind the bar; the empty state uses `BelowTopBar`.
|
|
- Pipelines list (`pipeline_list_panel.dart`): All/Scheduled, the clear-filter
|
|
button, banners and progress lead the list; empty/loading states keep them
|
|
below the bar.
|
|
- Pipeline detail: the tab body reaches the top edge; refresh/error notices
|
|
stay below the bar without remounting the tab. Source uses
|
|
`withBarClearance`; Graph is `BelowTopBar` (its overlay buttons).
|
|
- Run detail: the slim header (status + actions + notices) is padded by the
|
|
inset; tab bodies use `SliverTopBarClearance` / `withBarClearance` so they
|
|
also clear top tabs (below). Changes tab is `BelowTopBar` (fixed summary).
|
|
- Artifact gallery (`artifact_visit_list.dart`, page): `SliverTopBarClearance`
|
|
first, page `SafeArea(top: false, bottom: false)`.
|
|
- Stage definition page: list `withBarClearance`; the pipeline/version line
|
|
moved to the bar's subtitle (`StageDefinitionView(showIdentity: false)`).
|
|
- Templates (`templates_frame.dart`, `screen.dart`, `template_detail.dart`,
|
|
`application/templates_destination.dart`): page body floats; Refresh moves
|
|
into the page bar (the page hosts a `ShellBarScope`, the embedded frame
|
|
publishes through `ShellBar`); failure/connection banners use
|
|
`TopBarNotices`.
|
|
- Pipeline filter page, usage (`runs_stats_page.dart`): lists use
|
|
`withBarClearance`.
|
|
- Runs/Pipelines/Chat destinations: connection banner through `TopBarNotices`.
|
|
|
|
Left with a top inset (deliberately, with reason):
|
|
|
|
- Chat list (`features/chat/screen.dart` wraps it in `BelowTopBar`): the chat
|
|
lane owns its list padding; this keeps today's look until it pads itself.
|
|
Settings and Search keep their own `SafeArea`s (other lanes).
|
|
- `graph_expanded_view.dart`, `run_graph_preview.dart`: canvases with overlay
|
|
controls at their top and fit-to-viewport; floating them needs inset-aware
|
|
fit and controls (F12 lane).
|
|
- `file_diff_viewer.dart`, `run_changes_action.dart` (ChangesViewer),
|
|
`artifact_viewer_page.dart`: fixed headers/info strips above the scrolling
|
|
part; floating needs those headers inside the scroll (F13/F25 lanes touch
|
|
the same views).
|
|
- `application/schedules_destination.dart`: the search/refresh toolbar is a
|
|
pinned control row; the page keeps its top inset.
|
|
|
|
## F2/F3: one top row, no stacked bottom pills on wide windows
|
|
|
|
- `ListDetailPanes` (`shell/list_detail.dart`) publishes `ShellPaneSplit` to
|
|
the shell; the shell wraps its bar in `_ListPaneBar`, which narrows it to the
|
|
list pane width (`listDetailListWidth`, the same split math, now shared as
|
|
`listDetailBodyWidth`). The detail side gets only the system inset
|
|
(`viewPadding.top`) as its top padding, so its `DetailPane` bar sits on the
|
|
same row at the top edge.
|
|
- The detail side also gets `PageTabsEdge(edge: FloatingBarEdge.top)`. Run and
|
|
pipeline tabs read it: `FloatingBarOverlay(edge:)` and
|
|
`FloatingDestinationBar(edge:)` float the tabs just under the pane's bar /
|
|
header (sized to tabs, leading edge, 12 margins); the content's top padding
|
|
grows by the tabs' height. On phones and pushed pages nothing changes
|
|
(bottom).
|
|
- `FloatingDestinationBar` now strips leftover media padding inside the pill:
|
|
the host `NavigationBar` has its own `SafeArea` and swelled to ~130px when a
|
|
page's top padding (or the shell's bottom bar height) reached it.
|
|
- F3: wide pipeline detail is a `DetailPane` like runs and chat; the panel
|
|
itself publishes title, subtitle and actions through `ShellBar` (also on the
|
|
phone page, so `screen.dart` no longer wraps it).
|
|
|
|
## F7: pipeline detail
|
|
|
|
- Run/Runs FABs removed; they are the bar's actions (`pipelineBarAction`: a
|
|
`TextButton.icon` Runs and `FilledButton.icon` Run, Cupertino plain/filled
|
|
buttons; keys `pipeline-view-runs`, `run-pipeline-action` kept).
|
|
`RunPipelineAction(fab:)` became `inBar:`; `pipelineFab` is gone.
|
|
- No headline in the body: name in the title pill, `id · v · stages` as its
|
|
subtitle (Summary drops that line when in a bar,
|
|
`PipelineSummaryView(showIdentity:)`). A bare panel (no bar, tests) keeps a
|
|
header with the name and the actions row (`pipeline-detail-header`,
|
|
`pipeline-actions`).
|
|
|
|
## F15/F26: run detail title
|
|
|
|
- Title pill: the run's real title, subtitle `Run N · pipeline · vX`
|
|
(`detailSubtitle`). When the host can open pipelines the pill is the link
|
|
(`runPipelineLinkKey`, label `Open pipeline <name>`), replacing the body's
|
|
`Pipeline <name>` line.
|
|
- Body header: only the coloured status kicker beside the run actions, and the
|
|
notices. Title, `Run N`, pipeline line and the old `← Back to list` /
|
|
Cupertino Back row are gone; a run detail outside any bar draws the same
|
|
`SegmentedBar` (Back `run-detail-back`, title, subtitle, more menu) over
|
|
itself with `SegmentedBarOverlay`. (The loading/error placeholder keeps its
|
|
`Back to list` button: it has no bar content to show.)
|
|
|
|
## F19: one Runs badge
|
|
|
|
Attention outranks running: the running `ActivityBadge` count is 0 while the
|
|
attention count is positive; both stay in the tree (keys unchanged), so the
|
|
icon never remounts. The running badge moved to the same top corner.
|
|
|
|
## Tests
|
|
|
|
New: `test/ui/adaptive/top_bar_clearance_test.dart` (list reaches the top
|
|
edge, starts below the bar, scrolls behind it — Material and Cupertino; a
|
|
pinned header after `SliverTopBarClearance` pins at the inset;
|
|
`TopBarNotices` keeps the child mounted; top-edge tab bar position, height
|
|
and content padding), `test/shell/pane_bar_row_test.dart` (1200: shell bar
|
|
pieces stay within the list pane, pane bar on the same row, subtitle in the
|
|
pill, item tabs under the pane bar and far above the shell tabs, item list
|
|
below its tabs — both hosts; 390 page: tabs at bottom, content from the top
|
|
edge below the bar; one Runs badge).
|
|
Updated for intentional changes: `run_detail_finders.dart` (title is in the
|
|
pane/page bar), `runs_screen_test.dart` and `runs_destination_test.dart` (the
|
|
bar title arrives a frame later), `run_detail_widget_test.dart` (kicker below
|
|
the bar title), `run_detail_header_test.dart` (link label is the pill's),
|
|
`pipelines_screen_test.dart` (Run/Runs in the bar),
|
|
`pipeline_list_composition_test.dart` (no body headline), `widget_test.dart`
|
|
(a bare body is centred, bodies reach the top edge).
|
|
|
|
## Evidence
|
|
|
|
`/tmp/fix-a-evidence/` (headless Chrome via the reviewer's `shoot.mjs` with
|
|
its runs/pipelines loopback fixtures over a web build of `lib/main.dart`, and
|
|
static builds of `tool/floating_tabs_probe_entry.dart` and
|
|
`tool/run_detail_visit_probe.dart`): runs/run detail/pipelines/pipeline
|
|
detail at 560 and 1200 (light/dark, scrolled), chat list + thread at 1200,
|
|
settings/templates/schedules/search, floating-tabs probe (Cupertino; one
|
|
Runs badge), standalone run detail bar (`rv-standalone-*`).
|
|
|
|
Known gaps: no device run. A standalone `PipelinesScreen` (probe/tests only,
|
|
not the app) still shows its window-wide bar above the detail pane's bar.
|