[tw5] Introducing "Internals" plugin for exploring TW5

617 views
Skip to first unread message

Jeremy Ruston

unread,
Feb 15, 2016, 7:10:43 AM2/15/16
to TiddlyWiki
I made a note in the wiki for the upcoming hangout of an idea to make it easier to understand TiddlyWiki’s internals:

We could provide a few tools that would make it easier to learn advanced TiddlyWiki concepts like widgets and lists:

• A way to view the parse tree of a tiddler, switchable between block and inline modes
• A way to view the render tree of a tiddler, showing the widget tree with attributes, variables and dom nodes

Perhaps this could be done by adding support for customisable tabs and columns in edit view.


I had a couple of train journeys last week that gave me the opportunity to add an initial implementation, shown in the screenshots below. When the “internals" plugin is loaded, an extra dropdown appears above the preview pane allowing the user to choose the type of preview.

“parse tree” shows the raw parse tree generated from the tiddler

“widget tree” shows the dynamic widget tree generated from the parse tree

“raw html” shows the generated raw HTML

I’ve uploaded a new prerelease that includes the internals plugin:


It’s instructive to create a new tiddler, show the preview pane and then explore the parse and widget trees generated for various text. Note, for example, how a transclusion such as {{HelloThere}} shows in the parse tree as a reference to the transcluded tiddler, in the widget tree we see the generated copy of the target tiddler that has been transcluded.

Here’s the basic code for the internals plugin:


It is based on an extension to the core to make the preview pane extensible:


Best wishes

Jeremy.


Alex Hough

unread,
Feb 15, 2016, 7:33:53 AM2/15/16
to TiddlyWiki
This looks helpful Jeremy

I look forward to it becoming a friend.

best wishes

Alex

--
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 tiddl...@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/7CB44F4D-5830-4727-9C85-509920994951%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Tobias Beer

unread,
Feb 17, 2016, 3:45:53 AM2/17/16
to TiddlyWiki, Tiddl...@googlegroups.com
Hi Jeremy,

This looks good and useful, especially for prototyping.
Makes me want to maximize the preview, though. ;-)

Best wishes,

Tobias.

PMario

unread,
Feb 17, 2016, 11:24:32 AM2/17/16
to TiddlyWiki, Tiddl...@googlegroups.com
On Wednesday, February 17, 2016 at 9:45:53 AM UTC+1, Tobias Beer wrote:
Makes me want to maximize the preview, though. ;-)

Had the same thought. Got a 34inch 21:9 ultra wide screen, some time ago. Especially useful for tiddlymaps and 2 browsers side by side :)
The downside is, it invalidates the mid spec graphic card.
-m

Brian Theado

unread,
Feb 17, 2016, 10:50:33 PM2/17/16
to tiddl...@googlegroups.com
Those preview types look really useful. I think a "transclusion tree"
preview type would be another useful addition. Instead of displaying
the full widget tree, this preview type would extract only the
transclusion widgets and display them as a nested list of tiddler
links. It would be much less verbose than the full widget tree, but
still display useful information. It would be great for learning how
all the core shadow tiddlers work together to create the TiddlyWiki
functionality. Just open the $:/core/ui/PageTemplate and choose this
view to see a top to bottom summary of how all the tiddlers relate to
each other.

Brian

Arlen Beiler

unread,
Feb 19, 2016, 11:17:44 AM2/19/16
to TiddlyWiki
It would include all dynamic inclusions using a list on a tag, right? My, I'm really like this idea. This is going to make everything so much easier if we had a way to easily inspect TiddlyWiki internals!

--
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 tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

Brian Theado

unread,
Feb 21, 2016, 2:53:52 PM2/21/16
to tiddl...@googlegroups.com
Arlen,

On Fri, Feb 19, 2016 at 11:17 AM, Arlen Beiler <arle...@gmail.com> wrote:
> It would include all dynamic inclusions using a list on a tag, right? My,
> I'm really like this idea. This is going to make everything so much easier
> if we had a way to easily inspect TiddlyWiki internals!

Yes, the widget view Jeremy already implemented shows such dynamic
inclusions. I envision a transclusion view would do the same.

Brian

Brian Theado

unread,
Feb 29, 2016, 5:39:49 AM2/29/16
to tiddl...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages