Tags and Starting the List field

113 views
Skip to first unread message

TonyM

unread,
Apr 27, 2020, 10:20:29 PM4/27/20
to TiddlyWiki
Folks,

Here is a Question I have, but it includes some tag handling information new users may appreciate.

Quick Question: If I tag a set of tiddlers with a tagname 
  • I can use <<tag tagname>> to generate a tag pill or use the one that appears in the tag list.
  • From the drop down 
    • I can click on the tagname to create it
    • Or I can drag and drop the list to reorder them
  • At the moment one tries and reorder the items so tagged
    • A List field is created on the tag tiddler (or a virtual one)
    • The list field contains a list of tiddlers using that tag
  • The are operators, widgets and macros available for handling listops
    • The membership and order of items in a list
    • Some are aware of the field named "list"
Now my Question

  • How can I cause the list field to be created and Populated on a tag tiddler without first manually trying to re-order tags?
Why?
  • I would like to make use of the list field without the user being instructed to drag the order just so it is populated.

Regards
Tony 

Mat

unread,
Apr 28, 2020, 4:15:35 AM4/28/20
to TiddlyWiki
Can't you just $setfield?

The following probably has the wrong syntax but it's just to illustrate the strategy:

\define setlist(tag)
<$button>
<$set name=tids filter="""[tag[$tag$]]""">
<$action-setfield $tiddler="""$tag$""" list=<<tids>>/>
</
$set>
</$button>
\end

(Hm, surely you know this already,Tony?)

<:-)

PMario

unread,
Apr 28, 2020, 4:51:29 AM4/28/20
to TiddlyWiki
On Tuesday, April 28, 2020 at 4:20:29 AM UTC+2, TonyM wrote:
Quick Question: If I tag a set of tiddlers with a tagname 
  • I can use <<tag tagname>> to generate a tag pill or use the one that appears in the tag list.
  • From the drop down 
    • I can click on the tagname to create it
    • Or I can drag and drop the list to reorder them
  • At the moment one tries and reorder the items so tagged
    • A List field is created on the tag tiddler (or a virtual one)
There are no "virtual tiddlers". Not sure what that means.
  • How can I cause the list field to be created and Populated on a tag tiddler without first manually trying to re-order tags?
At the moment, there is no mechanism that does this automatically. ... If a tag-list is "hardcoded", fore every tiddler that is part of the list _and_ has a field "list-before / list-after", those fields are removed. see: https://tiddlywiki.com/#list-tagged-draggable%20Macro

Why?
  • I would like to make use of the list field without the user being instructed to drag the order just so it is populated.
That's not possible, because of list-before and list-after. Think about it. 

-mario


TonyM

unread,
Apr 28, 2020, 5:35:46 AM4/28/20
to TiddlyWiki
Mat

I wanted to avoid the need for an additional step. An extra button click that I have to ask the user to take.

However the tool that uses the lists has a select widget which I may be able to use a conditional action on. The question is, is there an action such as list ops that will result in the list field being populated. In many ways this is only when managing a list field in a tag because in the other lists I will action each new member of the list. The Story list is also maintained.

Thanks for the feedback
Regards
Tony

TonyM

unread,
Apr 28, 2020, 5:47:39 AM4/28/20
to TiddlyWiki
Mario

When it says list before and list after is remove is this deleted from the source tiddlers?

by virtual tiddler I am talking about tags existing as titles when they do not have a tiddler in their own right.

Do such tag titles become real tiddlers when the list field is created on them?

I know the in the past that the list field and order is a somewhat complex mechanisium to understand. Perhaps I should use another field.

I had not fully understood this in our recent discussions on list and saved stories.

Regards
Tony

PMario

unread,
Apr 28, 2020, 6:25:33 AM4/28/20
to TiddlyWiki
On Tuesday, April 28, 2020 at 11:47:39 AM UTC+2, TonyM wrote:
Mario

When it says list before and list after is remove is this deleted from the source tiddlers?


Exactly that.
View in edit-mode: https://tiddlywiki.com/#%24%3A%2Fcore%2Fmacros%2Flist   and search for: list-before

The draggable list uses the "insertbefore" listops filter function, which will update the list field.
 

by virtual tiddler I am talking about tags existing as titles when they do not have a tiddler in their own right.


OK
 

Do such tag titles become real tiddlers when the list field is created on them?


Yes

I know the in the past that the list field and order is a somewhat complex mechanisium to understand. Perhaps I should use another field.


May be a good idea. ... The "list" field has "specialized" handling in the core, which may not fit every other usecase.
 

I had not fully understood this in our recent discussions on list and saved stories.


:) Good reminder! THx.

-mario

Mat

unread,
Apr 28, 2020, 7:34:28 AM4/28/20
to TiddlyWiki
TonyM wrote:

I wanted to avoid the need for an additional step. An extra button click that I have to ask the user to take.


Well, adding the list to the list field is an action so the triggering has to be done at some point. What physical steps do you accept that the user does? For example, you seem to imply that the user will click the tag button - in which case this action could be used to trigger it. 

Another approach, at least theoretical, could perhaps be to somehow trigger actions by the mere action of opening a tiddler: Clicking the title link of a tiddler that is also a tag could create a list field if there isn't one already, and populate it. 
 

However the tool that uses the lists has a select widget which I may be able to use a conditional action on.


"The tool" that "has a select widget" - whatyatalkinbout?

 

The question is, is there an action such as list ops that will result in the list field being populated.


I'm guessing you're talking about ActionListops but these, just like other action widgets, need to be enclosed in triggering widgets.


<:-)

TonyM

unread,
Apr 28, 2020, 9:03:55 AM4/28/20
to TiddlyWiki
Mat,

Yes, I realise now I can use the select widget to create the list field the first time its used.

Trigger actions on opening any or selected tiddlers is a re-occuring request I cant solve myself because there are many ways to open - ie navigate to a tiddler. What If I open many tiddlers at once, I still want the actions to be honored.

My OT was a specific Question but the background is I am trying to make lists a first class citizen. I would not keep anything from the community so here is what I am doing.
  • My First project is to be able to add any tiddler to any selected list. I have a Select widget conditionally appearing in the view toolbar
  • You can use this to select a list, then if the tiddler is not in that list a + will add it, if it is in that list - will remove it.
  • The key feature here is you can add tiddlers to a list without changing them, unlike a tag would, thus if they are shadow tiddlers they will not be overridden.
Subsequent to the creation of the list I can use them as input to other processes including open, export, delete, trash, annotate and more. You could think of them as no touch tags.

Equally I could copy any saved list to the story-list list field to restore the tiddlers selected as a story. I planned to make a special case that saved the storyList to a saved list.

Regards
Tony

Mat

unread,
Apr 28, 2020, 12:50:27 PM4/28/20
to TiddlyWiki
You can just emulate a selectwidget - i.e a field with a dropdown below it. This is for example what the native search box is/does. Therein each listed item can be a button and do whatever you want.

<:-)

TonyM

unread,
Apr 28, 2020, 8:26:42 PM4/28/20
to TiddlyWiki
Mat,

That is true and potentially a good strategy but I have discovered the select widgets actions parameter can specify actions defined in a macro, and this macro can contain conditional tests for more than one action to be performed.

Regards
Tony
Reply all
Reply to author
Forward
0 new messages