refactor(content-drive): trim quick actions to the old-search bulk operations - #37073
refactor(content-drive): trim quick actions to the old-search bulk operations#37073rjvelazco wants to merge 3 commits into
Conversation
Removes Publish, Unpublish, Archive, Unarchive and Delete from the Action Center's Quick Actions. They are the scheme's own actions and are already reachable through the Workflow Actions section, where they resolve to whatever the content type's scheme maps them to — which is the accurate answer for a scheme that maps PUBLISH to something other than a plain publish. What is left mirrors what the old search offered outside the workflow dropdown: Lock, Unlock and Add to Bundle wired, plus Push Publish and Refresh rendered as disabled placeholders with a "Work in progress" badge and an explanatory tooltip. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Follows the quick-action trim. Three things were left behind with no remaining caller: - `danger` on the quick action def and rendered shape, plus the two red styling branches in the template. Every remaining action is non-destructive, so the flag was permanently false. - The confirmation path: `confirmMessage` on both interfaces, the `confirmationService.confirm` branch, the `ConfirmationService` provider and injection, `ConfirmDialogModule`, and the `<p-confirmDialog>` element. Delete carried the only `confirmMessage`, and nothing else in the dialog opened a confirm. - Their tests, and the doc comments that still described Publish and Delete as quick actions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
❌ Issue Linking RequiredThis PR could not be linked to an issue. All PRs must be linked to an issue for tracking purposes. How to fix this:Option 1: Add keyword to PR body (Recommended - auto-removes this comment)
Option 2: Link via GitHub UI (Note: won't clear the failed check)
Why is this required?Issue linking ensures proper tracking, documentation, and helps maintain project history. It connects your code changes to the problem they solve. |
|
Claude finished @rjvelazco's task in 1m 43s —— View job Review — PR #37073
I reviewed the full diff against New IssuesNo issues found. What I verified:
Notes (non-blocking)
`` |
|
Route 2 is now open for comparison: #37075 — keeps the state actions and gates them on the workflow Default Action mapping, rather than removing them. Both are drafts and are meant to be read against each other:
|
What this does
Narrows the Action Center's Quick Actions section to the bulk operations the old content search offered outside its workflow dropdown.
Why remove the five state actions
They are already offered by the Workflow Actions section below, as the scheme's own actions.
That is not a duplicate — it is a more correct answer. A quick action fires
POST /v1/workflow/actions/default/fire/{systemAction}, which resolves through the scheme's Default Actions mapping. If a content type's scheme mapsPUBLISHto something other than a plain publish, the quick-action row labelled "Publish" and the workflow row labelled "Publish" do different things. Two rows with the same label and different behaviour is worse than one row that resolves correctly.Lock and Unlock stay because they are genuinely per-user state on the version info, not a workflow transition — they have no scheme action to defer to. (
WorkflowAPI.SystemActiondocuments this: they carry no actionlet and mapping them has no effect.)Why the placeholders are rendered rather than hidden
Push Publish and Refresh are actions the old search does offer. Leaving them out entirely makes Content Drive look like it dropped them; a disabled row with a
Work in progressbadge and an explanatory tooltip is the honest state. Neither is wired:DotWorkflowPushPublishComponent)._bulkrefresh, which streams progress over SSE and is not job-backed, so it cannot reuse the synchronousbulkFirepath the other quick actions run on.Both count over the whole selection rather than sitting at
0— a0would read as "does not apply to these items", a different and untrue claim from "not built yet". The row is disabled by itscomingSoonflag, not by its count.Commits
comingSoonflag, template, specs.danger(permanentlyfalseonce the destructive rows left, plus its two red-styling branches), the entire confirmation path (confirmMessage, theConfirmationServiceprovider/injection,ConfirmDialogModule,<p-confirmDialog>, andfireQuickAction, which existed only so the confirm and direct branches could share a path), their tests, and doc comments still describing Publish and Delete as quick actions.i18n
One key added:
content-drive.action-center.coming-soon. Labels reuse the legacyRemote-PublishandRefreshkeys the old search already uses, so the parity is free in every translation. The badge reuses the existingcontent-drive.work-in-progress.Known leftovers — deliberate, flagging for review
Two keys are now orphaned repo-wide (
core-webanddotCMS/srcboth grep clean):content.drive.worflow.action.delete.confirmcontent-drive.action-center.confirm.headerLeft in
Language.propertieson purpose: removing i18n keys is a different risk profile (customer overrides and plugins can reference them), and route 2 may bring destructive quick actions back. Happy to delete them if reviewers prefer.Testing
pnpm nx test portlets-content-drive— 1240 passed, 32 suitespnpm nx affected -t lint --base=main— clean, 4 projectspnpm nx format:check --base=main— cleanNew coverage: placeholders render disabled with the badge, the click guard holds if a call ever gets past the disabled attribute, the five state actions are absent from the list, and the display order is pinned.
Not done here
Manual QA in a running instance. The dialog is covered by unit tests only; someone should click through Lock/Unlock/Add to Bundle against real content before this stops being a spike.
🤖 Generated with Claude Code