I am going to work at it a bit more; maybe repurpose/simplify the button from https://szen.io/stream/ ? I quite like the look and feel of it, but I probably don't need the modal form.
I have already added code needed to export also the root tiddler content (done), have a parameter to choose between bullets and numbers (done), use the tm-create-tiddler message to open a new tiddler in edit mode (easy) and see if I can integrate it to the node context menu as well for sub-stream merge.... (probably easy with the changes above). I noticed my solution does not work so well for complex node content, as those in: https://saqimtiaz.github.io/streams/#Working%20with%20streams%20tiddlers The reason is that wrapping in <div> tags mangles them badly; I tried a few alternatives (<span>, more white space, ..), no success yet. Any suggestions? On Sat, 17 Jul 2021 at 08:28, ludwa6 <wludw...@gmail.com> wrote: > Nice work, @Fred; proof-of-concept it may be, but i'd love to know how to > implement it -if indeed there's a n00b-friendly way to do it. ? > > /walt > > On Saturday, July 17, 2021 at 4:20:04 AM UTC+1 fred....@gmail.com wrote: > >> Greetings all, >> >> Using bits and pieces I cobbled together (like a plumber), I found a way >> to flatten a stream of nodes into another tiddler and preserve the >> hierarchy of the nodes. >> >> The key was to 1) use the recursive macro provide by Saq, 2) use the >> get-stream-root[]count[] filter to determine depth of the node, and 3) >> use the pad[]operator to turn said depth in the correct number of * >> characters. >> I had to work a bit to extract the wikitext correctly. I wrapped each >> node in a <div> tag pair to allow multi-line nodes... though a smarter >> filter set could do that only if line feeds are present in the node text. >> >> rendered preview enclosed, wikitext output below the sample code. >> >> \define print-row() >> \whitespace trim >> <$set name="depth" >> filter="[<currentTiddler>get-stream-root:includeall[]count[]]"> >> <$set name="prefix" filter="[[*]pad<depth>,[*]removesuffix[*]]" >> select="0"> >> <$vars lb="</div> >> "> >> <$list >> filter="[<currentTiddler>get[text]addprefix[<div>]addprefix<prefix>addsuffix<lb>]" >> select="0" variable="nodetext"> >> <$text text=<<nodetext>> /> >> <$list filter="[<currentTiddler>has[stream-list]]" variable="_NULL"> >> <$list filter="[enlist{!!stream-list}is[tiddler]]"> >> <<print-row>> >> </$list> >> </$list> >> >> </$list> >> </$vars> >> </$set> >> </$set> >> \end >> >> \define print-stream() >> \whitespace trim >> <$list filter="[enlist{!!stream-list}is[tiddler]]"> >> <<print-row>> >> </$list> >> \end >> >> <$button> export >> <$wikify name="flat" text=<<print-stream>> > >> <$action-setfield $tiddler="report" text=<<flat>>/> >> </$wikify> >> </$button> >> >> >> -------------------------------------------------------------------------------------------------- >> >> *<div>''Version 1.0''</div> >> **<div>Add affordance to collapse/expand all nodes of a stream</div> >> **<div>''CSS''</div> >> ***<div>Update css to respect color palette</div> >> **<div>''Settings''</div> >> ***<div>''Configuration settings for context menu items''</div> >> ****<div>Include other menu items like demote/promote that are disabled >> by default</div> >> ****<div>Config screen for enabling/disabling context menu items</div> >> ****<div>Allow specifying that a contextmenu item should be displayed on >> narrow screens (mobile) only?</div> >> ***<div>Config tiddler for node content template</div> >> *<div>Have an option to detach a bullet from a list.</div> >> *<div>''Version 1.1''</div> >> **<div>//Provide a better UI to rename bullets while editing//</div> >> **<div>UI ideas re: modals >> >> https://getbootstrap.com/docs/3.4/javascript/#popovers >> >> >> http://www.uxforthemasses.com/wp-content/uploads/2015/08/LinkedIn-edit-example.jpg >> </div> >> *<div>''Other Ideas''</div> >> **<div>drag and drop considerations</div> >> ***<div>copy/transclude via modifier keys to another tiddler doesnt >> include nested children</div> >> **<div>option to flatten a bullet list to one tiddler, for >> publishing/export</div> >> **<div>context menu that applies to entire stream</div> >> **<div>Consider different styling for default bullet</div> >> *<div>''Version 2.0''</div> >> **<div>''templating for list row items and row controls''</div> >> ***<div>Allow for different kinds of stream tiddlers (todo, comments, >> etc)</div> >> **<div>Use draft mechanism for editing</div> >> ***<div>navigator.js L266</div> >> >> >> >> On Thursday, 15 July 2021 at 14:34:58 UTC-4 saq.i...@gmail.com wrote: >> >>> My previous two rather lengthy replies to this thread seem not have been >>> published. I am hoping I've accidentally hit "reply to author". If not, >>> I'll find the time to try again over the weekend. >>> >>> Saq >>> >> -- > 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/-xTFWPwzq6g/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > tiddlywiki+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tiddlywiki/0a4ca26c-08b1-411f-9865-072aff4be733n%40googlegroups.com > <https://groups.google.com/d/msgid/tiddlywiki/0a4ca26c-08b1-411f-9865-072aff4be733n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CAAY2DnP%3DaYb8d7SRs4MSYJ4vvsLUdpGMrv9j%2BnzGYygt_KaoUg%40mail.gmail.com.