Hi Saq,

Nice work and I am glad you continue to improve this as I am finding new 
uses for it daily.

I know that you specifically mentioned the drag and drop reordering 
functionality in Mobile Chrome but I can confirm that it doesn't work in 
Mobile Firefox. However, what does work in Firefox is the pop-up context 
menu which doesn't seem to work on Mobile Chrome. If there was a "Move" 
option in there that put the stream in "draggable-mode", Firefox would have 
full functionality. I have no idea if that is possible though in the 
context of UI events and javascript or whether it doesn't work in Firefox 
due to it not having some core functionality.

One issue that I have been trying to find the best way to tackle is the 
concept of cloning tiddlers with streams. The current cloning will work in 
one sense in that you can create a clone tiddler, and it will look like the 
original, but they are kind-of siamese-clones in that they point to the 
same stream-children and if something is edited in the original stream, the 
clone stream gets changed too.

My use case for cloning would be to copy the content over to a new set of 
cloned stream-children pointing to a cloned parent so that I can use it as 
a baseline structure to edit ... specific examples would be a regular 
meeting agenda or a daily journal where you want to keep the structure but 
change some details.

Three ways that I see to implement this is:

1) A Copy-on-write approach where the new clone is tagged in some way such 
that a new stream-child is created when a change is made to it in the 
cloned parent ... keeping the unchanged ones linked because ... why not ... 
built in deduplication. 
It should be fairly easy to work out which children are linked from a 
cloned tiddler as the child prefix won't match the parent in your default 
naming scheme.

2) An option/button to also clone the stream-children on demand into the 
new cloned parent if desired. Either a config option that bakes it into the 
core clone button, a new clone-and-relink button or a right-click option on 
the stream controls to relink/clone children to a new parent.

3) A "destream"  option to convert a stream into a normal unordered list so 
that you can clone it normally and a corresponding "enstream" option that 
does the opposite to undo the destream on both copies. I am working on this 
option ... "destream" is pretty straight-forward (see below). "enstream" is 
trickier and I am still working out the way to do that. It seems like the 
less straightforward way but I think that it will have a nice dual purpose 
to import lists from other sources (like Word or html) into streams. I 
think some of the new search and replace functionality might make this 
possible.

This is what I have used to destream:
\define destream()
<$list filter="[<stream-child>get[stream-list]] +[enlist-input[]]" 
variable="stream-child">
<$list filter="[<stream-child>get[text]]" variable="stream-child-content">

*<div><span title=<<stream-child>>><<stream-child-content>></span>
<<destream>></div>
</$list>
</$list>
\end

<$vars stream-child=<<currentTiddler>>>
<<destream>>
</$vars>

It doesn't handle the block formatting (like !!headings) but I'm working on 
it.

I might abandon my efforts on 3) and do 2) since that seems more doable 
(but lacks the import functionality). 1) is more elegant but I haven't 
worked out how to do that as it might involve tweaking the innards of 
stream itself which I am lost in as soon as it gets into javascript.

Just food for thought.
/Mike
On Saturday, January 9, 2021 at 11:19:32 PM UTC-4 Anjar wrote:

