Teaser of my macros

170 views
Skip to first unread message

David Gifford

unread,
Jul 13, 2021, 12:08:39 AM7/13/21
to TiddlyWiki
Hi everyone

I have been asking for help a few times, and you all were very helpful. Here is the end result, shared as a silent video with notes in the description.


In a nutshell, it is a macro I called 'det' that creates a details element slider + link (asterisk) based on the tiddler title. These can be nested kind of like Dynalist, so when you open one detail slider, if there are more under that, you can open those sliders as well like a giant outline. And the links are there to open at any level. I tweaked the edit-comptext plugin with Saq's help, and so there is a way to autocomplete to create a det macrocall around an existing tiddler title.

I also uploaded an example file so you can test it out and offer feedback: https://giffmex.org/experiments/det.teaser.html

Maybe at some later point when I have used it for a while I will make it available as a plugin. But for now it is just for inspiration for you and feedback for me.

Thank you for all of your help! I hope you enjoy it. Blessings, Dave


Charlie Veniot

unread,
Jul 13, 2021, 9:25:05 AM7/13/21
to TiddlyWiki
That is quite awesome, David.  I'm a huge fan of the HTML detail element.

Total aside:  I am an even bigger fan of the Relink plugin.  It saves me from, well, me.  Very nice how you've configured Relink to also check your macros whenever you change a tiddler title.

For anybody wondering what the heck I'm referring to:  https://giffmex.org/experiments/det.teaser.html#%24%3A%2Fplugins%2Fflibbles%2Frelink (look at the "configuration" tab)

Saq Imtiaz

unread,
Jul 13, 2021, 9:46:48 AM7/13/21
to TiddlyWiki
Looks spiffy. All this time talking about wanting an outliner in TW and you could have written it all along.

Why

<$macrocall $name=det tid="The relationship between the Old and New Testaments"/>

instead of:
<<det tid:"The relationship between the Old and New Testaments">>

Is it for the autocomplete support? If so, we might be able to do something about that.
Cheers,

Saq

David Gifford

unread,
Jul 13, 2021, 9:50:37 AM7/13/21
to TiddlyWiki
Thanks Charlie

Actually, the first line of this tiddler is what causes the det macro to relink: https://giffmex.org/experiments/det.teaser.html#%24%3A%2F.giffmex%2FMacro%2FDet

David Gifford

unread,
Jul 13, 2021, 9:52:28 AM7/13/21
to TiddlyWiki
Thanks Saq.

Doing it as <<det >> turns it into a <p>, which forces line breaks above and below. Doing it as a macrocall lets me have each one on the next line.

Saq Imtiaz

unread,
Jul 13, 2021, 10:08:17 AM7/13/21
to TiddlyWiki
Ouch that is annoying.

One workaround would be:

<div>
<<det tid:"The relationship between the Old and New Testaments">>
<<det tid:"The relationship between the Old and New Testaments">>
<<det tid:"The relationship between the Old and New Testaments">>
</div>

David Gifford

unread,
Jul 13, 2021, 10:14:21 AM7/13/21
to tiddl...@googlegroups.com
Thanks Saq for giving me another option!




--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/gCp5ONBxFXg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/05390cba-7170-4186-be94-92876022e5f4n%40googlegroups.com.

Charlie Veniot

unread,
Jul 13, 2021, 12:13:22 PM7/13/21
to TiddlyWiki
Me, just out of habit (to avoid monkeying around with Relink in every TiddlyWiki instance), always setup my macros like this:
  • example from your TiddlyWiki:<$macrocall $name=det tid="OT and NT as two voices" />
  • my wordier approach: <$macrocall $name=det tid={{OT and NT as two voices!!title}} />
    • Relink catches this "out of the box"
    • l don't imagine that being a preferred option for anybody but wee old me, but I throw it out there for the giggles
      • It is quite ugly, but I know exactly what's going on as soon as I see it, strangely enough

TW Tones

unread,
Jul 13, 2021, 6:58:53 PM7/13/21
to TiddlyWiki
David,

I have not done it yet but relink has comprehensive set of customisations and I believe you may be able to name "the det" macro and its parameter " tid" to be subject to re-linking.

If you compile this solution into a JSON or plugin you may be able to include this relink definition in your package, perhaps even include the relink plugin.

Regards
Tones

David Gifford

unread,
Jul 13, 2021, 7:06:41 PM7/13/21
to tiddl...@googlegroups.com
Hi Tones,

The det macro does in fact relink. No need to alter anything for that to work. There is a line in the macro that makes it work.




TW Tones

unread,
Jul 13, 2021, 7:14:40 PM7/13/21
to TiddlyWiki
David,

Thanks, I did not know about that pragma "\relink det tid",

Relink is seriously powerful, 

Tones

David Gifford

unread,
Jul 13, 2021, 7:26:15 PM7/13/21
to TiddlyWiki
Tones

Yes, this has been a great learning experience for me, but it also feels like my dragging people into the process has resulted in new insights for them as well. Very enjoyable to see that happen.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages