Would it be possible to have the "tag with" command allow the creation of new tags?


#1

Would it be possible to have the “tag with” command allow the creation of new tags? I find myself reflexively typing Command-T and then realizing that the tag I want to add isn’t anywhere else in the document.


TaskPaper 3.6 Preview (282)
#2

I’ve moved this to a new topic… it’s something that I’ve wanted myself. But I can imagine scenarios where using it would be frustrating. I imagine it would work like:

  1. Type a tag.
  2. If there are not matches then Enter will insert that new tag
  3. Otherwise Enter will insert the selected choice

I think frustrating cases might come up where you are trying to enter new tag, but that new tag text is matching some existing tag. Not sure if this would be a real or just an imagined problem. Anyway I’ll likely try to add this feature, but if anyone has related thoughts on how to implement it better then above let me know.


#3

I think what I’m going to do is allow for an empty selection in the choice list when using Tag With… If the selection is empty then when you press Enter (and there is some text in the text field) that text will be used to create a tag. This way you’ll be able to add new tags through the Tag With UI even if they fuzzy match with existing tags.

I’m also looking to allow multiple selection in the Tag With UI. So you can apply/remove multiple tags at once. The only issue will be that I won’t be able to support (later with more work maybe) specialized behavior when selecting multiple tags (such as presenting a date picker panel for certain tags).


#4

Hey, @jessegrosjean, I like the “autoselect first match” behavior of the palette, so I have another idea: you could add a “Create new tag” item to the bottom of the list. If the new tag matches an old one, you just have to select “Create new tag”. If the new tag doesn’t match anything, the “Create new tag” would be autoselected.

This way, you bypass the problem you pointed without having to change the current behavior of the palette (what would frustrate users that are used to it) and you make explicit the creation of new tags.


#5

That won’t go away with the new design. The only difference with the new design is:

  1. If there are no items (because non match the filter) you can press Enter to create an item from the filter text.

  2. If you want to create a new tag … but when you type it out it’s still matching some existing tag, then you can Command-Click on the first auto-selected item, and then press Enter to create a new tag from the filter text.

I don’t think this change should effect existing workflows at all.

I did consider that… but I think with the way that choice paletts work (items filtering and resorting after each keystroke) it’s important that the items are as uniform as possible. I think it would be confusing to have something different (a “New Tag”) item to keep track of in that moving list.


#6

So it won’t be possible to do this using only the keyboard? And if it was possible to “select nothing” by pressing Arrow-up when the first item is autoselected (as if the focus went to the input)?

For example:

  1. The user launches “Tag With…”
  2. Type “day”
  3. @today is autoselected, but he wants to create a new tag @day
  4. He press Arrow-up and @today is unselected
  5. Then he press Enter and the tag @day is created

If after 4 he decides to use @today instead of creating the new tag @day, he simply press Arrow-down to select @today again.


#7

Not without a useful user suggestion … but yeah your idea sounds good! I’ll add it. :slight_smile: