Skip to content

Conversation

@JammingBen
Copy link
Contributor

Allows copy pasting items into the current folder and refactors the component to script setup on the way. Also fixes an issue where disabled secondary buttons would have a hover effect.

fixes #371

@JammingBen JammingBen self-assigned this Mar 20, 2025
Copilot AI review requested due to automatic review settings March 20, 2025 08:49
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 pull request enables copy pasting items into the current folder and refactors the CreateAndUpload component to use script setup while also fixing a hover effect issue on disabled secondary buttons.

  • Updates unit tests to validate paste action behavior for both cut and copy scenarios.
  • Modifies the CSS in OcButton.vue to prevent hover styling on disabled outline buttons.
  • Refactors CreateAndUpload.vue to adopt a script setup pattern and update computed properties accordingly.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/web-app-files/tests/unit/components/AppBar/CreateAndUpload.spec.ts Updates tests to use unref on upload complete callbacks and adjusts test cases for paste actions.
packages/design-system/src/components/OcButton/OcButton.vue Adjusts the hover CSS selector to exclude elements with a disabled attribute.
packages/web-app-files/src/components/AppBar/CreateAndUpload.vue Converts the component to script setup, updates prop destructuring and computed properties for permission and action handling.
Comments suppressed due to low confidence (1)

packages/web-app-files/src/components/AppBar/CreateAndUpload.vue:364

  • The variable 'sameFolder' is used in the calculation but is not declared in the diff. Declare 'sameFolder' or update the logic to avoid referencing an undefined variable.
const fileIsInCurrentPath = spaceId === unref(computedSpace).id && sameFolder

@JammingBen JammingBen requested a review from kulmann March 20, 2025 09:59
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.

works like a charm 🥇

@JammingBen JammingBen merged commit 4bf2881 into main Mar 20, 2025
@JammingBen JammingBen deleted the fix/copy-paste-into-current-folder branch March 20, 2025 11:37
This was referenced Mar 20, 2025
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.

Resource can't be pasted into same folder

3 participants