fix(content-drive): hide Upload button when items are selected (#36369)#36371
fix(content-drive): hide Upload button when items are selected (#36369)#36371zJaaal wants to merge 4 commits into
Conversation
The toolbar already hides the "Add New" button and swaps in the workflow/ bulk actions when items are selected (via $showWorkflowActions = selectedItems().length > 0), but the Upload button was hardcoded as always-visible and left out of that swap. As a result it stayed clickable in a selection context, where an upload would land in the root/current folder rather than the selection — confusing users. Move the Upload button inside the same $displayButton() animation gate as "Add New" so both creation actions hide/show together on selection. No changes to upload-target logic or drag-and-drop. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @zJaaal's task in 1m 21s —— View job Rollback Safety Analysis
Verdict: ✅ Safe to Roll Back All changes in this PR are pure frontend (Angular template, TypeScript component, spec file) and documentation. Checked against every category in the rollback-unsafe reference:
Summary of changes:
No database migrations, no Elasticsearch changes, no API contract changes, no data transformations. Rolling back to N-1 requires no manual intervention. Label applied: AI: Safe To Rollback |
🤖 dotBot Review (Bedrock)Reviewed 4 file(s); 0 candidate(s) → 0 confirmed, 0 uncertain (unverified, kept for review). ✅ No issues found after verification. us.deepseek.r1-v1:0 · Run: #28466148233 · tokens: in: 10556 · out: 1850 · total: 12406 · calls: 4 · est. ~$0.024 |
The selection effect sets addNewButton:false immediately, so the hide is synchronous and asserted right after detectChanges(). Waiting for the delayed transition would mount dot-content-drive-workflow-actions, which needs MessageService (out of this unit test's scope). Add a comment so the synchronous assertion isn't mistaken for a missing animation wait. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Tick the box to add this pull request to the merge queue (same as
|
Proposed Changes
Fixes #36369
While doing QA on Content Drive, the Upload button stayed visible even when items were selected in the grid. Uploading in that state stored the asset in the root/current folder rather than the selection — confusing, since the selection implies an action context.
The toolbar already establishes the right pattern: when
selectedItems().length > 0($showWorkflowActions), the "Add New" button is hidden and the workflow/bulk actions are swapped in via the$displayButton()animation state. The Upload button was simply hardcoded outside that gate and left always-visible.This PR moves the Upload button inside the same
@if ($displayButton())block (with matching enter/leave animations), so both creation actions hide/show together on selection.Behavior
Per team decision (Slack thread), we hide the button rather than redirecting the upload target to the selected folder — this avoids coupling a spatial drag-and-drop gesture to a checkbox selection and the ambiguity that comes with it. No changes to upload-target logic or drag-and-drop.
Checklist
pnpm nx test portlets-content-drive— 672/672 passpnpm nx lint portlets-content-drive— cleanScreenshots
Manual QA: select one or more items in the grid → Upload button hides alongside "Add New"; clear the selection → both reappear.
🤖 Generated with Claude Code