saqimtiaz / streams Goto Github PK
View Code? Open in Web Editor NEWTiddlyWiki plugin for rapid data entry with a keyboard driven workflow. Divide content into smaller tiddlers as you write.
License: BSD 3-Clause "New" or "Revised" License
TiddlyWiki plugin for rapid data entry with a keyboard driven workflow. Divide content into smaller tiddlers as you write.
License: BSD 3-Clause "New" or "Revised" License
This may take the form of an overlay triggered via a keyboard shortcut and/or via a context menu item.
There is a suggestion to add the keyboard shortcut tiddler to the sidebar, however this implies a dependency on the default layout.
Thanks for this, it is very useful.
I've hit 2 quirks that I haven't been able to solve. Tested on a local, fresh, single-file TW 5.1.22 and your own demo site with streams 0.1.7. on Firefox 77.0.1. Linux
To reproduce:
Create a new tiddler 'Test', save and click the streams button.
Into the fresh stream 'editor' copy paste this longer post - from the TW forum
https://groups.google.com/forum/#!msg/TiddlyWiki/tTUKcHOObE0/zvBLRGDcBgAJ
Place the cursor at the end of the first paragraph, press enter, all the following text disappears.
To reproduce;
Create a new tiddler 'Test', save and hit the streams button.
Into the fresh stream editor copy paste this longer post - from the TW forum
https://groups.google.com/forum/#!msg/TiddlyWiki/tTUKcHOObE0/zvBLRGDcBgAJ
Press alt-enter with the cursor at the start of the text and the text disappears.
Press alt-enter with cursor at the end of the text and a single empty new node is created, original text remains.
Press alt-enter with cursor in the middle of a word or start of a paragraph and it splits the text at the cursor producing 2 nodes. (What I was expecting 'enter' to do.)
I tried a different piece of text from 'Great Expectations' here; http://www.gutenberg.org/files/1400/1400-0.txt
A different result!
Quirk 1 - pressing enter works as expected. Text is split at the cursor, a new node is produced with the remainder.
Quirk 2 - pressing alt-enter works but only to split once (it works the same as 'enter'). It doesn't split on double new lines to produce multiples.
I've checked that there are /n/n breaks in the text for alt-enter to find and they seem to be there, I put some more in just to be sure. I hope I'm not doing something thick and causing you unnecessary work. Thanks for a useful, elegant plugin.
I would like to know whether codemirror editor can be used for editing streams tiddlers. Only when a node is opened as a seperate tiddler, codemirror editor was working. Not when I tried to edit the node within the streams tree itself.
Refer to this page, I started tw with the following command on my computer:
tiddlywiki mywiki --listen host=127.0.0.1 credentials="./users.csv" "readers=(anon)" writers=mary
It can be found that visitors cannot edit the Wiki, but there are exceptions:
streams plugin can still works? click the + button, double-click the node, etc...
Is there anything else I need to set?
edit: oh, I see, although it can be modified, it seems that it has not been saved
Might be helpful in terms of having a better and less cluttered layout for the FAQs for instance.
Hi Saq, as requested.
The filter expression for root buttons in $:/plugins/sq/streams/nodes-list-template
is as follows:
<$list filter="[tag[$:/tags/streams/root-buttons]]" variable="btnTiddler">
<div class="stream-node-handle">
<$transclude tiddler=<<btnTiddler>>/>
</div>
</$list>
The current filter expression prevents tiddlers with the correct $:/tags/streams/root-buttons
tag to be displayed if they are bundled inside plugins (shadow tiddlers).
Recommend the filter expression be changed as follows:
<$list filter="[all[shadows+tiddlers]tag[$:/tags/streams/root-buttons]]" variable="btnTiddler">
<div class="stream-node-handle">
<$transclude tiddler=<<btnTiddler>>/>
</div>
</$list>
Reference discussion: https://groups.google.com/g/tiddlywiki/c/-xTFWPwzq6g
A different mode of operation where it does not alter the root tiddler. The problem right now is that if you want to take notes on a shadow tiddler, or a tiddler from a different source that should not be changed, the action of adding nodes with Streams will change the tiddler by manipulating its stream-list field.
An alternate way of handling the same would be to store the stream-list field for the root tiddler in a separate sidecar config tiddler, for example $:/config/streams/stream-list/
This would also allow for workflows like using Streams to take notes on read-only slides tiddlers, that might have been auto imported or synced from the teacher's tiddlywiki.
One could take this a step further and store relational data for an entire stream in a config tiddler. This might also allow for nodes participating in multiple streams. However, the downside would be that manipulating Streams tiddlers would become a lot more complex.
Currently <<stream-root-title>>
doesn't work if it is run inside a node tiddler, so having a field root-title
like parent
could solve this problem.
Hi Saq,
I'm really enjoying Streams in my own tiddlywiki! However, sometimes I want to do a quick edit on my mobile phone. Since I cannot press keyboard shortcuts on my smartphone, I can't 'exit' edit mode.
Would it be an idea to cancel edit mode by pressing return on an empty node? Thus pressing return twice in a row.
Kind regards,
Hans
Opt in plugin updates notifications feature.
Would check a remote file with a version number on wiki load and offer to fetch and install newer versions.
I want to return the current node title in the same way <stream-root-title>
returns the title of the current tiddler, how can I do it?
Hello.
The double click to edit is a superb feature that I enjoy very much.
Sometimes though a stream node may contain a button widget that will need to be triggered more than once in a rapid fashion, which leads to accidentally entering the edit mode. Would it be possible to prevent this specifically when the click is interacting with a button widget?
If this is impossible, a slight improvement would be a config to shorten the timing that is considered a double click.
Best wishes
~K
Hi,
Thanks for the plugin.
I want to know if the plugin provides an option to make the "caption" field of the sub-node to "<$view field=text>" or some others.
When I use the streams plugin with tiddlymap, the node in tiddlymap can only show text in the "title" or "caption" of the tiddler. Hence, we can make a mind map with tiddlymap by this option.
does not occur in desktop safari. tested with ios 14.3, 14.4.2, 14.5.1 (there is a separate issue with 14.5.1 where merging does not display a dialog with prompt on, and does not merge except when new node is made using split on enter key, then backspace to merge)
I noticed an error when changing a node to the Markdown tiddler format and then double-clicking to edit it from the parent node's tiddler.
Error is:
Uncaught Reference error: EDITOR_MAPPING_PREFIX is not defined
I am using the latest version of Chrome on Windows 10 and Android 12.
Steps to reproduce:
Let me know if you have any questions or if this belongs in the main TW GitHub issues instead.
Thanks!
From https://groups.google.com/g/tiddlywiki/c/-xTFWPwzq6g/m/K98n6_NZAgAJ
I have made the following tweak to the text display for the breadcrumbs. It's a very minor thing, but in my opinion looks nicer than just cutting off the title mid-word:
<$text text={{{ [<display-title>length[]compare:number:lt[40]then<display-title>] ~[<display-title>split[]first[40]join[]trim[]addsuffix[...]] }}}/>
That is definitely a nice idea. I wonder if we might take it a step further and just drop the last word (which may be incomplete). This is untested:
<$text text={{{ [<display-title>length[]compare:number:lt[40]then<display-title>] ~[<display-title>split[]first[40]join[]trim[]search-replace:g:regexp[(.*)\s(\w+)$],[$1]] }}}/>
Hello!
Huge thank you for the plugin, it has quickly become an integral part of my note-taking workflow.
I finally elucidated a minor bug that kept slightly annoying me every now and then, that ends up mispositioning a node in two places. Tested in https://saqimtiaz.github.io/streams/.
Imagine a following node structure:
Now I split the parent node in half by pressing enter at the middle.
Child node is now only in the stream list of "(2)to be split" but the parent of "(3)Child node" is still "(1)Parent node"
Thus, trying to unindent the (3)Child node results in:
Thought I'd let you know in case this hasn't come up yet.
Best wishes
K
Bullets and text go out of line when font size is changed. For example here is a snippet from the Streams demo with the default font size of 14px:
Go to ControlPanel > Appearance > Theme Tweaks
and set Font size to 8px. Here is a snippet of the same text with the adjusted font size:
Now the bullets and text are out of line. Hardly a huge issue, but in my opinion it can make a Stream containing a lot of nodes quite a bit less pretty.
I see this behaviour in both Firefox 105.0.1 and Brave 1.43.93 on Windows 10.
Thanks for this most useful software! :)
Consider:
.squi-form-label {flex-grow:1}
input.squi-form-input {flex-grow:2}
Use case: a user might want to add tags (e.g. todo
) to a node when editing them in-place; currently the user needs to open the tiddler to manipulate the tags. Perhaps there can be a built-in way to add/remove tags when the inline node editor is active?
This would need to be an optional parameter in the Streams macrocall. The challenge will be to accommodate both workflows without duplication.
This might be useful when transcluding a stream via a template elsewhere than the story. For usage in the story itself, customization would be needed by the user to suppress the regular display of the text of the tiddler.
On Ipad, the screen left margin is so tight that there is no space for Expand/Colapse buttons to be displayed.
See the red ellipses on the picture:
EDIT:
If you put the zoom to 90% and dark background colour you can see that the Expand/Collapse buttons are there but outside of the tiddler, see picture:
A quick attempt at implementing this via wikitext went far better than expected. There is a slight issue with premature snap back at times, possibly when the finger slips. It may be necessary to add a delay before triggering the swipe-end event.
Also at times the swipe event gets triggered before there is a chance for the visual feedback to occur. Once option here would be to not use the swipe event to trigger the swipe actions, but rather the swiping event reaching the desired threshold + swipe-end.
Consider adding the option to rename a dragged and dropped node to change its title prefix to match the new root.
The issue is that this is highly dependent on the title configuration being used.
This may not be feasible unless we are willing to limit the title configuration to a choice between a free pre-defined presets.
See https://groups.google.com/g/tiddlywiki/c/-xTFWPwzq6g/m/zNJ_9iLRAgAJ
Right now I am aware of two ways to copy nodes to a different Stream with drag and drop:
I have found instances where it is useful to have the exact same node appear in separate streams, so that if I edit one of them the other is also updated. This is different to just a transclusion since it is bi-directional.
Currently I do this by just adding the name of the tiddler to the stream-list of the new stream, but it would be cool if it could be done with a drag and drop mechanism. Maybe holding the alt key or ctrl+shift or something.
Anyway thanks so much for the great plugin!
As mentioned in the issue linked above, is it possible to add support for streams in tiddlyclip. Is there anything you can do from your part regarding this. If not, feel free to close this issue.
$:/config/RelinkOnRename
tiddler needs to be set to yes
When saving a node, rename it based on the contents of the first line. Could be triggered by the firstline being a heading, or any text. Might be useful to provide a customizable template so that the node could be renamed for instance to <root>/<heading>
.
The catch is that the UX differentiation between saving and exiting editing will need to be made clearer.
Thanks for the great work! I noticed that editing in a larger tree is pretty slow making typing sluggish. It would be great if the editing behaviour could be changed so that the edits are only applied after a few seconds of inactivity or when the editor is closed?
On Mac when using ctrl + mouse drag to create a copy of node, a right click is automatically simulated by the OS making it impossible to copy the node with ctrl.
Review, revise and add to docs:
https://groups.google.com/g/tiddlywiki/c/-xTFWPwzq6g/m/BrtTmMAmAwAJ
At the moment streams uses fixed values in the styles tiddler:
@media only screen and (max-width: 600px)
It would be ideal to use the default sidebar breakpoint value stored in
$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint
for better compatibility and customization.
Replace current UI for renaming tiddlers which uses the action-withinput
widget in light of deprecation of prompt()
by browsers.
text
field of the parent tiddlers to use as path segments, provided that the field is not blank; otherwise the title
field is used instead.text
field before the first time an image-typed tiddler is opened, so the breadcrumb renders the title
fields instead; everything works.text
field becomes populated with the encoded string representation of the image. In the case where the image is very large, some of tiddlywiki's functions (split[]
, I guess?) can break trying to parse the long string.A simple fix is to omit image-typed and binary-typed tiddlers when generating the breadcrumb. In $:/plugins/sq/streams/breadcrumbs-view-template:17
, instead of:
<$wikify name="display-title" text={{{ [<currentTiddler>get[text]!is[blank]] ~[{!!title}] }}}>
one can change it to:
<$wikify name="display-title" text={{{ [<currentTiddler>!is[image]!is[binary]get[text]!is[blank]] ~[{!!title}] }}}>
which resolved the issue for me.
hi saq, really loving streams, thanks! just did a few days of testing with the tw prerelease and noticed this issue with the swiping, confirmed with a fresh 5.2.0 empty and latest streams 1.2.22, on ios 14.8 ipad safari. also tested with ios 14.3 on iphone safari. hth!
forgive my English is not very good.
Wiki about Chinese input method: https://en.wikipedia.org/wiki/Chinese_input_methods_for_computers
As the title says, when I click the "add node" button, start typing in the empty input box that appears, the first keystroke will invalidate the input method. I have to wait a few seconds and start typing again to input Chinese characters normally.
Below is an animated picture, which may be more vivid.(I wanna input 测试(test), the first keystroke "c" failed)
In Notion, we can have an outline and a normal note inside the same page. Can we do this in tiddlywiki with streams?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.