Help: ArticleTiddlers - unit tiddler showing multiple sequenced tids

207 views
Skip to first unread message

Mat

unread,
Aug 28, 2016, 10:09:16 AM8/28/16
to TiddlyWiki
Help to make this suitable to be included in the standard TW distribution!


From the site:

"...An Article Tiddler lets you present multiple tiddlers as a unit. Individual tiddlers therein are analogous to paragraphs in an article.
  • Preserve narrative - Big deal! Keep the context by creating paragraph tiddlers directly at their correct position in the article tiddler. 
  • Unit handling - The full article is managed as one tiddler. 
  • ...yet power o´ tiddly - Articles and paragraphs are regular tiddlers to re-use, slice and dice.
..."

To be honest - it is surprising that this has not yet been implemented in TW (by me or anyone else) because it is a recurring request and it solves a very practical need. Jeremy coined the term compound tiddlers which probably is comparable to this (but remain at idea stage) so Article Tiddlers address a recognized need.

I need your help to make it suitable for core. Nope, not plugin - this is just too darn fundamental and requested. BUT to make it at least ready for an OP it has to be good and stay very close to established TW practice in terms of code, layout etc.

Currently, Article Tiddlers are just two simple viewtemplates!!! The site is much more ambitious than the implementation of the idea. My hope is that the site will signal that it is an important issue and to make you feel inspired to work with me. I have listed a few "Help" bullets.

BTW, my (actual) mission to get up TWederation is what triggered this and a few other "side projects". Article Tiddlers could, with minor changes in display, be used for discussion threads and for versioning of tiddlers (see Notes on the site). Having article tiddlers in standard core would make it easier to reuse core components when building TWederation applications. This is important both for application development and for end user "familiarity". 

Ok, take a look at ArticleTiddlers and come with input!

Thank you

<:-)

Matabele

unread,
Aug 29, 2016, 1:14:48 AM8/29/16
to TiddlyWiki
Hi Mat

There's an easy way to do this -- simply save the list of titles from the current story river to a list (a snapshot) -- then restore this snapshot to the story river. There's been a demo here for some time (the Stories tab in the sidebar):

\define saveSnapshot()
<$button set="$:/_snapshots##$(snapshot)$" setTo={{$:/StoryList!!list}}>Save Snapshot</$button>
\end

\define showSnapshot()
<$button set="$:/StoryList!!list" setTo={{$:/_snapshots##$(snap)$}}>Show Snapshot</$button>
\end

;Show Snapshot

<span title="Select a Snapshot"><$select tiddler="$:/_snapshots" field="story-name" default='(none)'>
<$list filter="[[$:/_snapshots]indexes[]]" variable="currentIndex">
<option value=<<currentIndex>>><<currentIndex>></option>
</$list>
</
$select></span>
<$set name="snap" value={{$:/_snapshots!!story-name}}>
<<showSnapshot>>
</
$set>

;Save Snapshot

<span title="Enter a Name"><$edit-text tiddler="$:/_snapshots" field="story-name"/></span>
<$set name="snapshot" value={{$:/_snapshots!!story-name}}>
<<saveSnapshot >>
</
$set>

No fancy formatting, but it should be possible to add this facility.

regards

Mat

unread,
Aug 29, 2016, 4:19:33 AM8/29/16
to TiddlyWiki
Matabele - thanks for your reply!

That does look promising - but can your variant show several such snapshots below each other and opened at different times? Or does opening one snapshot necessarily replace what is currently in the story river, like a permaview?

Something like permaviews do not solve the need to be able to, in the story river, show a mix of tiddlers (i.e minimal, semantically meaningful chunks) and articles (i.e complex, complete info chunks), where each such is as manageable as if they were tiddlers.

One application would be a news site showing a story river with several news articles. The difference from most regular such news sites is that when it's made with TW+ArticleTiddlers then we can individually open/close new such articles in the story river. Most regular news sites show a "locked" river. Note that some articles might be as small (i.e as "un-complex") as one tiddler, in which case they still appear to be of the same kind as any other article. The readers are not exposed to tiddler philosophy (as far as they know). 

Would you say snapshots solve this?

<:-)

Matabele

unread,
Aug 29, 2016, 7:43:39 AM8/29/16
to TiddlyWiki
Hi Mat

The snapshots are stored as a list of titles in a field or index somewhere. I wrote this before developing the ActionListops widget and it was, therefore, limited to a permaview type scenario. However, using the ActionListops widget with append[] and remove[] filters, lists of tiddler titles could be appended or removed from the snapshot, or directly from the story river (or any other list operation you may require.)

The only downside to direct manipulation of $:/StoryList!!list (that I have noticed) is that the history list doesn't get to be updated.

regards

Mat

unread,
Aug 29, 2016, 9:23:36 AM8/29/16
to TiddlyWiki
Thanks again Matabele!

If I understand, ListOps is an action widget. Wouldn't this mean that the viewer has to click some button (other than the title link) to see the article?

However, ListOps would come in handy with something I'm fiddling with right now; Clicking a special paragraph edit button should show the paragraph edit view (still inside the article). I'm thinking ListOps might be able to simply switch the articles paragraphs field from reading e.g 

paragraphs: Paragraph1 Paragraph2 Paragraph3 ...

into

paragraphs: Paragraph1 [[Draft of 'Paragraph2']] Paragraph3 ...

...and reversed when clicking Save tiddler. Obviously, I can't know the name or position of the concerned title.

Since you're Mr. ListOps in high person ;-) ... can I ask how this is achieved? I can't quite figure it out from the docs.

 
The only downside to direct manipulation of $:/StoryList!!list (that I have noticed) is that the history list doesn't get to be updated.

If I understand right, the ListOps don't handle json but if they did, I guess there could be a parallel fireing to operate the history list also. 


<:-)

