Skip to content

Conversation

@JammingBen
Copy link
Contributor

@JammingBen JammingBen commented Nov 18, 2025

Fixes several issues with the click behavior in the embed mode.

  • hide select all checkbox in tiles view with file picker enabled
  • fix click behavior in tiles view with embed enabled
  • make tiles not selectable via keyboard with file picker enabled
  • prevent files from getting downloaded when selecting them in table view with file picker enabled

Moves quite a bit of shared logic between the table and the tiles view into one helper composable. Mainly the ones for clicking files (or their containers/checkboxes).

fixes #1628
part of #1518

@JammingBen JammingBen self-assigned this Nov 18, 2025
@JammingBen JammingBen force-pushed the fix/embed-click-behavior branch 3 times, most recently from fb83f67 to 4ce8fa1 Compare November 18, 2025 13:19
@JammingBen JammingBen marked this pull request as ready for review November 18, 2025 13:30
Copilot AI review requested due to automatic review settings November 18, 2025 13:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes click behavior issues in embed mode by consolidating shared logic between table and tiles views, addressing problems with file selection, navigation, and the file picker functionality.

Key Changes:

  • Introduced useResourceViewHelpers composable to centralize click handling logic for both ResourceTable and ResourceTiles components
  • Fixed tile view to properly handle file picker mode by hiding the select-all checkbox and preventing unintended file downloads
  • Removed deprecated useToggleTile composable in favor of the new shared helper functions

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/web-pkg/src/composables/resources/useResourceViewHelpers.ts New composable consolidating click handling logic for file containers, file names, and checkboxes
packages/web-pkg/src/composables/resources/index.ts Exports new useResourceViewHelpers composable
packages/web-pkg/src/composables/selection/useToggleTile.ts Removed deprecated composable, replaced by useResourceViewHelpers
packages/web-pkg/src/composables/selection/index.ts Removed export of deprecated useToggleTile
packages/web-pkg/src/components/FilesList/ResourceTiles.vue Refactored to use new helper composable, added file picker checkbox hiding
packages/web-pkg/src/components/FilesList/ResourceTile.vue Updated event emissions to use new naming convention
packages/web-pkg/src/components/FilesList/ResourceTable.vue Refactored to use new helper composable, simplified click handlers
packages/web-pkg/tests/unit/components/FilesList/ResourceTiles.spec.ts Updated test to reflect new event emission names

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Fixes several issues with the click behavior in the embed mode.

- hide select all checkbox in tiles view with file picker enabled
- fix click behavior in tiles view with embed enabled
- make tiles not selectable via keyboard with file picker enabled
- prevent files from getting downloaded when selecting them in table view with file picker enabled

Moves quite a bit of shared logic between the table and the tiles view into one helper composable.
@JammingBen JammingBen force-pushed the fix/embed-click-behavior branch from 4ce8fa1 to 6d952a2 Compare November 18, 2025 13:32
@JammingBen JammingBen requested a review from kulmann November 18, 2025 13:33
:src="resource.thumbnail"
:data-test-thumbnail-resource-name="resource.name"
@click="toggleTile([resource, $event])"
@click.stop="$emit('tileClicked', [resource, $event])"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why tileClicked exists, it is never consumed anywhere 🙈

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's consumed in the ResourceTiles component.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, didn't check for @tile-clicked... -.- sorry for the noise

@JammingBen JammingBen requested a review from kulmann December 1, 2025 09:13
Copy link
Contributor

@kulmann kulmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

@kulmann kulmann merged commit 2f5425d into main Dec 2, 2025
28 checks passed
@kulmann kulmann deleted the fix/embed-click-behavior branch December 2, 2025 07:52
openclouders pushed a commit that referenced this pull request Dec 2, 2025
@openclouders openclouders mentioned this pull request Dec 2, 2025
1 task
@openclouders openclouders mentioned this pull request Dec 15, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Embed mode click area for selection

3 participants