Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion specs/001-theme-resolution/decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ row and add a dated line; never delete a row.
| `ThemeResolver`, `ThemeResolverFactory`, `AggregateResolverFactory`, `ConfigProvider` | Built on `prototype/resolver` (commit `d1c05dc`). 7 unit tests, 5 integration tests. Mago `format`, `lint`, `analyze`, `guard` clean. Not merged: there is no PR for this branch yet. |
| Theme-aware `asset()` helper | Built on `feat/asset-helper` (stacked on `prototype/resolver`, Phase 10 T042–T046, T048; T047 docs open). `ConfigProvider` now has the key constants and registers `AssetFactory` under `view_helpers.factories`. |
| Asset publishing (installer) | Not built. Requirements live in `webinertia/project-tracking#6` (the Webware component installer RFC). |
| Default theme visuals | Mockup open as `webinertia/default-theme#1` (CSS tokens plus `mockup/index.html`). |
| Default theme visuals | Worked out in `webinertia/default-theme#1`, a scratch space (D-021): the shipped stylesheet lives in `webinertia/webware` at `public/theme/default/css/theme.css`. |
| Port of webware-acl, webware-admin, webware-usermanager templates to a neutral `default` theme | Started: usermanager PR #69 open, acl moved on an uncommitted branch. See `tasks.md` Phase 12. |
| `ims` theme (the IMS originals, verbatim) | Partly present in `webinertia/webware` (`src/App/templates/ims/`, mapped in `config/autoload/theme.global.php`). Admin pages not yet copied. |

Expand Down Expand Up @@ -76,6 +76,7 @@ contradicted; confirm if you disagree), **Proposed** (needs the owner), **Open**
| D-018 | 2026-10-01 | The home page (`app::home-page`) is to be a CMS-style landing page loading content blocks from installed components through a PSR-14 collect event, mirroring `webware-admin` (`DashboardMiddleware` dispatches `RegisterWidgetEvent`, listeners add `WidgetInterface`, `AclWidgetFilterIterator` filters by role). The contract is **not** admin's `WidgetInterface`: it needs a `region`. Where the contract lives is **a new component** (owner, 2026-10-01: "Will be provided by a new component. Im still deciding on a few things there before that work will start."). | Settled (location); details open, work not started | Do not start it until the owner says so. Also unchecked: how `AclWidgetFilterIterator` resolves an anonymous user (`DashboardMiddleware` passes it `null`). |
| D-019 | 2026-10-01 | Home-page work is **out of this feature's scope** except for the `default` theme templates that render it. | Accepted | Keeps `webware-theme` about resolution and assets. |
| D-020 | 2026-10-01 | **Creating a theme (the command, D-012) copies the `default` theme's primary files under the given name**: in 1.0 only the layout, body and home-page templates and the main CSS file. It then **registers configuration**: a template map (`theme.themes.<name>`) covering **only the copied templates**, and **sets the new theme as active** (`theme.active`). | Settled (behaviour and storage: the command writes an autoloaded config file named `theme.{theme-name}.global.php`, owner 2026-10-01) | Owner, 2026-10-01: "A copy of the default files will be created and named as the provided name. I think in 1.0 we will just copy the primary templates. Layout, body, home-page and main css file. Configuration will also need to be registered and a template map covering just the copied templates etc and it will set the newly created theme as active." Everything not copied falls back to `default` per address (D-002), so the copy stays small. Tasks T065, T066. |
| D-021 | 2026-10-01 | **There is no `default-theme` package.** `webinertia/default-theme` was only a place to work out colours and the mockup. The `default` theme ships with its owners: each **component** ships its own default templates (`templates/default/<namespace>/`) and its own component assets; **`webware/webware`** ships the application's default templates (`src/App/templates/default/`) and the default theme's stylesheet (`public/theme/default/css/theme.css`), registered as `theme.assets.default.theme.css`. Nothing needs to be packaged or published for the default theme's own CSS. | Settled | Owner, 2026-10-01: "The repo I created was just to have a place to workout the colors etc. The default templates will ship with their components and with webware/webware." Supersedes the T050 question (how to package it) and the assumption in D-014 and T049 that the repo is a deliverable. |

## 4. Next actions, in order

Expand Down
18 changes: 9 additions & 9 deletions specs/001-theme-resolution/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ than displacing the ones below it.

## Phase 6 — The htmx configuration prerequisite (FR-012)

- [ ] T039 **In progress: `webinertia/webware-htmx#22` is open** (merge state was `UNKNOWN` on 2026-10-01, re-check). Make webware-htmx read **one key per value** for the body and the layout, whose values are
- [X] T039 **Done: `webinertia/webware-htmx#22` merged and `1.0.0-alpha.1` tagged by the owner on 2026-10-01.** Original text (merge state was `UNKNOWN`, re-check): Make webware-htmx read **one key per value** for the body and the layout, whose values are
theme-resolvable template names, replacing the five-key lookup and the package-published
`templates.map['body::default']` entry. This is the only part of webinertia/webware-htmx#21 this
feature needs: without it a theme has no name to resolve for the body
Expand Down Expand Up @@ -190,15 +190,15 @@ Why: laminas-view's `Asset` helper is `final readonly` and is built once from

## Phase 11 — The default theme's assets (repository `webinertia/default-theme`; D-015, D-016)

- [ ] T049 Land `webinertia/default-theme#1` (the Bootstrap 5.3.8 token overrides in `css/theme.css` and
- [X] T049 **Superseded (D-021).** `webinertia/default-theme` is a scratch space, not a deliverable; its PR is not to be merged as a package. Original text: Land `webinertia/default-theme#1` (the Bootstrap 5.3.8 token overrides in `css/theme.css` and
`mockup/index.html`). Owner review; do not merge without them
- [ ] T050 Decide how the default theme is packaged so the installer can publish it to
- [X] T050 **Answered (D-021): nothing is packaged.** The default theme ships with `webware/webware` (its stylesheet) and with each component (its templates and assets). Original text: Decide how the default theme is packaged so the installer can publish it to
`public/theme/default/{css,js,img,fonts}/` (composer package name and layout). Record it in
`decisions.md`
- [ ] T051 Extend the mockup with the shell: navbar with the three navigation areas (`main`, `admin`,
`user`), footer, toast container for the messenger, and the Light/Dark control. Check each page in
both modes
- [ ] T052 Port the CSS the three components need (the `ims-acl-*`, `ims-widget-*`, `ims-badge-*` and
- [X] T052 **Done, now in `webinertia/webware` (D-021):** the ACL page, wizard and dashboard widget rules, with Bootstrap tokens instead of fixed dark-mode colours, are in the app's `public/theme/default/css/theme.css` (worked out first in `default-theme#1`). The usermanager `list-col-*` hooks have no rules in the IMS CSS, so none were ported. Original text: Port the CSS the three components need (the `ims-acl-*`, `ims-widget-*`, `ims-badge-*` and
`ims-col-*` rules, 84 in IMS `public/assets/css/custom.css`) into `default-theme/css/` with the
neutral class names from D-013 and the palette tokens. Keep HTTP-method and privilege colours on
Bootstrap's semantic colours (D-016); replace hard-coded Bootstrap RGB values with tokens
Expand All @@ -211,22 +211,22 @@ Scope: webware-acl, webware-admin, webware-usermanager. Everything IMS-specific
into the `ims` theme first; the `default` copy then loses the `ims-` coupling. No IMS code is lost and
none lives in a component (standing rule 6).

- [ ] T054 webware-usermanager: land PR #69 (auth pages already neutral and under
- [X] T054 **Done in `webinertia/webware-usermanager#69` (open, not merged):** the `ims-widget-*` hooks are `widget-*` and the `ims-col-*` hooks are `list-col-*`. Original text: webware-usermanager: land PR #69 (auth pages already neutral and under
`templates/default/user/`), then replace the remaining `ims-widget-*` and `ims-col-*` hooks in
`admin-widget.phtml` and `list-users.phtml` (five each). Use `list-col-*`, never `col-*` (D-013)
- [ ] T055 webware-acl: move `templates/acl` to `templates/default/acl`, update
- [X] T055 **Done in `webinertia/webware-acl#70` (open, not merged).** The move and the hook rename are committed. Original text: webware-acl: move `templates/acl` to `templates/default/acl`, update
`ConfigProvider::getTemplates()` and its test. **Started on branch `feat/default-theme-templates`
in the local clone, uncommitted as of 2026-10-01: check `git status` before redoing it.** Then
rename the hooks per D-013 in `admin-acl.phtml` (about 37 occurrences), `admin-widget.phtml` and
`partials/protect-route-wizard.phtml` (about 30). Change ids, classes, `data-*` references and
the markup strings built in JavaScript together
- [ ] T056 webware-acl: extract the ACL page controller (IMS `public/assets/js/app.js` lines 301 to 704,
- [X] T056 **Done in `webinertia/webware-acl#70`:** `assets/default/js/acl.js`, registered as the `acl.js` asset of the default theme (`theme.assets.default`, value `component/acl/js/acl.js`) and loaded from `admin-acl.phtml`; webware-acl requires `webware/webware-theme`. The package source layout is `assets/<theme>/…`, published to `public/theme/<theme>/component/acl/…` (nothing publishes it yet, T060). Original text: webware-acl: extract the ACL page controller (IMS `public/assets/js/app.js` lines 301 to 704,
"ACL Wizard controller") into webware-acl as plain JavaScript with neutral selectors and no build
step, shipped as a **component** asset (D-010), and register its asset name. Needs Phase 10 and a
served location (D-011, D-012)
- [ ] T057 webware-admin: move `templates/admin` to `templates/default/admin` and update the template
- [X] T057 **Done in `webinertia/webware-admin#42` (open, not merged).** Original text: webware-admin: move `templates/admin` to `templates/default/admin` and update the template
path and its test (the dashboard is 14 lines and already free of `ims` markup)
- [ ] T058 `webinertia/webware`: copy the verbatim originals (from each component's git history or the IMS
- [X] T058 **Done in `webinertia/webware#7` (open, not merged):** 13 verbatim originals (eight acl, one admin and four usermanager templates) copied from each component's `origin/1.0.x` into `src/App/templates/ims/<namespace>/` and mapped in `theme.global.php`; the IMS `custom.css`, `app.js` and `system.messenger.js` are in `public/theme/ims/` and registered under `theme.assets.ims`, and the ims layout reads them through `asset()`. Original text: `webinertia/webware`: copy the verbatim originals (from each component's git history or the IMS
repository) into `src/App/templates/ims/<namespace>/` and map them in the `ims` block of
`config/autoload/theme.global.php`. Include the IMS CSS and JS with that theme
- [ ] T059 Verify in a browser with the `default` theme active, dark and light: the ACL overview, roles,
Expand Down
Loading