Discussion:
[tw5] List Widget: Does it work correctly or NOT?
Mohammad
2018-06-28 14:09:45 UTC
Permalink
Look at these examples


- Example 1


<$list>
</$list>

Returns nothing!


- Example 2


<$list>

</$list>

Returns all standard tiddlers (no system no shadow) every tiddler in a new
line

- Example 3


<$list></$list>

Returns all tiddlers one after another with no line break!


- Example 4


<$list filter="" >

</$list>

Returns nothing!



- Example 4


<$list filter="NotExistedMacro" >

</$list>

Returns all tiddlers no shadow no system tiddlers!

How does list widget work?
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/0c50e62f-ab99-4e33-9896-b296654ea825%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Diego Mesa
2018-06-28 14:15:41 UTC
Permalink
Beautifully illustrated Mohammad!
Post by Mohammad
Look at these examples
- Example 1
<$list>
</$list>
Returns nothing!
- Example 2
<$list>
</$list>
Returns all standard tiddlers (no system no shadow) every tiddler in a new
line
- Example 3
<$list></$list>
Returns all tiddlers one after another with no line break!
- Example 4
<$list filter="" >
</$list>
Returns nothing!
- Example 5
<$list filter="NotExistedMacro" >
</$list>
Returns all tiddlers no shadow no system tiddlers!
How does list widget work?
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/6c1085ab-96da-4c65-8f25-4af74c20171c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Mark S.' via TiddlyWiki
2018-06-28 14:39:07 UTC
Permalink
Re #5, I just get a link to the single, non-existent tiddler.
Post by Mohammad
Look at these examples
- Example 1
<$list>
</$list>
Returns nothing!
- Example 2
<$list>
</$list>
Returns all standard tiddlers (no system no shadow) every tiddler in a new
line
- Example 3
<$list></$list>
Returns all tiddlers one after another with no line break!
- Example 4
<$list filter="" >
</$list>
Returns nothing!
- Example 5
<$list filter="NotExistedMacro" >
</$list>
Returns all tiddlers no shadow no system tiddlers!
How does list widget work?
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/7e270587-4aab-476b-b91e-5f96fde9731e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mohammad
2018-06-28 14:59:52 UTC
Permalink
Mark,
It was my mistake! Look at the edited one!

$list filter="NotExistedMacro" >

</$list>

/Mohammad
Post by 'Mark S.' via TiddlyWiki
Re #5, I just get a link to the single, non-existent tiddler.
Post by Mohammad
Look at these examples
- Example 1
<$list>
</$list>
Returns nothing!
- Example 2
<$list>
</$list>
Returns all standard tiddlers (no system no shadow) every tiddler in a
new line
- Example 3
<$list></$list>
Returns all tiddlers one after another with no line break!
- Example 4
<$list filter="" >
</$list>
Returns nothing!
- Example 5
<$list filter="NotExistedMacro" >
</$list>
Returns all tiddlers no shadow no system tiddlers!
How does list widget work?
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/705086df-de83-4117-a734-2139778f4a96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jeremy Ruston
2018-06-28 15:18:01 UTC
Permalink
Hi Mohammad

Some points about the list widget:

* If the “filter” attribute is not present then a default of “[!is[system]sort[title]]” is used
* If the list widget is completely empty (ie only whitespace between the opening and closing tags), then it behaves as if the content were a DIV or a SPAN containing a link to the current tiddler (it’s a DIV if the list widget is in block mode, or a SPAN if it is in inline mode)
* If the “template” attribute is not present then the content of the list widget will be used as the template, unless the widget is completely empty in which case a default template is used

It’s is itself more complex than we’d like, and interacts with some other complex concepts (eg inline vs. block) and has some weird edge cases, and bugs.

A useful tool for exploring this stuff is to use the “Internals” plugin to view the parse tree for each example.
Post by Mohammad
<$list>
</$list>
Returns nothing!
This one is a bug, I think. The parser is seeing it as a widget/element containing a paragraph containing a new line, where it should be parsed the same as the next example.
Post by Mohammad
<$list>
</$list>
Returns all standard tiddlers (no system no shadow) every tiddler in a new line
The blank content of the list widget is here correctly interpreted as the absence of a template, so the default template is used as described above
Post by Mohammad
<$list></$list>
Returns all tiddlers one after another with no line break!
This is the same as the previous example except the lack of a line break after the opening tag has triggered inline mode.
Post by Mohammad
Example 4
<$list filter="" >
</$list>
Returns nothing!
That’s because an empty filter returns no tiddlers.
Post by Mohammad
Example 4
<$list filter=<<NotExistedMacro>> >

</$list>
Post by Mohammad
Returns all tiddlers no shadow no system tiddlers!
The missing macro makes the attribute act as if it were not present, and so you’re getting the default filter again.

Best wishes

