128 lines
7.1 KiB
Markdown
128 lines
7.1 KiB
Markdown
# CMS and NODE.DC Design Guideline
|
|
|
|
CMS consumes the canonical packages from `SILVER/NODEDC_DESIGN_GUIDELINE`.
|
|
The exact source commit and SHA-256 of each immutable npm package are recorded
|
|
in `ui/design-system.lock.json`; npm integrity and transitive versions are in
|
|
`ui/package-lock.json`. The packages in `ui/vendor` are npm distributions, not
|
|
locally maintained component forks. Update them from the canonical repository.
|
|
|
|
## Build and deployment
|
|
|
|
```sh
|
|
npm ci --ignore-scripts --prefix ui
|
|
node ui/build.mjs
|
|
node ui/build.mjs --check
|
|
```
|
|
|
|
Edit `ui/`, not generated `admin/index.html`, `admin/admin.js` or `admin/admin.css`.
|
|
The release qualification repeats the frozen UI install and rejects generated
|
|
files that differ from the pinned source build. Only the existing flat `admin/`
|
|
assets enter the canonical CMS release. Root runtime dependencies, Dockerfile,
|
|
Compose and server behavior are unchanged. A qualified master commit continues
|
|
through the existing Gitea / NAS autodeploy route.
|
|
|
|
## Component ownership
|
|
|
|
- AppHeader, HeaderNavigation, HeaderProfile, HeaderAvatar, ApplicationShell,
|
|
AdminNavigationPanel and ApplicationPanel are rendered directly from ui-react
|
|
by the build. The optional duplicate workspace mark has been removed.
|
|
- Select, Switch, RangeControl, ProgressBar, StatusBadge and action Dropdowns
|
|
run as controlled React islands, using the actual package implementations.
|
|
- Existing CMS inputs remain hidden form/model bindings. Islands dispatch the
|
|
original input/change/click events. No storage, upload, publication, SEO or
|
|
knowledge model is reimplemented in the design adapter.
|
|
- FieldFrame, Button, IconButton, Icon and SettingsCard anatomy is generated
|
|
from package exports at build time. Dynamic DOM fields/cards adopt that
|
|
anatomy while retaining their existing controls and event listeners.
|
|
- MediaSourceField uses the package's DOM/CSS contract with the existing CMS
|
|
media-browser callback. The CMS file manager supplies its domain-specific
|
|
folder columns, usage data, upload and trash operations.
|
|
- Windows use ui-dom's modal controller and canonical window/glass classes.
|
|
Application workspace state uses its controller with an explicit application
|
|
binding for the string-valued shell data attributes.
|
|
- `ui/src/app.css` owns only CMS content grids, file columns, collection layout,
|
|
and application action grouping. Tokens and component materials come from
|
|
ui-core; AppHeader / profile / navigation geometry has no local overrides.
|
|
|
|
The compatibility adapter lives in `ui/src/design-system.mjs`. The original
|
|
business module was moved byte-for-byte to `ui/src/admin.mjs`. Adapters are
|
|
removed when a domain renderer is migrated to direct React composition; shared
|
|
component behavior must be changed in Design Guideline, never forked here.
|
|
|
|
## Interface organization
|
|
|
|
A single site selector and separate settings / preview actions replace the
|
|
nested workspace card. Content, SEO and knowledge retain separate modes.
|
|
Technical type badges no longer appear as form controls. Block metadata and
|
|
reorder/copy/delete actions are in a disclosure above the content editor.
|
|
Knowledge row actions use the shared Dropdown; the mobile editor uses the same
|
|
menu for secondary actions and a shared status indicator. Native model inputs
|
|
remain in forms, preserving IDs, names, validation and model serialization.
|
|
|
|
## Verification
|
|
|
|
- Frozen deterministic UI build (`--check`) and package SHA-256 checks.
|
|
- Existing multisite integration suite: 14 passing checks, including isolated
|
|
edits/rendering/uploads, archive import, encrypted credential transfer,
|
|
publication target exclusivity, restart persistence and authentication.
|
|
- Existing release contract suite: 3 passing tests.
|
|
- Local browser verification on independent fixture copies at 1663px and 390px:
|
|
site settings, switches, SEO selection/save, knowledge editor, file browser,
|
|
shared dropdowns, nested dialog Escape, and responsive panel navigation.
|
|
- Production acceptance is recorded separately after Git deployment.
|
|
|
|
## Visual corrections — 2026-11-05
|
|
|
|
CMS opts into shared `edges: flat`, with a white accent by default. The header
|
|
uses UserProfileMenu with the name/avatar from the existing `/api/me` session
|
|
and the complete canonical header: profile label, menu icon, avatar. Settings
|
|
open from the menu; there is no separate settings action beside the avatar. FeatureSettingsWindow contains the shared
|
|
Select and ColorField; validated preferences persist in browser-local storage
|
|
under `dc-cms.ui-preferences.v1`, independently of either site's content.
|
|
|
|
The site selector uses shared split/pill presentation and short display labels;
|
|
its separate toggle, preview and settings remain independent controls. The
|
|
existing Add Block node moves beside Static after each domain navigation render.
|
|
All drag listeners stay on their original nodes; only the shared DragHandle SVG
|
|
is adopted. Local content surfaces have no decorative outlines. React-owned
|
|
color-picker controls are excluded from the legacy DOM adapter.
|
|
|
|
Verified: dark/light, accent change and reload persistence, reset to white,
|
|
nested palette Escape, 390px modal, plus/template picker, pointer drag/reorder
|
|
(discarded), switching independent sites, and the shared component/type checks.
|
|
|
|
Forms follow the running Mission Core environment settings: SettingsCard owns
|
|
the group and fields sit directly in its transparent layout grid. A standalone
|
|
collection entry or native JSON disclosure adopts GlassSurface tone="group",
|
|
which uses the same neutral material. The content overview is layout rather
|
|
than another surrounding card. Native details, drag nodes and input bindings
|
|
stay intact; no CMS-specific colors or component overrides are added.
|
|
|
|
|
|
## Mission Core foundation — 2026-11-05
|
|
|
|
Pinned Design Guideline: `189bb7037740f577cc65e72f2b7c07651201ef19`.
|
|
CMS applies `missionDarkTheme` / `missionLightTheme` at documentElement, so menus
|
|
and settings portals share the same profile. The library owns all palette values;
|
|
reset clears a custom accent and returns to the preset. Existing explicit user
|
|
accent preferences remain supported. The static HTML declares Mission/flat before
|
|
JavaScript to avoid a flash of the legacy appearance.
|
|
|
|
Forms use the same SettingsCard → fields and optional GlassSurface group
|
|
collection composition as the living catalog. Media-stage and dropdown materials now reference shared
|
|
tokens. No business module, site data, deployment settings or server API changed.
|
|
|
|
Validation: deterministic generated build, multisite and release-contract tests;
|
|
local browser checks of the reported navigation-link fields, dark/light, settings
|
|
through the profile menu, custom accent, reset, and Escape focus restoration.
|
|
|
|
## Full-width boolean setting rows
|
|
|
|
A boolean editable field can declare `layout: "row"` and an optional `title`.
|
|
The editor uses the shared SettingsCard (title left, Switch right) and Switch,
|
|
above the following field in schema order. Values continue through the standard
|
|
model save/render/publish flow; no carousel-specific CMS state or new CSS is
|
|
introduced. Mission Core uses this for its per-carousel image-opening setting.
|
|
Local UI acceptance: toggle on → Save → reload retains true, toggle off → Save
|
|
removes the image links while preserving the other carousels.
|