Reserve the "New Document" submenu even when there's no templates available (was: "New Document" submenu support)
Use cases
It is a quite a common workflow(Microsoft Windows/KDE/XFCE) to create a new file by launching a contextual menu(i.e. right-clicking) in a folder view or a folder, traverse into a "New Document" submenu and select a template to initialize the file. This feature has disappeared since Ubuntu 17.?? and today I found the (shocking) fact that it is actually a no-longer-ported "Ubuntu patch" that has implemented the thing all along instead of a core functionality in the upstream codebase.
Desired behavior
There should be a "New Document" submenu in the folder contextual menu that features the templates in XDG_TEMPLATES_DIR
, and it should really be implemented in the upstream.
The "New Document" submenu in the folder contextual menu shouldn't be hidden by default when there are no templates in XDG_TEMPLATES_DIR
, instead, it should be available with no options or simply offers to "create an empty file" for demonstrative purpose.
Benefits of the solution
To eliminate another reason to dump GNOME Files in favor of, like, Thunar?
To avoid letting the user simply assume that this feature doesn't exist in the first place(which already happened) or falsely killed by GNOME developers just like the desktop icons
Possible drawbacks
Nothing in my mind so far.
The folder contextual menu will be more cluttered as a result of pertaining additional option, however, the behavior will be more consistent with other DEs and FMs. The XDG_TEMPLATES_DIR
should really be filled with useful templates like Lin-Buo-Ren/GNU-Bash-Shell-Script-Template: Easy-to-use shell script templates for GNU Bash for users to create new scripts. in the first place anyway.