Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[full-ci] Fix Vue 3 warnings #8285

Merged
merged 8 commits into from
Jan 23, 2023
Merged

[full-ci] Fix Vue 3 warnings #8285

merged 8 commits into from
Jan 23, 2023

Conversation

JammingBen
Copy link
Collaborator

@JammingBen JammingBen commented Jan 20, 2023

Description

Fix Vue 3 compat warnings to finally reach compatibility with Vue 3. Key changes:

  • Changed v-model behavior (value -> modelValue), see https://v3-migration.vuejs.org/breaking-changes/v-model.html for more details.
  • Added emitted events to emits: [] in each component.
  • Updated focus-trap to be compatible with Vue3.
  • Added deep: true when watching arrays because this is required now.
  • Got rid of $set
  • Added missing props to some components (mainly OcSelect).

The changes regarding compatConfig can be ignored most likely because it will be removed with #8288 anyways.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

@owncloud owncloud deleted a comment from update-docs bot Jan 23, 2023
@ownclouders
Copy link
Contributor

ownclouders commented Jan 23, 2023

Results for acceptance oC10 https://drone.owncloud.com/owncloud/web/31987/22/1

💥 The acceptance tests failed on retry. Please find the screenshots inside ...

webUITextEditor-textFile_feature-L21.png

webUITextEditor-textFile_feature-L21.png

webUITextEditor-textFile_feature-L29.png

webUITextEditor-textFile_feature-L29.png

webUITextEditor-textFile_feature-L50.png

webUITextEditor-textFile_feature-L50.png

webUITextEditor-textFile_feature-L80.png

webUITextEditor-textFile_feature-L80.png

webUITextEditor-textFile_feature-L81.png

webUITextEditor-textFile_feature-L81.png

webUITextEditor-textFile_feature-L82.png

webUITextEditor-textFile_feature-L82.png

webUITextEditor-textFile_feature-L83.png

webUITextEditor-textFile_feature-L83.png

webUITextEditor-textFile_feature-L84.png

webUITextEditor-textFile_feature-L84.png

@ownclouders
Copy link
Contributor

ownclouders commented Jan 23, 2023

Results for acceptance oCIS https://drone.owncloud.com/owncloud/web/31987/61/1

💥 The acceptance tests failed on retry. Please find the screenshots inside ...

webUITextEditor-textFile_feature-L21.png

webUITextEditor-textFile_feature-L21.png

webUITextEditor-textFile_feature-L29.png

webUITextEditor-textFile_feature-L29.png

webUITextEditor-textFile_feature-L50.png

webUITextEditor-textFile_feature-L50.png

webUITextEditor-textFile_feature-L80.png

webUITextEditor-textFile_feature-L80.png

webUITextEditor-textFile_feature-L81.png

webUITextEditor-textFile_feature-L81.png

webUITextEditor-textFile_feature-L82.png

webUITextEditor-textFile_feature-L82.png

webUITextEditor-textFile_feature-L83.png

webUITextEditor-textFile_feature-L83.png

webUITextEditor-textFile_feature-L84.png

webUITextEditor-textFile_feature-L84.png

Comment on lines -39 to -55
AcceptShare,
Copy,
CreateQuicklink,
DeclineShare,
Delete,
DownloadArchive,
DownloadFile,
EmptyTrashBin,
Favorite,
Move,
Paste,
Navigate,
Rename,
Restore,
ShowActions,
ShowDetails,
ShowEditTags,
Copy link
Collaborator Author

@JammingBen JammingBen Jan 23, 2023

Choose a reason for hiding this comment

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

FYI: Those were registered twice because they are already included in the generic FileActions mixin.

@dschmidt dschmidt force-pushed the fix-vue3-warnings branch 2 times, most recently from a3bf55a to 3a51714 Compare January 23, 2023 15:06
@sonarcloud
Copy link

sonarcloud bot commented Jan 23, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

64.8% 64.8% Coverage
1.4% 1.4% Duplication

Copy link
Member

@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.

Nice one! ❤️

data-testid="files-switch-hidden-files"
:label="$gettext('Show hidden files')"
@update:checked="updateHiddenFilesShownModel"
Copy link
Member

Choose a reason for hiding this comment

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

To my understand of https://v3-migration.vuejs.org/breaking-changes/v-model.html#migration-strategy the @update:checked event listener is not needed - at least with your implementation of the handler. It just updates the hiddenFilesShownModel data prop to the event value. According to the migration guide that is already the case for v-model:checked ( / v-model:whatever-custom-key).

@@ -32,6 +32,7 @@
@fileClick="$_fileActions_triggerDefaultAction"
@rowMounted="rowMounted"
@sort="handleSort"
@update:selectedIds="selectedResourcesIds = $event"
Copy link
Member

Choose a reason for hiding this comment

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

Same here again, the listener should not be needed.

@@ -28,6 +28,7 @@
@fileClick="$_fileActions_triggerDefaultAction"
@rowMounted="rowMounted"
@sort="sortHandler"
@update:selectedIds="selectedResourcesIds = $event"
Copy link
Member

Choose a reason for hiding this comment

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

Same here again, the listener should not be needed.

@@ -29,6 +29,7 @@
@fileClick="$_fileActions_triggerDefaultAction"
@rowMounted="rowMounted"
@sort="handleSort"
@update:selectedIds="selectedResourcesIds = $event"
Copy link
Member

Choose a reason for hiding this comment

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

Same here again, the listener should not be needed.

@@ -30,6 +30,7 @@
@fileClick="$_fileActions_triggerDefaultAction"
@rowMounted="rowMounted"
@sort="handleSort"
@update:selectedIds="selectedResourcesIds = $event"
Copy link
Member

Choose a reason for hiding this comment

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

Same here again, the listener should not be needed.

@@ -63,6 +63,7 @@
@fileClick="$_fileActions_triggerDefaultAction"
@rowMounted="rowMounted"
@sort="handleSort"
@update:selectedIds="selectedResourcesIds = $event"
Copy link
Member

Choose a reason for hiding this comment

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

Same here again, the listener should not be needed.

@@ -36,6 +36,7 @@
:space="space"
:has-actions="showActions"
@sort="handleSort"
@update:selectedIds="selectedResourcesIds = $event"
Copy link
Member

Choose a reason for hiding this comment

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

Same here again, the listener should not be needed.

@kulmann kulmann merged commit ec27b69 into master Jan 23, 2023
@delete-merged-branch delete-merged-branch bot deleted the fix-vue3-warnings branch January 23, 2023 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants