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

Use the Vue store for spaces #6427

Merged
merged 3 commits into from
Feb 14, 2022
Merged

Use the Vue store for spaces #6427

merged 3 commits into from
Feb 14, 2022

Conversation

JammingBen
Copy link
Collaborator

@JammingBen JammingBen commented Feb 11, 2022

Description

Using the store for spaces integrates them seamlessly in our ecosystem and makes it easier to develop spaces even further. E.g. the properties of a space can now be altered without fetching all spaces again. This was achieved by introducing a "buildSpace" method, that transforms a space into a more generic resource object (just like regular files or shares).

Motivation and Context

Groundwork for #6284 (and basically all space-related issues)

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

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@ownclouders
Copy link
Contributor

Results for oCISSharingAndUpload https://drone.owncloud.com/owncloud/web/22694/66/1
The following scenarios passed on retry:

  • webUIUpload/upload.feature:94

@JammingBen JammingBen marked this pull request as ready for review February 11, 2022 15:43
Comment on lines +124 to +125
fileId: '',
mimeType: '',
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need those fields, afaik they will never be set

Copy link
Member

Choose a reason for hiding this comment

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

Depends on how the respective fields are used throughout the code. Sometimes there are string modifications applied - which don't work on undefined. IMO ok to keep them defined and empty, like it's done here. Will be cleaned up anyway once we refactor this to TypeScript.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The way I understood @kulmann , these fields should be available to keep they resource object "aligned" with the other resources. Maybe I got it wrong though, @kulmann ? Jan is right, some of these fields will never be set.

Comment on lines +215 to +218
if (!path) {
loadReadmeTask.perform(ref)
loadImageTask.perform(ref)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@AlexAndBear AlexAndBear left a comment

Choose a reason for hiding this comment

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

Looks impressive to me

Comment on lines +124 to +125
fileId: '',
mimeType: '',
Copy link
Member

Choose a reason for hiding this comment

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

Depends on how the respective fields are used throughout the code. Sometimes there are string modifications applied - which don't work on undefined. IMO ok to keep them defined and empty, like it's done here. Will be cleaned up anyway once we refactor this to TypeScript.

packages/web-app-files/src/helpers/resources.js Outdated Show resolved Hide resolved
packages/web-app-files/src/mixins/spaces/actions/rename.js Outdated Show resolved Hide resolved
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.

🚀

@ownclouders
Copy link
Contributor

Results for oCISSharingPublic1 https://drone.owncloud.com/owncloud/web/22718/67/1
💥 The acceptance tests pipeline failed. The build has been cancelled.

@sonarcloud
Copy link

sonarcloud bot commented Feb 14, 2022

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

73.1% 73.1% Coverage
0.0% 0.0% Duplication

@ownclouders
Copy link
Contributor

Results for oCISTrashbinUploadMoveJourney https://drone.owncloud.com/owncloud/web/22721/69/1
The following scenarios passed on retry:

  • webUIUserJourney/journey1.feature:11

@JammingBen JammingBen merged commit 8b6b445 into master Feb 14, 2022
@delete-merged-branch delete-merged-branch bot deleted the spaces-store branch February 14, 2022 09:45
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