feat(edit-content): restructure command bar & side panel around Actions tab (#35892)#36021
feat(edit-content): restructure command bar & side panel around Actions tab (#35892)#36021oidacra wants to merge 15 commits into
Conversation
…ns tab (#35892) Command bar (dot-edit-content-form): - Slim to [status tag] | Preview ... (overflow menu) [sidebar toggle], sticky on scroll. - Status rendered as a local p-tag; lock toggle and inline workflow actions removed. - New dot-edit-content-command-bar-actions overflow menu (Permissions, Rules for pages, View references) that owns the relocated dialog logic. - Preview now supports HTML pages via generatePageEditUrl and URL-mapped content. Side panel (dot-edit-content-sidebar): - Info tab becomes Actions (bolt icon); Settings tab removed. - Lock control relocated as a distinct outlined button with a lock icon, separated from the workflow actions by a divider. - Workflow actions render stacked full-width (new `stacked` mode on dot-workflow-actions), one above another, first action primary; firing stays in the form via layout wiring (workflowActionFired output -> DotEditContentLayoutComponent.onWorkflowActionFired). - Sections (Locales, Workflow, Details) are independently collapsible and persist their state via DotLocalstorageService; headers restyled to the design's uppercase treatment. - Information card drops the status chip and References card (moved to the command bar). Removed the now-orphaned sidebar permissions/rules wrapper components.
|
Claude finished @oidacra's task in 2m 34s —— View job PR Review
Four issues worth addressing, roughly in severity order. 1.
In If the intent is to guard against accidental ESC inside the iframe, the flag should be set explicitly and the CLAUDE.md rule updated; otherwise both dialogs should flip to 2.
inode: this.$contentlet().inode,
3.
get $appendContext() {
return { $store: this.$store, showSidebar: ..., ... };
}This is a plain getter, not a signal computed. Every CD cycle a new object is returned, causing 4.
return !!relatedContent && relatedContent !== '0';This works only because the store surfaces a string (not a number). If Clean otherwise — the architecture around emitting |
Override the Tag `success` color scheme in CustomLaraPreset so it uses a tinted
background with dark text ({green.100}/{green.700}) instead of Lara's default solid
fill + white text. Applies globally to every p-tag success, including the Edit
Content command-bar status; the primitives map 1:1 to the Claude Design green tones.
… fluid buttons (#35892) - Make the status p-tag a fully-rounded pill globally via CustomLaraPreset (tag.root: 9999px radius, 4px 12px padding, 600 weight) instead of a per-instance class, so a forgotten class can never make a tag look different. - Replace the statusSeverity template method with memoized computeds ($contentStatus via DotContentletStatusPipe + $statusSeverity), backed by a pure exported contentStatusSeverity() so the mapping stays unit-testable. Avoids the per-CD method call. - Use the native PrimeNG [fluid] input for full-width stacked workflow actions and the lock button instead of styleClass (class does not reach p-button's inner element).
…35892) Move the tag's hardcoded shape/typography values into a css block driven by Tailwind variables — same mechanism as the chip preset — instead of magic numbers: padding uses var(--spacing), font-weight uses var(--font-weight-semibold), and the full pill radius uses calc(infinity * 1px) (what Tailwind's rounded-full emits; there is no --radius-full).
…with the design (#35892) - Invert sidebar backgrounds to match the design: the panel is now white and the Workflow/Details sections sit in surface-50 cards (was a gray panel with white cards). - Sidebar width 360px (was 21.875rem ≈ 306px at the 14px root) and the left drop shadow is removed — only the thin border remains, per the design. - Accordion headers: chevron moved to the right, points up when expanded, and gains a surface-50 hover background. - Rename the "General" section to "Details" (new edit.content.sidebar.details.title key). - Details card redesigned to the design spec: a single surface-50 card with a key/value grid (Content type link, Modified by + initials avatar, Modified) and a footer holding the Copy Identifier button and a "View as JSON" link. The copy button moved out of the section header; Created/Published columns were dropped to match the design. - Tabs use an underline indicator (active border on the bottom, not the top) with no static tab background, via the global Tabs preset.
…er accordion titles (#35892) - Lock button, Actions tab tooltip and the Details section title now reuse existing, already-translated message keys (Unlock / Make-Editable, Actions, details) via the dm pipe instead of brand-new keys. New keys only resolve after a backend rebuild, so they rendered as raw uppercase keys in a running instance; the existing keys translate immediately. Removed the now-unused new keys. - The lock wording is action-based: "Lock for Editing" when unlocked, "Unlock" when locked. - Vertically center the collapsible section titles: the section had asymmetric padding (pt-0 pb-3) which pushed the header toward the top divider; it is now symmetric (py-3), and the title uses leading-none so the uppercase text sits on the true vertical center.
…o the hover no longer merges with the card (#35892)
…ing with the design (#35892) - Sidebar borders (panel edge, tab list, section dividers) now use the same surface-200 gray as the command bar instead of the darker gray-300/gray-400. - Lock button: keep the outlined treatment (drop the secondary fill so its background no longer differs from the other buttons); icon reflects state (lock/unlock). - Workflow card grid now mirrors the Details card exactly (same 110px/1fr columns, text size, gaps and muted-label / dark-value colors) so both cards read identically. - Add a divider between the workflow actions and the first collapsible section, and normalise the lock / actions / section vertical rhythm (pb-3 / py-3) so the gaps are consistent instead of the oversized space that appeared after the actions. - Tighten the command-bar item spacing (gap-2) so the status tag, preview, overflow menu and sidebar toggle sit closer together as in the design.
…erflow menu items flush and taller (#35892) - Actions tab content padding is 18px (was 14px) to match the design. - Command-bar overflow menu: items are flush (no list padding, no item border-radius) so the hover fills full width, and taller (py-3 on the item link) instead of cramped.
…ds to match the design (#35892)
…de + lock/actions spacing (#35892) - Collapsible sidebar sections now slide open/closed by animating the actual height via a grid-template-rows (0fr <-> 1fr) CSS transition with ease — a true slide-down/up that works for any content height, with no @angular/animations (avoids the deprecated trigger API) and no content fade. - Lock button bottom spacing and the workflow-actions top/bottom spacing are 14px (pb-4 / py-4).
Proposed Changes
Restructures the new Edit Contentlet command bar and side panel around a single Actions tab (#35892).
Command bar (
dot-edit-content-form)[status tag] | Preview … (overflow menu) ▢ (sidebar toggle)and made sticky on scroll.p-tag; the lock toggle and inline workflow actions were removed from the bar.dot-edit-content-command-bar-actionsoverflow (…) menu — Permissions, Rules (pages only), View references — which owns the dialog-open logic relocated from the deleted sidebar wrappers.generatePageEditUrlhelper in addition to URL-mapped content.Side panel (
dot-edit-content-sidebar)stackedmode on the shareddot-workflow-actions), first action primary. Firing stays in the form — the sidebar emitsworkflowActionFiredand the layout delegates toDotEditContentFormComponent.fireWorkflowActionvia itsviewChild, so all validation/wizard/push-publish logic is untouched.DotLocalstorageService; headers use the design's uppercase treatment.Removed the now-orphaned
dot-edit-content-sidebar-permissions/dot-edit-content-sidebar-ruleswrapper components (their dialogs are reused by the new overflow menu).Out of scope (by design): Locales content is untouched (tracked in #35889) — only its section becomes collapsible. The lock control is relocated only; the richer "Release Lock"/steal-lock flow is deferred. Workflow/Details card visual restyle was intentionally left for a later pass.
Checklist
yarn nx lint edit-content/yarn nx lint ui— pass (pre-existing warnings only)yarn nx test edit-content/yarn nx test ui— passyarn nx build dotcms-ui(AOT template type-check) — passyarn nx format:writeHow to test
[status tag] | Preview … ▢, sticks on scroll; no lock toggle / inline workflow actions.…menu opens Permissions, Rules (pages only) and View references; Settings tab is gone.…menu hidden.