> Thank you, Saq, this is amazing! If you feel for it: Hacker News (
> https://news.ycombinator.com/) is a great place to get constructive 
> feedback (they have a "Show HN" prefix) - and it would be a nice place to 
> promote TiddlyWiki more too!
>
> Best,
> Anders
>
> lørdag 9. januar 2021 kl. 23:07:10 UTC+1 skrev si:
>
>> This is great Saq. I've been playing with it mostly on Tiddloid (on a 
>> cheap Samsung). I'm amazed by how many great improvements you have made, 
>> and now super-excited for the next release. Streams is looking better than 
>> most 'conventional' apps.
>>
>> I have included several quibbles below, but only because it's hopefully 
>> more helpful to you than just saying that everything is great. My overall 
>> response, however, is overwhelmingly positive.
>>
>> Here are my thoughts (mostly relating to the mobile UX):
>>
>>    - Overall the mobile experience is way smoother. Drag and drop didn't 
>>    work for me before, now it works reliably. The area to tap in order to 
>> drag 
>>    and drop seems suitably large - I'm not finding that I have to re-tap to 
>>    find the right spot.
>>    - It feels like I have to hold down a little longer that I would 
>>    expect before the node becomes draggable. I know you wouldn't want it to 
>>    happen too quickly so as not to interfere with scrolling, but to me it 
>> just 
>>    feels too long. It's hard to say for sure without trying it for a longer 
>>    period, but I think it impacts the UX enough that it would probably 
>> prevent 
>>    me from bothering to use drag&drop at all on mobile.
>>    - It's hard to judge, but double tapping to enter edit-mode seems to 
>>    have less of a delay than in the current stable version. It's still got a 
>>    delay, but I guess this could have something to do with my cheap phone. 
>>    - I have found that whenever I double tap to close edit mode on 
>>    mobile I end up highlighting some text. In most cases this doesn't 
>> actually 
>>    affect the function, but I do find it mildly stressful.
>>    - Double tapping to the left of the text to works well, though 
>>    currently I don't instinctively do this. It also feels like it would be 
>>    more natural as a single rather than a double tap.
>>    - Swiping to open the context menu is super-useful. Currently it 
>>    seems that if a context menu is already open, switching to a context menu 
>>    on a different node requires two steps: tapping to close the menu, then 
>>    swiping to open a new one. I think it would be more natural if swiping on 
>> a 
>>    separate node did both of these things at once.
>>    - I tried the swipe-to-indent setting and found that it worked well, 
>>    and the lack of visual feedback/ability to undo doesn't strike me as a 
>>    massive problem. However I would probably not use this feature personally 
>>    as I feel that the context menu option is more useful.
>>    - The reduced indent level looks nicer in my opinion. The streams 
>>    look more like they are part of the tiddler, if that makes any sense.
>>    - The new control panel is super-sexy. I could easily tell what all 
>>    the settings did.
>>    - One thing that bothered me about the current release is that I 
>>    would occasionally create new nodes from tiddlers that already had titles 
>>    like "tiddler/timestamp" and end up with lots of tiddlers called 
>>    "tiddler/timestamp/timestamp/timestamp" etc. With the new control panel I 
>>    was able to change the title template to my own custom macro that ignores 
>>    any already existing timestamps when generating new titles. I wonder if 
>>    this should be the default behaviour? Here is the macro that I used:
>>       - \define new-streams-title()
>>       <$vars timestamp=<<now "[UTC]YYYY0MM0DD0hh0mm0ssXXX">> >
>>       <$list filter="[<stream-root-title>!regexp[^.*/\d{17}$]]">
>>       {{{ [<currentTiddler>addsuffix[/]addsuffix<timestamp>] }}}
>>       </$list>
>>       <$list filter="[<stream-root-title>regexp[^.*/\d{17}$]]">
>>       {{{ [<currentTiddler>splitbefore[/]addsuffix<timestamp>] }}}
>>       </$list>
>>       </$vars>
>>       \end
>>    - The last point doesn't relate directly to the new features, but I 
>>    might as well mention it here. I frequently find myself opening a tiddler 
>>    and seeing that I have a bunch of nodes left in edit mode, which I have 
>> to 
>>    toggle one at a time. It would be nice I think to have a way either for 
>>    nodes to be set to read-mode automatically (maybe triggered by opening 
>> the 
>>    tiddler for a node, or closing the streams tiddler), or an option to just 
>>    set all nodes to read-only in batch.
>>
>> Ok so now I realise that I have written a whole essay. Sorry. Thanks 
>> again for Streams, it's a super-plugin.
>> On Friday, 8 January 2021 at 18:14:53 UTC [email protected] wrote:
>>
>>> This is a preview of an experimental branch of Streams intended to 
>>> explore optimizations and new ideas. Not all of these changes will make it 
>>> to the final released version, depending on user feedback.
>>>
>>> Specifically, I am interested in feedback from regular users of Streams 
>>> who can compare these new changes to the stable released version.
>>> https://saqimtiaz.github.io/sq-tw/temp/streams-0.2-preview.html
>>>
>>> If you are new to Streams, I suggest looking at the latest stable 
>>> release instead:
>>> https://groups.google.com/g/tiddlywiki/c/1jTwdmq8cgI
>>> Performance improvements
>>>
>>> There are significant performance improvements. Very large streams now 
>>> render over 300% faster.
>>>
>>> This has involved drastically simplifying the HTML structure of nodes, 
>>> as well as optimizing the code used for drag and drop and the context menu.
>>>
>>> You can compare the rendering time for the tiddler "TiddlyWiki Toolmap" 
>>> on the old version 
>>> <https://saqimtiaz.github.io/sq-tw/streams-tiddlytoolmap-expanded.html> 
>>> versus 
>>> the new one 
>>> <https://saqimtiaz.github.io/sq-tw/streams-tiddlytoolmap2.html>.
>>>
>>> *Please pay attention to whether drag and drop and the context menu 
>>> still work as expected.*
>>>
>>> A lot of tweaks to the core code and custom widgets previously included 
>>> in Streams have been deprecated as they are now a part of 
>>> the TiddlyWiki core, making the plugin smaller and lighter to use despite 
>>> the addition of new features.
>>> Context Menu
>>>
>>> The context menu has been extended with *indent* and *unindent* options.
>>> UX tweaks
>>>
>>> *Drag and Drop*
>>>
>>> The area that can be grabbed to drag a node has been extended.
>>>
>>> Drag and drop now works relatively well in Chrome on Android *mobile*
>>>  devices.
>>>
>>> The modifier keys used to control the behaviour when dragging and 
>>> dropping a node are customizable
>>>
>>> *Double click*
>>>
>>> You can also double click inside the editor as well as in the area to 
>>> left of it to exit editing
>>>
>>> You can now double click the area left of a node as well as on the 
>>> content of a node to edit.
>>>
>>> If using the default editor, you can also turn off double click inside 
>>> the editor textarea
>>>
>>> *Swipe on touch devices*
>>>
>>> There is experimental support for swiping on nodes in touch devices
>>>
>>> Two modes are supported
>>>
>>> Swipe to indent / unindent
>>>
>>> Swipe to trigger a context menu on the node, from which you can 
>>> indent/unindent, open, delete etc.
>>>
>>> There isn't any visual feedback when swiping. Due to the lack of native 
>>> browser support this will not be implemented and therefore the behaviour to 
>>> indent/unindent for swipe is likely to be dropped as it can be difficult to 
>>> undo.
>>>
>>> *Miscellaneous*
>>>
>>> The max-width of a node is now customizable.
>>>
>>> The indent level of the stream root has been decreased.
>>> Settings Control Panel
>>>
>>> There is a new settings control panel for Streams, available both in the 
>>> Control Panel as well as the plugin tiddler.
>>> CodeMirror integration
>>>
>>> If the CodeMirror plugin is installed, there is a configuration option 
>>> in the Streams settings to choose the editor to use for Streams nodes.
>>>
>>> Testing and feedback is needed to make sure this works as expected, both 
>>> using codemirror as the editor and using the default editor. The areas most 
>>> likely to be affected are:
>>>
>>> - splitting a node by hitting Enter with the text cursor/caret in the 
>>> middle of some text,
>>>
>>> - hitting Enter with the cursor at the beginning of some text,
>>>
>>> - or hitting backspace with the cursor at the beginning of a text.
>>>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d1b93526-3ff0-4fa7-8168-ca646df01349n%40googlegroups.com.

Reply via email to