Jeremy.
Post by Mohammad
How does list widget work?
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
Visit this group at https://groups.google.com/group/tiddlywiki <https://groups.google.com/group/tiddlywiki>.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/0c50e62f-ab99-4e33-9896-b296654ea825%40googlegroups.com <https://groups.google.com/d/msgid/tiddlywiki/0c50e62f-ab99-4e33-9896-b296654ea825%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/7C922C6D-7C25-4BA8-9F37-B7BF9F666182%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Mohammad
2018-06-28 15:33:57 UTC
Permalink
Hi Jeremy!

Thank you for your clarification!
I hope people come and help to develop a full covered documentation for
Tiddlywiki.
I was writing a short code to step-through a nested list and I encountered
this issue. I had misspelled the name of macro in example 5 and I got
strange results.

Once again thank you for all your efforts.

/Mohammad
Post by Jeremy Ruston
Hi Mohammad
* If the “filter” attribute is not present then a default of
“[!is[system]sort[title]]” is used
* If the list widget is completely empty (ie only whitespace between the
opening and closing tags), then it behaves as if the content were a DIV or
a SPAN containing a link to the current tiddler (it’s a DIV if the list
widget is in block mode, or a SPAN if it is in inline mode)
* If the “template” attribute is not present then the content of the list
widget will be used as the template, unless the widget is completely empty
in which case a default template is used
It’s is itself more complex than we’d like, and interacts with some other
complex concepts (eg inline vs. block) and has some weird edge cases, and
bugs.
A useful tool for exploring this stuff is to use the “Internals” plugin to
view the parse tree for each example.
<$list>
</$list>
Returns nothing!
This one is a bug, I think. The parser is seeing it as a widget/element
containing a paragraph containing a new line, where it should be parsed the
same as the next example.
<$list>
</$list>
Returns all standard tiddlers (no system no shadow) every tiddler in a new line
The blank content of the list widget is here correctly interpreted as the
absence of a template, so the default template is used as described above
<$list></$list>
Returns all tiddlers one after another with no line break!
This is the same as the previous example except the lack of a line break
after the opening tag has triggered inline mode.
- Example 4
<$list filter="" >
</$list>
Returns nothing!
That’s because an empty filter returns no tiddlers.
- Example 4
<$list filter=<<NotExistedMacro>> >
</$list>
Returns all tiddlers no shadow no system tiddlers!
The missing macro makes the attribute act as if it were not present, and
so you’re getting the default filter again.
Best wishes
Jeremy.
How does list widget work?
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/0c50e62f-ab99-4e33-9896-b296654ea825%40googlegroups.com
<https://groups.google.com/d/msgid/tiddlywiki/0c50e62f-ab99-4e33-9896-b296654ea825%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/8c23af1e-e8c5-4046-aa5c-f60df9f322aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
David Gifford
2018-06-28 15:46:55 UTC
Permalink
Thanks for this helpful explanation, Jeremy. I made a link to your post in
the toolmap under the Lists category.
Post by Jeremy Ruston
Hi Mohammad
* If the “filter” attribute is not present then a default of
“[!is[system]sort[title]]” is used
* If the list widget is completely empty (ie only whitespace between the
opening and closing tags), then it behaves as if the content were a DIV or
a SPAN containing a link to the current tiddler (it’s a DIV if the list
widget is in block mode, or a SPAN if it is in inline mode)
* If the “template” attribute is not present then the content of the list
widget will be used as the template, unless the widget is completely empty
in which case a default template is used
It’s is itself more complex than we’d like, and interacts with some other
complex concepts (eg inline vs. block) and has some weird edge cases, and
bugs.
A useful tool for exploring this stuff is to use the “Internals” plugin to
view the parse tree for each example.
<$list>
</$list>
Returns nothing!
This one is a bug, I think. The parser is seeing it as a widget/element
containing a paragraph containing a new line, where it should be parsed the
same as the next example.
<$list>
</$list>
Returns all standard tiddlers (no system no shadow) every tiddler in a new line
The blank content of the list widget is here correctly interpreted as the
absence of a template, so the default template is used as described above
<$list></$list>
Returns all tiddlers one after another with no line break!
This is the same as the previous example except the lack of a line break
after the opening tag has triggered inline mode.
- Example 4
<$list filter="" >
</$list>
Returns nothing!
That’s because an empty filter returns no tiddlers.
- Example 4
<$list filter=<<NotExistedMacro>> >
</$list>
Returns all tiddlers no shadow no system tiddlers!
The missing macro makes the attribute act as if it were not present, and
so you’re getting the default filter again.
Best wishes
Jeremy.
How does list widget work?
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/0c50e62f-ab99-4e33-9896-b296654ea825%40googlegroups.com
<https://groups.google.com/d/msgid/tiddlywiki/0c50e62f-ab99-4e33-9896-b296654ea825%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/5f1ada21-ae06-40ff-a659-9dcaa8ed877c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...