fix(files): Allow to set node name before creating + bring back new-file highlingting
- Resolves: #42097
- Resolves: #41260
- Resolves: #43052
- Resolves: #43051
Summary
Most important: This brings back the ability to select a folder name before creating it - this is required for shares where you can create but not update.
This feature is reused for all new-menu entries, meaning also for new template folder and new files like new text files if text app is installed.
Moreover this fixes:
- The file name is not editable: see above
- The file entry is not highlighted: This was already possible or planned as the styles were available but the class was not assigned, this is now done.
- The file does not open automatically after confirming the new name: This was more tricky as files does not provide e.g.
files:node:openbut opening a file is left as a action provided by the viewer app. So this is now handled by searching for the view action and if not available then at least open the sidebar for more details.
Workflow (screen cast)
https://github.com/nextcloud/server/assets/1855448/1fd31ea3-8bc4-4c3a-b933-2323e554c691
Checklist
- Code is properly formatted
- Sign-off message is added to all commits
- [ ] Tests (unit, integration, api and/or acceptance) are included
- [x] Screenshots before/after for front-end changes
- [x] Documentation (manuals or wiki) has been updated or is not required
- [x] Backports requested where applicable (ex: critical bugfixes)
/backport to stable28
Other than the highlight simplification we talked about, I'm good for this 👍
Removed that :+1:
:shipit:
Doesn't seem to work for Text files, but works nicely for folders <3
Not fixed in 28.0.3 While I can create a file name, the document does not open. Correct behavior is creating a file name and then the document should open automatically. NC27 works fine/appropriately.
If you do not have any templates, this indeed does not work. Somehow I missed on of the node:focus events when removing them.