Uh oh!
There was an error while loading. Please reload this page.
File templates - #25090
Conversation
This comment has been minimized.
This comment has been minimized.
skjnldsv
commented
Jan 14, 2021
skjnldsv
commented
Jan 14, 2021
I think that is fine as is, no? Do we need a custom setting to allow users to change the folder name? |
juliusknorr
commented
Jan 14, 2021
I think we should still offer changing the path in case you have your templates somewhere else, but I'd leave that to @jancborchardt to decide. |
jancborchardt
commented
Jan 14, 2021
Yoooo super nice work @juliushaertl! Already looks very good. 2 small pieces of feedback before I look more into the design and templates:
Yes, probably makes sense to have that in the bottom left settings as "Templates folder". Especially if people just sync their normal folders and on different operating systems they have different naming conventions. |
juliusknorr
commented
Jan 15, 2021
Forwarding all the praise for the nice looking UI to @skjnldsv 👏 |
skjnldsv
commented
Jan 15, 2021
No, that's not how the new file menu was designed.
👍 |
37862d2 to
0d50147Compare1c9c031 to
a899278Compareba56348 to
a474041Comparea474041 to
e2cd842Comparee2cd842 to
a94db75Comparea94db75 to
4fc3d42Comparejuliusknorr
commented
Jan 26, 2021
Time to get this in 🏓 for reviews |
Found some things (maybe they can be done now or in a followup)
|
rullzer
left a comment
There was a problem hiding this comment.
See my comment. I guess some can be moved to follow up tickets some should be fixed here.
But the general concept with text works! Whoohoo
ChristophWurst
left a comment
There was a problem hiding this comment.
some feedback on the OCP changes :)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
juliusknorr
commented
Jan 27, 2021
Thanks a lot, makes all sense. I'll adjust that tomorrow morning. |
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
…mplates by default Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
…isting directories Signed-off-by: Julius Härtl <jus@bitgrid.net>
…type registration lazy Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
bb6fdd4 to
c1a25eaComparejuliusknorr
commented
Jan 28, 2021
/compile amend / |
| /** | ||
| * Register a template type support | ||
| * | ||
| * @param callable(): TemplateFileCreator $callback A callback which returns the TemplateFileCreator instance to register |
There was a problem hiding this comment.
nit: @psalm-param callable():TemplateFileCreator $callback
ChristophWurst
left a comment
There was a problem hiding this comment.
Tested with Text and works flawless (once I figured out how it actually works, I expected new entries in the + menu somehow)
👍 💯 ![]()
c1a25ea to
5197006CompareSigned-off-by: Julius Härtl <jus@bitgrid.net>
af18372 to
63a2ea8Comparejuliusknorr
commented
Jan 28, 2021
Ok, bundles happy after i removed the stupid random files i committed 🙈 |
juliusknorr
commented
Jan 28, 2021
Follow up polishing tasks are in #25358 |
| fileType: actionSpec.fileType, | ||
| actionHandler: actionSpec.actionHandler, | ||
| }); | ||
| checkFilename: actionSpec.checkFilename |
There was a problem hiding this comment.
@juliushaertl do you recall why/where we're actually using this?
There was a problem hiding this comment.
No I cannot remember anything in that regard 🙈
Also no other occurrence in my local checkouts, so I'd say this can be dropped.
There was a problem hiding this comment.
Good! I'll see with the new implementation :)

Fixes#22426
OCP.InitialState.loadState('files', 'templates')OCP.InitialState.loadState('files', 'template_path'), will throw an error if no template path is availableSeparate pull requests
Possible follow up enhancements
Editor app integrations
API endpoints
GET /ocs/v2.php/apps/files/api/v1/templates
Example response:
POST /ocs/v2.php/apps/files/api/v1/templates/create
Parameters:
200 Success
403
POST /ocs/v2.php/apps/files/api/v1/templates/path
Parameters:
200 Success