Skip to content

[BUG] Content Drive: hide Upload button when items are selected #36369

Closed

Description

@zJaaal

Problem Statement

While doing QA on Content Drive, the Upload button stays visible even when one or more items are selected in the content grid. If the user selects a folder and then uploads an asset, the asset is stored in the root folder instead of the selected one. From a user's perspective this is unintuitive: the selection implies an action context, but the upload silently ignores it and lands the asset somewhere unexpected.

The toolbar already establishes the correct pattern for this: when items are selected ($showWorkflowActions = selectedItems().length > 0), the "Add New" button is hidden and the workflow / bulk actions are swapped in. The Upload button was simply left out of that swap and is hardcoded as always-visible, so it remains clickable in a selection context where it doesn't belong.

Decision (agreed in Slack with Rafael Velazco, Melissa Rojas, and Jalinson Diaz): rather than redirecting the upload target to the selected folder — which would couple a spatial drag-and-drop gesture to a checkbox selection and introduce ambiguous UX — the Upload button should be hidden whenever there is any selection, consistent with how the "Add New" button already behaves. To upload into a specific folder, the user navigates into it (which sets the current folder) and uploads with no selection active.

Impact: Low severity, but a recurring source of confusion. Assets can end up in the wrong location with no clear indication of why.

Browser & OS: Reproducible in Chrome / macOS (browser-agnostic; pure front-end behavior).

Steps to Reproduce

  1. Go to Content Drive.
  2. Navigate to any folder context (e.g. site root).
  3. Select a folder (or any item) in the content grid via its checkbox/row selection.
  4. Note the Upload button is still visible in the toolbar.
  5. Click Upload and upload an asset.
  6. Observe: the asset is stored in the root/current folder, not the selected folder — and the Upload button should not have been available in this selection context in the first place.

Acceptance Criteria

  • When no items are selected, the Upload button is visible and behaves as today (uploads to the current/navigated folder).
  • When one or more items are selected (folders or content), the Upload button is hidden, consistent with the existing "Add New" button behavior.
  • The Upload button's hide/show transition uses the same animation pattern as the "Add New" button (no visual jank when toggling selection).
  • Drag-and-drop and upload-target logic are unchanged — only the Upload button's visibility is affected.
  • When the selection is cleared, the Upload button reappears.
  • Unit tests cover: button visible with empty selection, hidden with a single selection, and hidden with multiple selections.

dotCMS Version

Latest from main branch.

Severity

Low - Minor issue or cosmetic

Links

Activity

  1. added theissue type on Jun 30, 2026
  2. github-actions commented on Jun 30, 2026

    @github-actions
    Contributor
  3. moved this from New to In Progress in dotCMS - Product Planningon Jun 30, 2026
  4. changed the title [-]fix(content-drive): hide Upload button when items are selected[/-] [+][TASK] Content Drive: hide Upload button when items are selected[/+] on Jun 30, 2026
  5. changed the title [-][TASK] Content Drive: hide Upload button when items are selected[/-] [+][BUG] Content Drive: hide Upload button when items are selected[/+] on Jun 30, 2026
  6. moved this from In Progress to In Review in dotCMS - Product Planningon Jun 30, 2026
  7. removed their assignment
    on Jul 1, 2026
  8. moved this from In Review to QA in dotCMS - Product Planningon Jul 1, 2026
  9. self-assigned this
    on Jul 10, 2026
  10. rjvelazco commented on Jul 10, 2026

    @rjvelazco
    Member

    Passed QA

    • dotCMS Docker Image: [dotcms/dotcms:trunk_353278f]

    Video

    video.mov
  11. removed their assignment
    on Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions