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 server-side space template logic #10644

Closed
kobergj opened this issue Mar 20, 2024 · 7 comments
Closed

Use server-side space template logic #10644

kobergj opened this issue Mar 20, 2024 · 7 comments
Assignees

Comments

@kobergj
Copy link
Contributor

kobergj commented Mar 20, 2024

Currently when creating a space, the webclient will fire several requests:

  • POST to create the drive
  • MKCOL to create the .space folder
  • PROPFIND to find the id of the .space folder
  • PUT to upload the readme.md
  • PROPFIND to find the id of the readme.md
  • PATCH to patch the drive with the special id of the readme.md

Since owncloud/ocis#8558 the server is able to do all this work for the client(s)

The improved requests would look like this:

  • POST to create the drive, add the parameter "template=default"

This will create the drive, the .space folder, the readme.md and a default space image.

A benefit of this approach is that other clients can reuse this logic when they want to create spaces. This will lead to a consistent behaviour between all clients.

@tbsbdr
Copy link

tbsbdr commented Mar 20, 2024

@kobergj can you add a user story or is it tech dept?

@kobergj
Copy link
Contributor Author

kobergj commented Mar 20, 2024

I would say it is technical debt. That is why I added that label. But maybe webbies don't agree?

cc @JammingBen (just to mention anyone from web team 😉 )

@JammingBen
Copy link
Contributor

I agree that it's a technical debt 👍 There is no direct value for an end-user, however, much so for us devs.

@JammingBen JammingBen moved this from Qualification to Refactor / Technical Debt in Infinite Scale Team Board Mar 20, 2024
@kulmann
Copy link
Member

kulmann commented Mar 21, 2024

While I don't see it coming at the moment that other clients will allow users to create spaces, this is an awesome improvement for the web client alone. Agreeing that it's technical debt, but it also improves server load (less requests is always a good thing). Nice 💪

@AlexAndBear
Copy link
Contributor

AlexAndBear commented Mar 21, 2024

Wonderful 😍 we need to check how we can set the template when the space already exists. (Somebody could have removed the .space folder)

@AlexAndBear AlexAndBear self-assigned this Mar 21, 2024
@AlexAndBear
Copy link
Contributor

Talked with @kobergj and @tbsbdr Bout this. This is not necessary and we shouldn't create a default readme, while just uploading an image and the .space folder is missing (current implementation). So we can omit that code aswell.

@AlexAndBear
Copy link
Contributor

Fixed via #10656

@github-project-automation github-project-automation bot moved this from Refactor / Technical Debt to Done in Infinite Scale Team Board Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

5 participants