Repository navigation
feat(web): head every page with one shared page head - #209
Merged
Merged
Conversation
A title flush left, one line under it, the page's buttons right of the title's first line at the table controls' height (--tool-h), and one gap under it.
Runs, the empty Runs page, a run, a run being prepared, Launches, the feasibility check, Classifier vs judge, the import page and Workspaces. A run's details are the line under its id and its buttons sit right of it. The empty Runs page loses its tagline.
Benchmarks, a benchmark, its Harbor form, Agents, Capabilities, an agent or a capability, Kits and a kit. A benchmark's tags move from above its title to the line under it, its logo before the title; an agent's and a kit's title leaves its card. The Agents and Capabilities count drops its protocol notes.
The builder's title takes the one h1 size and loses its sentence; its recipe buttons take the page head's height.
Only the title line changes: a comparison and one task side by side.
…ith the page head A trial's outcome and exception are the line under its task. Only the title moves: the cards, tabs and Settings' Ready to run stay as they are.
The page-title row, the run header and its actions, and the gap patch under a title that the head's one gap now gives.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #208
What
Every page title now comes from one macro,
page_head(title, sub='', actions='', mark='', mono=false, id='')intemplates/_page.html. It writes a<header class="page-head">with the h1 first, then at most one line under it (sub), then the page's buttons (actions). The styles are instyle.css, under "the page head".Layout. The title is flush left. The line under it holds counts, an id, a badge or pills. The buttons are flush right. Each button is as tall as
--tool-h(2.1rem), the table controls' height, and is centred on the title's first line, so the line under the title does not move it. At 640 px and below, the buttons go to their own row under the line, flush left. A mark (a benchmark's or an agent's logo) can go before the title. The h1 has one size on every page (--h1-size). Long titles wrap. The head has one gap under it (--head-gap, 24 px), and the next element adds no margin to it.Pages. Runs, the empty Runs page, a run, a run being prepared, Launches, Workspaces, the import page, the feasibility check, Classifier vs judge, a comparison, a task side by side, a trial, its attempts, an artifact, the run builder, Recipes, Benchmarks, a benchmark, the Harbor benchmark form, Agents, Capabilities, an agent or a capability, Kits, a kit and Settings.
What moves.
Removed text. The builder's sentence ("Choose what to test. Keep every setting explicit.") and the empty Runs page's tagline are gone. The Agents and Capabilities line keeps only the count.
Removed styles.
.page-titleand its variants (runs-head,ws-head,rcp-head,compare-title,trial-title),.run-headerand.run-actions,.bench-index-head,.bench-count,.bench-headand.bench-head-tools,.bench-tags,.bench-actions,.std-head,.std-tags,.start-title,.start-count,.start-head,.st-head, the builder's.nb-headingrules, every page's own h1 size, and.page-title + .alert.--tool-h. It moves from.table-controlsto:root, so the head's buttons and the table controls read one definition.Fix. A long path in a
.subtitlenow wraps. Before, it scrolled the Harbor benchmark form sideways at 390 px.Touches
templates and static (
_page.html, 23 page templates,catalogue/use_bundle.html,style.css,catalogue/catalogue.css,builder/command-builder.css,builder/recipes.css,compare/comparison.css,runs/launches.css,runs/start.css,settings/settings.css,settings/modal.css,traces/conversation.css,workspaces/workspaces.css) · route testsBefore and after
Seeded data: a test profile with four workspaces of fixture runs, the route test's fixture job twice, and a run not written yet. Before is
main, after is this branch, same URL and width.Verified
In a throwaway rootless
python:3.12container with Node.js and uv, on a copy of the branch:python3 app/tests/parallel.py: 2249 tests in 127 modules, OK.pip install -r app/requirements.txt, thenpython3 app/tests/parallel.py app/ui_tests: 638 tests in 53 modules, OK.test_every_route.py: every GET route, the trial tabs, the comparison pages and the empty Runs page must have exactly one h1, first in<header class="page-head">.Browser check, Chromium (Playwright 1.49.1), on the seeded data. 26 pages at 1280 px light and 390 px dark, before and after. The script measures and asserts these results:
--tool-hand to the table controls' buttons. At 1280 px each button's centre is 0 px from the title's first line.Not checked: a touch screen (there,
--tool-his 2.75rem in the head), other browsers and a screen reader.Risk
--tool-hnow lives on:root. A page that sets it on another element changes the head's buttons or the table controls there too.gap(the empty Runs page and Settings). Their styles subtract that gap so the head's gap stays 24 px. A change to those gaps must change the subtraction too.