TOC-SELECTIVE-EXPANDABLE different results in Tiddlydesktop and Chrome

196 views
Skip to first unread message

Mohammad

unread,
Oct 30, 2018, 8:11:15 AM10/30/18
to tiddl...@googlegroups.com
I have found a strange behaviour when I open my tw5 inside Tiddlydesktop and chrome

Part I.

I have a code like this 

<div class="tc-table-of-contents">
<<toc-selective-expandable 
   tag:"slider"
   sort:"sort[caption]"
   exclude:"-[tag[slideFooter]]">>
</div>


Part II.

And another tiddler with the below code to rearrange the tiddlers tagged with slider


    <ol>
      <<list-tagged-draggable 
      tag:$(currentTiddler)$  
      subFilter:"!tag[slideFooter]"
      itemTemplate:"$:/.mr/slider/draggable-template"
      emptyMessage:"You don't have any slide in this slider"
      >>
    </ol>


Note the $:/.mr/slider/draggable-template is a tiddler as below
<li><$link to={{!!title}}>{{!!title}}</$link></li>    


I use the second tiddler and rearrange them, but strangely I see different results when I use Tiddlydesktop and chrome!!!

In chrome I see the toc macro shows the tiddler in the right order, but In Tiddlydesktop I got wrong order! It should be noted that The tiddler in part b shows the correct result in both chrome and tiddlydesktop!!!

What do you think?


Mohammad

Message has been deleted

Mark S.

unread,
Oct 30, 2018, 4:16:35 PM10/30/18
to TiddlyWiki
Just to be clear, you were using a copy of TW5.1.18pre on TiddlyDesktop? And what version of TiddlyDesktop? (maybe platform too).

-- Mark


On Tuesday, October 30, 2018 at 11:57:15 AM UTC-7, Mohammad wrote:
I was using the above code in TW 5.1.18pre. I tested this in TW 5.1.17 and it works fine!

Seems something wrong with TW5.1.18pre or changes in the prerelease break the code!

-Mohammad

Mark S.

unread,
Oct 30, 2018, 4:41:55 PM10/30/18
to TiddlyWiki
There's something missing/wrong with Part II. You're using $(currentTiddler)$ which only works in a macro, but you're not showing how the macro is defined nor how it is called.

-- Mark

Mohammad

unread,
Oct 30, 2018, 11:52:07 PM10/30/18
to TiddlyWiki
Mark, I use Tiddlywiki 5.1.18pre of Oct 3rd, 2018 and Tiddlydesktop 0.013 the latest release!

I noticed the TW5.1.18pre has modified toc-selective-expandable macro!


- Mohammad


Mohammad

unread,
Oct 31, 2018, 12:37:54 AM10/31/18
to TiddlyWiki
Mark, I reproduces the issues and export it as a json file!

import it into tiddlywiki.com/prerealease and tiddlywiki.com to see different results and also in TiddlywikiDesktop!



Mohammad



toc-issues.json

Mark S.

unread,
Oct 31, 2018, 9:11:21 AM10/31/18
to TiddlyWiki
Your JSON doesn't have part II in it, and that is the part that is broken.

-- Mark

Mohammad

unread,
Oct 31, 2018, 9:18:20 AM10/31/18
to TiddlyWiki
Mark,
 Open the Cat tiddler, part II is inside it! I send the whole code (wiki) to your email!

Mohammad

Mohammad

unread,
Oct 31, 2018, 9:20:33 AM10/31/18
to TiddlyWiki
Hello Mark,
 I attached two pictures! you can see the different results in Chrome/Firefox browser and Tiddlydesktop!
The result by FF has not been attached as it is the same as Chrome!

Mohammad
Tiddlydesktop.png
Chrome 69.png

Mohammad

unread,
Oct 31, 2018, 9:28:02 AM10/31/18
to TiddlyWiki
Update

It doesnt even work in TW 5.1.17!

Mark S.

unread,
Oct 31, 2018, 10:17:38 AM10/31/18
to TiddlyWiki
It doesn't work because "Cat" is wrong. You can't use $(currentTiddler)$ outside a macro. Change the contents of  "Cat" like this:

\define doit()

 
<ol>
     
<<list-tagged-draggable
      tag
:$(currentTiddler)$  
      subFilter
:"!tag[slideFooter]"
      itemTemplate
:"$:/.mr/slider/draggable-template"
      emptyMessage
:"You don't have any slide in this slider"
     
>>
   
</ol>
   
\end
<<doit>>

and then it will work as expected.

Thanks,
-- Mark

Mohammad

unread,
Oct 31, 2018, 12:15:17 PM10/31/18
to TiddlyWiki
Mark,
Still does not work!

Check in TiddlywikiDesktop!

Mohammad

Mark S.

unread,
Oct 31, 2018, 12:25:35 PM10/31/18
to TiddlyWiki
I did. It works fine. I slide entries in "Cat" (the way I have it here) and the changes immediately appear below in Slider-List.

Unfortunately I can't see what you're doing in your set-up. But, as I keep mentioning, you can not use $(currentTiddler)$ outside a macro and expect it to do anything. Perhaps a screen shot of the contents of your "Cat" tiddler will help.

-- Mark

Mark S.

unread,
Oct 31, 2018, 1:36:41 PM10/31/18
to TiddlyWiki
Here's some screen shots.

First, what it looks like before (you can see that it's a pre-release):


Here is the same tiddlers immediately after moving Persian Cat to the top:




Mohammad

unread,
Oct 31, 2018, 1:57:21 PM10/31/18
to TiddlyWiki
Thank you Mark!
Have you tested it on TiddlyDesktop? Does it give the same results?

Mohammad 

Mark S.

unread,
Oct 31, 2018, 2:01:55 PM10/31/18
to TiddlyWiki
That was on TiddlyDesktop (Windows 64)

Mohammad

unread,
Nov 1, 2018, 8:42:08 AM11/1/18
to tiddl...@googlegroups.com
Mark,
I sent you the wiki to your email! You can see its behavior is different in TiddlyDesktop and Chrome!
Recently I realised the exclude atribute does not work as expected! By the way without exclude
still I get different results in Chrome and TiddlyDesktop. I think something goes wrong with toc-selective-expandable macro!


Thank you

Mohammad

unread,
Nov 1, 2018, 9:14:39 AM11/1/18
to tiddl...@googlegroups.com
Further clarification!
If you noticed I used exclude attribute and I had some Footer tiddler which were excluded both in 

      <<list-tagged-draggable 
      tag:"""$(currentTiddler)$"""
      subFilter:"!tag[slideFooter]"
      itemTemplate:"$:/.mr/slider/draggable-template"
      emptyMessage:"You don't have any slide in this presentation"
      >>

ans aldo in the TOC

<$scrollable class='slider-list'>
<div class="tc-table-of-contents">
<<toc-selective-expandable 
   tag:"slider" 
   exclude:"-[tag[slideFooter]]"
   sort:"sort[caption]">>
</div>
</$scrollable>

Note to slideFooter tag.

It seems these two were inconsistent and caused the error! 
After removing these I got the correct results both in TW-Chrome and TW-Tiddlydesktop.

Just it is very strange why the behavior was different and why TiddlyDesktop showed different results.


Mohammad
Reply all
Reply to author
Forward
0 new messages