Mark S.

unread,
Aug 29, 2016, 10:02:12 AM8/29/16
to TiddlyWiki
I'm probably reading too fast, but how is this different from what is achieved with the Text-Slicer edition?

Thanks!
Mark

Mat

unread,
Aug 29, 2016, 11:36:13 AM8/29/16
to TiddlyWiki
Mark S. wrote:
I'm probably reading too fast, but how is this different from what is achieved with the Text-Slicer edition?


Ah, interesting! In deed there is overlap which I had not considered. The whole TS edition there is much more ambitious than Article Tiddlers, due to its different original objective but it may simply a matter of tweaking it so that it also fulfills the Article Tiddler objective. Must investigate. 

Thanks for pointing to it!

<:-)

Matabele

unread,
Aug 29, 2016, 12:05:26 PM8/29/16
to TiddlyWiki
Hi Mat

There's a replace[] filter -- you could replace '[My Title]' with "['Draft of' My Title]' in the list. Must say, I've never tried to do this in the story river to see what effect this has. Not too sure it would work, as the process of creating a draft, then replacing the old tiddler with the draft seems quite involved. I'd guess that the tiddler in question would disappear and there would be no draft to take its place.

regards

Tobias Beer

unread,
Aug 30, 2016, 1:58:59 AM8/30/16
to tiddl...@googlegroups.com
Hi Mat / Matabele,

FWIW, I think one hard problem that should be solved in this context
is that I possibly not only want a flat list but rather a tree / outline
whereas some tiddlers would be sub-chapters / sub-elements to others.

The only way to model that right now appears to be tagging
or some list field designated for the same purpose
so as to establish a "virtual" outline.

Best wishes,

Tobias.

Mat

unread,
Aug 30, 2016, 11:16:22 AM8/30/16
to TiddlyWiki
@Tobias

tree /ouline  - a quick test merely using 

.paragraph {margin-left:2em;}

seems to do the trick. :-)

<:-)

Jeremy Ruston

unread,
Aug 30, 2016, 11:54:23 AM8/30/16
to tiddl...@googlegroups.com
Hi Tobias

FWIW, I think one hard problem that should be solved in this context
is that I possibly not only want a flat list but rather a tree / outline
whereas some tiddlers would be sub-chapters to others.

The current text-slicer edition slices HTML documents into paragraphs using headings as hierarchical containers. It uses the "list" field of the parent to contain the titles of the child tiddlers. Thus one can move entire sections of the document around by moving the heading.

Best wishes

Jeremy


The only way to model that right now appears to be tagging
or some list field designated for the same purpose
so as to establish a "virtual" outline.

Best wishes,

Tobias.

--
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/2e0fa306-7c46-4fd4-85f0-de1f78e90c06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mat

unread,
Sep 2, 2016, 8:37:57 AM9/2/16
to TiddlyWiki
1)
I wish to identify which tiddlers have the current tiddler title - say "foo" - listed in their paragraphs field. 

<$set name="parent" filter="[all[tiddlers]has[paragraphs]search:paragraphs<currentTiddler>]">

...but "search" is too greedy, accepting both tiddlers regerdless if they have "foo" or "fooX" in the paragraphs field.

How can I restrict it to only accept exactly foo?


2) @Mark S... and perhaps @Jermolene

It turns out the text-slicer is much too complex for me. It probably covers what Article Tiddlers aims at and I'd be more than happy if it were redesigned so it provided a good UI for this, but as it stands it was clearly created from a different starting point


3) @Matabele

Some experiments with replace[] look promising. Thanks for that tip.


<:-)

Jeremy Ruston

unread,
Sep 2, 2016, 8:45:23 AM9/2/16
to tiddl...@googlegroups.com
Hi Mat

It turns out the text-slicer is much too complex for me. It probably covers what Article Tiddlers aims at and I'd be more than happy if it were redesigned so it provided a good UI for this, but as it stands it was clearly created from a different starting point

Well, ArticleTiddlers uses a technique that’s pretty common: a new view template segment to pull in related tiddlers. Text-slicer uses exactly that technique, but is based around a simpler way of threading the tiddlers together, and includes the ability to break up longer texts into chunks, which is really the driver for using it.

Best wishes

Jeremy



3) @Matabele

Some experiments with replace[] look promising. Thanks for that tip.


<:-)

--
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.
Reply all
Reply to author
Forward
0 new messages