Making new "Tracker Submenu Template" more accessible

Thanks to Ilmari “ilzu” Siiteri, with hrev57887 Tracker gained new features concerning “New” templates.

Any file put into /boot/home/config/settings/Tracker/Tracker New Templates/ appears in Tracker’s “New” context menu. Choosing it creates that file in the current folder.

Likewise, you can put a folder there, name it “Email folder” and copy the attribute columns from an existing email folder there and resize it to you liking. E pronto, you can create nicely layouted folders from that template.

Now, if you add the attribute _trk/_template_submenu to a folder in there, it becomes a submenu with all the files in the folder becoming items in that submenu.
Here I put some files into “Dev files”:

NewSubmenu

Now aside from the folder templates (here “Email folder”) probably looking better when sorted to the top - I’ll file a ticket for that soon…

Any ideas how to make that turning-a-folder-into-a-submenu process more user friendly and discoverable?

Currently it’s done by creating a folder e.g. “MySubmenuName” and assigning the _trk/_template_submenu in Terminal, like this:

addattr -t bool _trk/_template_submenu true MySubmenuName

7 Likes

Reading the ticket that patch refers to, there are comments by… mmm… humdinger that look like a nice solution at least for new installations:

Especially, if the “Tracker New Templates” folder already shows the new attribute column and is already used.

Seeing how other columns are listed in the Attributes menu (in particular, one of them depends on whether we are in Trash), it may not be difficult to include it for the templates folder.

@humdinger I was going to ask you how to add new translatabe strings to User guide about that, but you got to write this topic before I got to write you the message. I think that an info box to section where the tracker new templates are talked about with a text something along the lines of “Pro user tip: If you have lots of templates, you can organize them to sub menus by using _trk/_template_submenu attribute with boolean value of true”.

I guess this only works on nightly? I got a bunch of templates in there, some sorting could be handy I guess, although I haven’t had a need for it for now. :slight_smile:

Yep. And a recent nightly too, the change was merged on 30th July.

Thought so, could check it in qemu I guess, but as mentioned not a real need for it atm, I’m good. :smiley:

I’m still not completely sold. You mean the “Attributes” menu always shows a “Submenu” item, no matter if there’s a folder with the _trk/_template_submenu present?
That could work, but the user still has to comprehend what the “Submenu” item does and they have to set it to “0” or “1”. Sure, it’s a “poweruser” feature that one can expect having to read up on…

It feels a bit complicated to special-case folders in Tracker…

In any case, I’m still of the opinion that the simple and intuitive way would be to have empty folders act as folder-templates (displayed columns, size) and folders with files in them act as submenus.
IMO situations where you’d want a complete “project” template that creates a folder with some template files in it should be quite rare. The example in the ticket of a folder with a couple of source files is already solved by using a brilliant IDE, like Genio. :slight_smile:

2 Likes

Doesn’t seem to take in the *.recipes I have in there. :wink: (granted, those aren’t source files) :smiley:

This should work… Feel free to open a new thread and detail what exactly you want to achieve and how you tried. :slight_smile:

How about monitoring the templates folder? When a folder is created there, there should be a prompt like “Do you want to set %folder as a submenu?”; if the user agrees, the attribute is applied

I won’t file a ticket on that. After creating a few test submenus and folders, I actually prefer the current order:

New

The custom submenus visually separate the fixed “New folder” from the custom folder templates.

That’s done at the user guide online tool. I’ll add the info soon.

Maybe, instead of creating all sorts of special-casing of the “Tracker New Template” folder, folder-monitoring and user-harassing alerts ( :slight_smile: ), we should just add a few submenus and folder templates as I did in the screenshot above by default.
That way the user probably makes the connection that some folders are actual folder-templates and some are submenus. Once thus enlightened, the user either looks into the user guide what’s up with that, or does the smart thing: To create their own folder-template or submenu, duplicate (ALT+D) one of the existing ones and edit it…

3 Likes

OK, everyone, I think I got it:

How about we add an “Add new submenu…” item at the bottom, below “Edit templates…”? It will open the “Tracker New Menu” folder just like “Edit templates…”, create a new folder “New submenu” with the _trk/_template_submenu attribute set to true and select it in editing mode so the user can rename it right away.

2 Likes

Sounds like a clean sollution, should try this out in a nightly in qemu. :+1:

@humdinger, Otherwise I’d say that approach is fine, but, alas, there is one problem: the menu supports
nested submenus, and with that approach wouldn’t make them accessible.

Sounds about right, Humdinger. But let’s not have this go on indefinitely. One or two levels of submenu should be enough for anybody.

I don’t think that speaks against the approach, which I BTW just submitted as https://review.haiku-os.org/c/haiku/+/7931. I think power-users that use nested submenus understand the concept of the “submenu-folder” and manage to move submenu-folders into other submenu folders to get a hierarchy.

I don’t see a need to artificially set a limit. If people want an 8 deep menu there… :slight_smile:

Perhaps the “Add new submenu” menu item should be added to the submenus too? Then it would make the nested submenus available to non-power users too.

That’s an idea. Let’s work on that when the mentioned patch is fit to merge. There’s a little issue that needs solving first, see the patch at Gerrit…

The “Add new submenu…” change has been merged into the beta5 branch. I’ve updated the User Guide (at the online tool). Every translator is encouraged to update this and all the other additions since beta4. There isn’t much time left, I think…