Files
DC_CMS/docs/design-guideline-adoption.md
T
DCCONSTRUCTIONS aff551e4d4
DC CMS qualification / qualify (push) Successful in 2m33s
fix(cms): separate leaf form groups with shared surfaces
2026-11-05 13:16:35 +03:00

5.7 KiB

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

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.

Form groups, collection entries and JSON disclosures consume GlassSurface tone="soft" with its shared padding/radius/material. The former app-local translucent item background accumulated across nested cards and converged with TextField fill; using the canonical opaque nested surface preserves visible field zones in both themes without adding borders or changing input tokens. Form groups outside collections use the same nested surface so light-theme white inputs remain separated from white outer panels; collections already provide that surface and do not receive a second wrapper or double padding.