gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmain4099e64aMerge branch 'font-segoe-ui' into mainAtlasmain/reports/001-hybriel-theme.md

9.3 KB

  1. # Report 001 (antcolony mission 075) — layouts.worldapi.org rebuilt as the WorldAPI theme in Hybriel
  2. **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`.
  3. **Hybriel**: master `c5b8b2e2`, built read-only from `git archive`, sha256 `38b34baf…697d1fe7`.
  4. - The runtime is the same as the apps' `06617221`, plus only `--graph --no-ast`.
  5. - `plugins/web` is byte-identical to theirs.
  6. ## What exists
  7. - **`theme/` — what an app copies.**
  8. - `theme.hl` is a styles file that apps `inherit`. It holds:
  9. - layout tokens (`--layout-column` 72rem, gutter, header, sidebar, list, radius);
  10. - the type-colour slots `--color-type1…6`;
  11. - 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`;
  12. - the WorldAPI rules for all 8 components.hybriel components (month-view, date-picker, range-picker, pagination, md-editor, code-editor, file-upload, modal).
  13. - **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.
  14. - `shell/` — seven Hybriel components, each with its own Style:
  15. - `AppHeader`: brand, search, slot;
  16. - `MainMenu`: from one list, written twice (header on desktop, sidebar on the phone), the current page marked;
  17. - `UserMenu`: icon and dropdown, Settings, Logout last;
  18. - `Sidebar`: `#sidebar`, an overlay on the phone and a column on desktop; `desktop="false"` makes it phone-only;
  19. - `ContentFirst`, `ListFirst` (`view` = list|detail) and `ThreePane` (`view` = list|detail, `main > menu` = the actions).
  20. - **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.
  21. - **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.
  22. - `check-theme.mjs` — the gate helper (see below).
  23. - **Showcase** (what the site serves):
  24. - `/elements`;
  25. - `/components/<name>`: the 8 components, themed, with mock content;
  26. - `/shells/content-first[/:kind]`: a mock tracker, signed out with a login in the user-menu slot, main menu Series | Shows | Movies | Genres | People;
  27. - `/shells/list-first[/:id]`: mock Notes, signed in;
  28. - `/shells/three-pane[/:id]`: mock Mail with folders and actions;
  29. - `/docs`;
  30. - a header search (`/search/:q`);
  31. - an accent switcher in the sidebar: 8 palette colours, kept in localStorage, Reset.
  32. - The site itself uses content-first. It works at 390 and 1280 px.
  33. - **Docs**:
  34. - `docs/using-the-theme.md`: the guide;
  35. - `docs/layouts/*.md`: one per layout, covering what conventions.md "Documentation for models" asks for;
  36. - `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".
  37. - **README, STATUS, LOG, `deploy.sh`** (calendar's pattern). The gates in `deploy.sh` are check-theme and browser.
  38. - 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`.
  39. - Also: `docker-compose.yml` (127.0.0.1:45009, container `layouts.worldapi.org`) and the `Dockerfile` (`worldapi-hybriel-runtime`).
  40. ## How apps use it
  41. These are the steps in docs/using-the-theme.md:
  42. 1. Copy `theme/`, and check that `shared/tokens.hl` is the same file.
  43. 2. Put this in `styles.hl`: `inherit './theme/theme.hl'`, `colorAccent = var(greenDark)`, `colorType1 = var(yellow)` …
  44. 3. Choose a shell. AppHeader goes before it, with MainMenu and UserMenu inside (or the ident selector when signed out).
  45. 4. Run `node theme/check-theme.mjs .` in the gate.
  46. **check-theme** flags in `.hl` and `.css` files:
  47. - hard-coded colours: #hex, rgb/hsl/oklch, named colours. A `var(--x, fallback)` fallback is allowed.
  48. - decorative borders. A border is allowed on a line about details, summary, drop zones, focus or aria-invalid, or with `// functional: why`.
  49. It never scans `shared/tokens.hl`, `plugins/`, `bin/` and similar. `.check-theme-ignore` or `--ignore` skip vendored component folders.
  50. 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.
  51. ## Gate
  52. - `node tests/browser.mjs` (server 8760, Chrome 8761–8764) — last line: **`73 passed, 0 failed — screenshots in .scratch/gate-shots/`**.
  53. - `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.
  54. - `./deploy.sh --dry-run --target ~/scratch-075/deploytest`: both gates passed, a 175-line preview, nothing was sent.
  55. - What the gate covers:
  56. - **Phone (390):**
  57. - 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;
  58. - the loupe opens the search field full width under the bar with focus; typing "modal" + Enter lands on /search/modal and finds the page;
  59. - the user icon opens the dropdown at the right edge (Settings|Logout); Esc closes it;
  60. - list-first: list only, with no toggle; an item shows only the note (long title, back link); back returns to the list;
  61. - three-pane: list first; the toggle opens the folders and × closes them; an item shows the message with its actions; an action answers;
  62. - the tracker demo's sidebar menu works: Movies shows only movies and closes the overlay;
  63. - no sideways scroll on 16 pages.
  64. - **Desktop (1280):**
  65. - content-first: sidebar beside main; the header is flush with the column (brand x = sidebar text x; user icon right edge = main right edge);
  66. - the header's main menu marks the current page, and the sidebar does not repeat it;
  67. - computed borders: `none` on buttons, fields, table cells and all themed components; `solid` on the foldable; `dashed` on the drop zone; titles white;
  68. - pagination, modal and date-picker still work when themed;
  69. - accent purple → stays after a reload → Reset;
  70. - list-first and three-pane panes sit side by side at x = 0 / previous right edge / 1280;
  71. - the user dropdown is flush with the column;
  72. - no console errors or warnings.
  73. - **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:
  74. - on desktop, the user menu sat right next to the brand when there was no search;
  75. - the filter field was invisible on the sunken list;
  76. - the theme's `.empty` clashed with md-editor's own `.empty` state class (its toolbar went italic). It is now `p.empty`.
  77. ## Open questions for the creator
  78. 1. **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.
  79. 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?
  80. 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.
  81. 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`)?
  82. 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).
  83. 6. Light theme: not done. It is an open decision in conventions.md.
  84. ## For the conductor (deploy and retire — not done by me)
  85. These are the STATUS.md "First deploy" steps:
  86. 1. Stop the old container (Vidoriel, 127.0.0.1:44820).
  87. 2. Move the old folder aside (for example to `layouts.worldapi.org.vidoriel-20261003`) and create an empty folder. `deploy.sh` has no `--delete`.
  88. 3. Run `./deploy.sh`. The proposed port is 45009, which was free on Byrodin.
  89. 4. Change the nginx vhost: proxy `/` with WebSocket Upgrade headers (like components), instead of the static root and the `.ssr.js` location.
  90. 5. Look at the site in a browser. The cert expires on 2026-10-16 (certbot renews it).
  91. The runtime image is not tested here: the same binary build runs in the other apps' containers.
  92. ## Housekeeping
  93. - Every process I started was stopped by its PID, and the gate leaves no Chrome behind (count 0).
  94. - The read-only build is in `~/scratch-075`; I remove it after this report.
  95. - 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