Repository navigation
feat(files): choose personal template folder in Files settings - #64679
juliusknorr wants to merge 6 commits into
Conversation
94a33b8 to
37d3baf
Compare
elzody
left a comment
There was a problem hiding this comment.
If I name the template directory something like "Personal Templates" it seems like richdocuments has a hard time with that, as it expects "Templates" or something by default. But if we are eventually removing the ability to change the personal template directory there and keeping it in Files, then we should just probably default to whatever the server tells us is the configured template directory (or a sane default). That said, I found this out because after creating a document from a template for the first time it fails to open, but then re-opening it is fine - I think richdocuments just can't find the template given.
Otherwise, a few comments, but looks OK so far.
Assisted-by: Codex:gpt-6-astra Signed-off-by: Julius Knorr <jus@bitgrid.net>
Assisted-by: Codex:gpt-6-astra Signed-off-by: Julius Knorr <jus@bitgrid.net>
Assisted-by: Codex:gpt-6-astra Signed-off-by: Julius Knorr <jus@bitgrid.net>
Assisted-by: Codex:gpt-6-astra Signed-off-by: Julius Knorr <jus@bitgrid.net>
Inject the user ID as nullable and throw NotLoggedInException when no user is set. Mock IUserFolder in the tests to match the declared return type of IRootFolder::getUserFolder and restructure setPath so psalm no longer reports a redundant condition. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
Pass the explanation as the description of NcAppSettingsSection so it uses the same text offset as the heading instead of a plain paragraph. Query the open folder action as a link in the spec, as NcButton with an href renders an anchor. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
37d3baf to
64cf1ce
Compare
|
Thanks for catching the richdocuments issue. richdocuments only looked for user templates in its own folder setting or |
Managing the personal template folder was unintuitive and hard to explain. Files settings now has a dedicated "Templates" section to pick an existing folder, open it or clear the selection. Changing it never moves, copies or creates files. The "Create templates folder" entry in the New menu is removed.
API:
GET/PUT /ocs/v2.php/apps/files/api/v1/templates/pathread and set the folder (validated as an existing, readable folder inside the user's home).First step towards #46455. Richdocuments needs nextcloud/richdocuments#6324 so it resolves templates from this folder.
Tested with unit tests and in a local instance. AI-assisted.