layouts
All repositories: gitoria
9.3 KB
# Report 001 (antcolony mission 075) — layouts.worldapi.org rebuilt as the WorldAPI theme in Hybriel**Commit**: `5c6e338` (first commit) in loreana:/media/STORAGE/projects/layouts.worldapi.org (new git repo). Not pushed and not deployed. I did not touch the live Byrodin folder or nginx, and I never read `.env`.**Hybriel**: master `c5b8b2e2`, built read-only from `git archive`, sha256 `38b34baf…697d1fe7`.- The runtime is the same as the apps' `06617221`, plus only `--graph --no-ast`.- `plugins/web` is byte-identical to theirs.## What exists- **`theme/` — what an app copies.**- `theme.hl` is a styles file that apps `inherit`. It holds:- layout tokens (`--layout-column` 72rem, gutter, header, sidebar, list, radius);- the type-colour slots `--color-type1…6`;- the plain elements: text, links, buttons (quiet / `.primary` / `.danger`), borderless fields with focus and invalid rings, the `details` foldable (bordered), the drop zone (dashed), tables without a grid, `.pill` and `.type-N`;- the WorldAPI rules for all 8 components.hybriel components (month-view, date-picker, range-picker, pagination, md-editor, code-editor, file-upload, modal).- **No fork.** Each theme rule repeats the component's own selector with `html ` in front, so it wins over the component's Style, which comes later in the one sheet. hl:web never sees the same selector twice. The gate proves the order and the computed borders.- `shell/` — seven Hybriel components, each with its own Style:- `AppHeader`: brand, search, slot;- `MainMenu`: from one list, written twice (header on desktop, sidebar on the phone), the current page marked;- `UserMenu`: icon and dropdown, Settings, Logout last;- `Sidebar`: `#sidebar`, an overlay on the phone and a column on desktop; `desktop="false"` makes it phone-only;- `ContentFirst`, `ListFirst` (`view` = list|detail) and `ThreePane` (`view` = list|detail, `main > menu` = the actions).- **Toggles use the browser's popover, with no script.** This covers the sidebar overlay, the phone's search field and the user dropdown. Esc and a tap outside close them natively. One small handler closes them when a link inside is tapped.- **Header contents are flush with the content column.** The header uses the same `padding-inline: max(gutter, (100% − column)/2)` as the shell. With list-first and three-pane, both span the page.- `check-theme.mjs` — the gate helper (see below).- **Showcase** (what the site serves):- `/elements`;- `/components/<name>`: the 8 components, themed, with mock content;- `/shells/content-first[/:kind]`: a mock tracker, signed out with a login in the user-menu slot, main menu Series | Shows | Movies | Genres | People;- `/shells/list-first[/:id]`: mock Notes, signed in;- `/shells/three-pane[/:id]`: mock Mail with folders and actions;- `/docs`;- a header search (`/search/:q`);- an accent switcher in the sidebar: 8 palette colours, kept in localStorage, Reset.- The site itself uses content-first. It works at 390 and 1280 px.- **Docs**:- `docs/using-the-theme.md`: the guide;- `docs/layouts/*.md`: one per layout, covering what conventions.md "Documentation for models" asks for;- `docs/design-rules.md`, `docs/shells.md` and `docs/conventions.md` are copied from Byrodin. The "Workbench" section of conventions.md is replaced by "Showcase".- **README, STATUS, LOG, `deploy.sh`** (calendar's pattern). The gates in `deploy.sh` are check-theme and browser.- I fixed one thing compared with calendar: the summary `grep` now has `|| true`. Without it, a gate whose output has no "passed," line ended the script under `pipefail`.- Also: `docker-compose.yml` (127.0.0.1:45009, container `layouts.worldapi.org`) and the `Dockerfile` (`worldapi-hybriel-runtime`).## How apps use itThese are the steps in docs/using-the-theme.md:1. Copy `theme/`, and check that `shared/tokens.hl` is the same file.2. Put this in `styles.hl`: `inherit './theme/theme.hl'`, `colorAccent = var(greenDark)`, `colorType1 = var(yellow)` …3. Choose a shell. AppHeader goes before it, with MainMenu and UserMenu inside (or the ident selector when signed out).4. Run `node theme/check-theme.mjs .` in the gate.**check-theme** flags in `.hl` and `.css` files:- hard-coded colours: #hex, rgb/hsl/oklch, named colours. A `var(--x, fallback)` fallback is allowed.- decorative borders. A border is allowed on a line about details, summary, drop zones, focus or aria-invalid, or with `// functional: why`.It never scans `shared/tokens.hl`, `plugins/`, `bin/` and similar. `.check-theme-ignore` or `--ignore` skip vendored component folders.Run read-only on the dev folders: tracker has 21 findings, calendar 7 (including an `rgba(` backdrop), notes 8. Examples are tracker's `borderTop` row separators and notes' framed list links. These are the cleanup list for the migration.## Gate- `node tests/browser.mjs` (server 8760, Chrome 8761–8764) — last line: **`73 passed, 0 failed — screenshots in .scratch/gate-shots/`**.- `node theme/check-theme.mjs .` → `check-theme: 35 files, 0 problems`. The helper's own self-test (a fixture with #hex, a frame and `white`) is part of the gate.- `./deploy.sh --dry-run --target ~/scratch-075/deploytest`: both gates passed, a 175-line preview, nothing was sent.- What the gate covers:- **Phone (390):**- the sidebar toggle opens the overlay (x=0, full height, holds the main menu); Esc closes it, and a link in it navigates and leaves it closed;- the loupe opens the search field full width under the bar with focus; typing "modal" + Enter lands on /search/modal and finds the page;- the user icon opens the dropdown at the right edge (Settings|Logout); Esc closes it;- list-first: list only, with no toggle; an item shows only the note (long title, back link); back returns to the list;- three-pane: list first; the toggle opens the folders and × closes them; an item shows the message with its actions; an action answers;- the tracker demo's sidebar menu works: Movies shows only movies and closes the overlay;- no sideways scroll on 16 pages.- **Desktop (1280):**- content-first: sidebar beside main; the header is flush with the column (brand x = sidebar text x; user icon right edge = main right edge);- the header's main menu marks the current page, and the sidebar does not repeat it;- computed borders: `none` on buttons, fields, table cells and all themed components; `solid` on the foldable; `dashed` on the drop zone; titles white;- pagination, modal and date-picker still work when themed;- accent purple → stays after a reload → Reset;- list-first and three-pane panes sit side by side at x = 0 / previous right edge / 1280;- the user dropdown is flush with the column;- no console errors or warnings.- **Screenshots, looked at:** Loreana `.scratch/gate-shots/gate-{390,1280}-*.png` (19 files) and the full pages from `tools/shots.mjs` in `.scratch/shots/`. I fixed what I saw:- on desktop, the user menu sat right next to the brand when there was no search;- the filter field was invisible on the sunken list;- the theme's `.empty` clashed with md-editor's own `.empty` state class (its toolbar went italic). It is now `p.empty`.## Open questions for the creator1. **components.hybriel is not black/white yet.** Its components still fall back to the WorldAPI dark palette and draw frames. The theme removes the frames and supplies the colours, so it already works. Should a later mission make the library's fallbacks truly black/white? The theme rules would stay, because they are keyed to the same selectors.2. **Overlays use the native `popover`**: no script, Esc and tap-outside for free. It needs Chrome 114+, Safari 17+ or Firefox 125+. Is that OK?3. **The one breakpoint is 60rem, and the content column is 72rem** (tracker-like width). Are these the right values? The header main menu shows from 60rem. Tracker's 5 items plus search fit at 1280; at 960 it gets tight.4. **Type-colour token names follow hl:web's kebab rule: `--color-type1` (not `-1`).** Classes are `.type-1…6`. Are numbered slots OK, or should they be named per app (`colorTypeMovie`)?5. **Is borderless everywhere right?** Even fields have no frame; they use a sunken surface with an accent focus ring. In three-pane on desktop, the panes separate by surface (folders on the background, list sunken, message on the background).6. Light theme: not done. It is an open decision in conventions.md.## For the conductor (deploy and retire — not done by me)These are the STATUS.md "First deploy" steps:1. Stop the old container (Vidoriel, 127.0.0.1:44820).2. Move the old folder aside (for example to `layouts.worldapi.org.vidoriel-20261003`) and create an empty folder. `deploy.sh` has no `--delete`.3. Run `./deploy.sh`. The proposed port is 45009, which was free on Byrodin.4. Change the nginx vhost: proxy `/` with WebSocket Upgrade headers (like components), instead of the static root and the `.ssr.js` location.5. Look at the site in a browser. The cert expires on 2026-10-16 (certbot renews it).The runtime image is not tested here: the same binary build runs in the other apps' containers.## Housekeeping- Every process I started was stopped by its PID, and the gate leaves no Chrome behind (count 0).- The read-only build is in `~/scratch-075`; I remove it after this report.- Ports 8760–8764 are free again.
Branches
Latest commits
- 4099e64aMerge branch 'font-segoe-ui' into mainAtlas
- e14fb795|||PR Theme font: Segoe UI first (his choice 2026-11-19)Atlas
- 44071d2cMerge branch 'hl-standard-5' into mainAtlas
- 5ea64202|||PR Gate: count the new-tab check's console errors tooAtlas
- 2752ceddMerge branch 'hl-standard-4' into mainAtlas
- ac552b81|||PR Gate: keyboard (Tab/Enter/Space) and Back/Forward/reload/new-tab checks (HL-STANDARD F5, F21)Atlas
- 8cddcaa9Merge branch 'hl-standard-2' into mainAtlas
- 2b480a64|||PR Type the route parameter of main-menu build (HL-STANDARD L10)Atlas
- ab54a39dMerge branch 'hl-standard' into mainAtlas
- 04d36fcf|||PR Type function parameters and drop unneeded let (HL-STANDARD L2, L10)Atlas
- 220c8fa4Merge branch 'readme-audit' into mainAtlas
- b78fb85a|||PR README matches the codemre
- 9f351699Preserve comments and nest supported selectors without changing rendered outputmre
- 97110ad9WIP: nest accepted layout selectors; stopped at startup parse failuremre
- ce4a0baeKeep caller slot styles whole so minimal shell apps startmre
- 12cd3992Re-vendor complete Hybriel plugins and runtime to day44mre
- b05c20feBackup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre
- 8d9ed0b8Re-vendor complete Hybriel plugins and runtime to day39mre
- ebd00b6cNest caller slot styles in three-panemre
- 009991efNest caller slot styles in list-firstmre