Giter VIP home page Giter VIP logo

streams's People

Contributors

saqimtiaz avatar zhangxiubo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

streams's Issues

Affordance for keyboard shortcuts for Streams

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.

Longer text - enter and alt-enter glitch?

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

  1. Expected: press enter to split text at cursor producing a 2nd node containing remainder of text.
    Experienced: enter deletes text after the cursor.

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.

  1. Expected: alt-enter to split longer text at each double new line and produce multiple nodes.
    Experienced: alt-enter deletes text.

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.

Codemirror editor and streams

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.

Questions about access control ?

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

root buttons compatibility for shadow tiddlers

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

Store relational data for root tiddler in sidecar config tiddler

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.

Feature request: return on empty node should delete the node

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

How to return current node title

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?

Preventing double clicking of a button widget from triggering edit mode?

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

Add a field "caption"

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.

Error when editing node after changing to markdown

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:

  1. Download new empty.html from TiddlyWiki.com
  2. Install Streams and Markdown plugins
  3. Create a new tiddler
  4. Add a new node
  5. Edit the node's tiddler to be the Markdown type
  6. Double-click in the first tiddler on the new node
  7. See error

Let me know if you have any questions or if this belongs in the main TW GitHub issues instead.
Thanks!

Improve breadcrumbs to not abridge words

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]] }}}/>

Duplicate node bug

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:

  • (1)Parent node(2)to be split
    • (3)Child node

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"

  • (1)Parent node
  • (2)to be split
    • (3)Child node

Thus, trying to unindent the (3)Child node results in:

  • (1)Parent node
  • (3)Child node
  • (2)to be split
    • (3)Child node

Thought I'd let you know in case this hasn't come up yet.
Best wishes
K

[bug?] Bullets become offset when font size is changed from the default

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:

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:

8px

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! :)

Optionally also allow editing the root tiddler via the Streams interface.

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.

Root's buttons missing when displayed on ipad

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:

image

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:

image

Swipe to indent/unindent with visual feedback

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.

Feature request: Drag and drop to add the same node to another stream.

Right now I am aware of two ways to copy nodes to a different Stream with drag and drop:

  • Holding shift creates a new node with the text transcluded.
  • Holding control creates a new node with the exact same text.

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!

Rename node based on first line of text

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.

Performance issues for larger trees

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?

Ctrl + Mouse drag does't work on Mac

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.

Use tiddlywiki's sidebar breakpoint in streams/styles

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.

`Maximum call stack size exceeded` error when rendering breadcrumb against a large lazy-loaded image-typed tiddler

  • It seems the breadcrumb attempts to render the 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.
  • If lazy-loading of image tiddlers is enabled, the breadcrumb will initially see a blank text field before the first time an image-typed tiddler is opened, so the breadcrumb renders the title fields instead; everything works.
  • As soon as the image-typed tiddler is loaded, the 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.

lost typing focus when adding node using Chinese input methods

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)
test

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.