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

enh: Migrate from custom webdav v4 handling to webdav v5 with @nextcloud/files #2312

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Feb 4, 2024

Lets use webdav v5 and helpers from @nextcloud/files instead of old webdav v4 with custom patching.

@susnux susnux added enhancement New feature or request 3. to review Waiting for reviews labels Feb 4, 2024
@susnux susnux added this to the Nextcloud 29 milestone Feb 4, 2024
@susnux susnux requested a review from artonge February 4, 2024 00:14
Copy link
Collaborator

@artonge artonge left a comment

Choose a reason for hiding this comment

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

Thanks for doing this 😍
I left a few questions/comments

src/services/DavRequest.ts Outdated Show resolved Hide resolved
src/services/PhotoSearch.js Outdated Show resolved Hide resolved
src/services/TaggedImages.js Show resolved Hide resolved
src/mixins/FetchFacesMixin.js Show resolved Hide resolved
src/mixins/FetchFilesMixin.js Outdated Show resolved Hide resolved
Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the reviewing process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR reviewing process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux requested a review from artonge March 23, 2024 17:24
@susnux
Copy link
Contributor Author

susnux commented Mar 23, 2024

@artonge I resolved the conflicts and merged in your suggestions, seems to work fine (did some testing).

export default `<?xml version="1.0"?>
import { getDavProperties, registerDavProperty } from '@nextcloud/files'

const recoginzeDAVProps = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const recoginzeDAVProps = [
const recognizeDAVProps = [

*/
export const getDefaultDavProps = () => {
if (props === null) {
recoginzeDAVProps.forEach(prop => registerDavProperty(prop))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not register them on load?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or maybe they should be passed in extraProps if they are recognize only

Comment on lines -141 to -144
<d:order>
<d:prop><nc:metadata-photos-original_date_time/></d:prop>
<d:descending/>
</d:order>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this removed?

Comment on lines +39 to +42
'nc:metadata-photos-size',
'nc:metadata-files-live-photo',
'nc:metadata-blurhash',
'nc:metadata-photos-original_date_time',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Those are not bound to the sidebar, shouldn't we register them in main.js instead ?

console.error('Failed to get tag content', id, error.response)
logger.error(`Failed to get tag content, id: ${id}`, { error })
} else {
logger.debug(error)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Still an error, no?

Suggested change
logger.debug(error)
logger.error(error)

"allowSyntheticDefaultImports": true,
"moduleResolution": "node",
"moduleResolution": "Bundler",
Copy link
Collaborator

Choose a reason for hiding this comment

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

IIRC, the Cypress error might be due to this change.

@@ -51,6 +52,12 @@ export default new Store({

plugins: [
(store) => {
// Initialize the `photosLocationFolder` state
getFolder(store.state.userConfig.photosLocation)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this doing the same thing twice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request feedback-requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants