nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.52k stars 4.08k forks source link

File template rework #46455

Open juliusknorr opened 4 months ago

juliusknorr commented 4 months ago

Our current ways to manage, organize and distribute file templates is a wild mix of old code and not very accessible to admins and end users.

The server provides the possibility for a user defined directory but there is no option to change it or see which folder that is.

Screenshot 2024-07-11 at 17 50 23

Additionally templates that we ship are only copied on user creation, so existing users will not get updated or new templates.

Collabora has additionally a separate config option for a user template directory and an admin Ui where admins can define instance wide templates:

Screenshot 2024-07-11 at 17 51 18 Screenshot 2024-07-11 at 17 50 55

Especially in larger organizations, defining and updating templates on the admin level is quite important, but also for us shipping new templates regularly this would be better way as currently those templates only reach new users.

My proposal to clean this up would be:

Open questions:

@nextcloud/designers for feedback

FYI @sorbaugh as it touches the area of files

juliusknorr commented 3 months ago

To be evaluated additonally:

juliusknorr commented 1 month ago

From discussion with @jancborchardt

Templates per team/group

Would be covered by the above

Delegating template management

Can be handled by admin delegation

Template per groupfolder Templates in Collectives could use the same mechanism

Could be done by an extra Templates folder for each collective/groupfolder but as a next step.

jancborchardt commented 1 month ago

Just talked about this a bit with @nimishavijay and there are 2 specific issues we came across:

joshtrichards commented 4 days ago

Good stuff! Sounds like this work will effectively cover #38198 and #25358 (including most of the follow-on comments therein).

Possibly big issue: With only having the templates in settings and not in a folder, they would not be synced to desktop. How can people create files using templates there?

User-level templates would still be derived from a user owned/controlled folder in the proposed design. At the admin-level, they'd manage (upload/etc) templates via Admin settings. And users don't need to be able to edit the system provided templates.

Less important: A lot of templates are folder-specific like e.g. invoices which are in one folder, or reimbursements which are in another. It’s a bit similar to team/group specific templates, but maybe a bit overkill to limit it like that.

I'm not sure how we'd handle folder specific templates, unless we started classifying folders... Wait, maybe we could associate templates with certain tags?... That would create the affiliation desired. Then the New button would activate for templates tagged the same as the folder the user is in.

joshtrichards commented 4 days ago

User template folder: No longer copy skeleton files, auto create templates folder but empty

Can maybe take care of the #31414 transition at the same time we touch the user template folder settings.