An addon for Saq's stream-editor

214 views
Skip to first unread message

Jan

unread,
Jul 2, 2020, 10:23:07 AM7/2/20
to TiddlyWiki

Hello,
I made an addon to Saq's stream-plugin https://saqimtiaz.github.io/sq-tw/streams.html

You can find and test it at https://szen.io/stream/

It mainly adds a modal which allows you

...to flatten the whole stream or nodes of the stream.

...and to rename the Node

You trigger it...
...in the contextmenu

...by typing alt+f for flatten while you are in the writingmode of the node you want to flatten.

...or with the opacity button below (which shall imply "join") to flatten the whole stream

My Addon is a bit wierd because...

...it inserts multiple linebreaks to keep the structure

...I tried to make it with very few tiddlers, so the code may appear somewhat strange

To use it:

...you can choose between ordered and unordered lists and paragraphs.

...So if you want to transform your stream to a special structure start at the twigs an go back to the trunk.

...when flattening branches, all subnodes that follow the generic naming-pattern ( and have "/20" in the title ) will be deleted .

...so if you want to keep the content in a seperate tiddler rename it first.
...and as always: backup before Testing it in your Wiki and stream.

Big thanks to Saq for inventing this great tool.

best wishes Jan


Saq Imtiaz

unread,
Jul 2, 2020, 11:12:19 AM7/2/20
to TiddlyWiki
Cool stuff Jan. Happy to see you tinkering with Streams and thanks for sharing with the community.

I plan to eventually make the context menu extensible via tags, so that you can add commands without having to edit shadow tiddlers. I have something similar in mind for keyboard shortcuts as well.

Limitations to be aware of: The caveat with the flattening is of course as the name implies, it gives you a flat structure so you loose any hierarchy. Also, flattening to a list doesn't work if any of the nodes have line-breaks. 

Cheers,
Saq

TW Tones

unread,
Jul 2, 2020, 7:52:35 PM7/2/20
to TiddlyWiki
Jan,

Friendly suggestion. Tell people what flatten means. Flatten a single node does not quite make sense to me? I understand flattening trees, or images etc... but flatten a single node?

Regards
Tony

Birthe C

unread,
Jul 2, 2020, 8:25:32 PM7/2/20
to TiddlyWiki
TW Tones,

You can flatten the whole stream or nodes of the stream. I think it does make sense, when you play a little with Jan's example.

@Jan, well done. Nice addon I am sure I will use.


Birthe

TW Tones

unread,
Jul 2, 2020, 10:59:13 PM7/2/20
to TiddlyWiki
Birthe,

Of course it makes sense, but it will not to all, and it is the whole reason for the tool. Just thinking about keeping available for the broadest audience.

I said I had a tool have a tool for "graphoz", install it to see what it does, I doubt many would.

graphoz means nothing to anyone, like flatten may not, just saying.

Regards
Tony

Jan

unread,
Jul 3, 2020, 8:19:53 AM7/3/20
to tiddl...@googlegroups.com
Hi Tony and Birthe,
thanks for the clarifying discussion.
In short for everyone: Saq has written an ingenious flexible editor which allows to order your thougts by writing in lists which can be rearranged using keyboardshortcuts and drag and drop.
It does this by creating quite a lot of Tiddlers...which are a little complicated to export and to search.
This microaddon allows / Mod allows to join the branches or the whole treestructure to a single Tiddler when you have finished .

Two wishes to saq:
-The indent of the nodes in mobile view could be smaller? Perhaps it could be proportional to the tiddlerwidth
-Is it possible to have a reduced toolbar for the edited nodes? The plugin seems to prepare this.

Cheers Jan
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/0631c742-5713-4391-9311-cbee2bf71c6bo%40googlegroups.com.

Saq Imtiaz

unread,
Jul 3, 2020, 9:00:07 AM7/3/20
to TiddlyWiki
Hi Jan,


Two wishes to saq:
-The indent of the nodes in mobile view could be smaller? Perhaps it could be proportional to the tiddlerwidth

If you post this in the Streams thread, or as an Issue on github, I will take a look when I get the chance.
 
-Is it possible to have a reduced toolbar for the edited nodes? The plugin seems to prepare this.

The plugin re-uses the code for the standard edit toolbar. I've honestly never used it in Streams or in the default editor. Any method used to tweak the standard edit toolbar should be re-usable within streams. As such, it is not something I plan to work on.

Regards,
Saq

Saq Imtiaz

unread,
Jul 6, 2020, 12:59:48 PM7/6/20
to TiddlyWiki
Jan,

I've added the ability to extend the Streams context menu by adding a tiddler, as opposed to editing the context menu tiddler. 

The format required can be found here using your flatten as an example:

I plan to eventually also make it possible to add keyboard shortcuts without needing to edit plugin tiddlers.

Cheers,
Saq

On Thursday, July 2, 2020 at 4:23:07 PM UTC+2, Jan wrote:

Jan

unread,
Jul 13, 2020, 5:22:44 PM7/13/20
to tiddl...@googlegroups.com
Hi Saq,
thank you! I just checked it out after returning home. Good Idea to add hackability.

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