[TW5] resizable SideBar

216 views
Skip to first unread message

Edward Bassett

unread,
May 25, 2015, 8:20:39 PM5/25/15
to tiddl...@googlegroups.com
Hi, all.
I have been using TWC for several years now, and consider it a fine piece of software - kudos to Jeremy and all contributors.
I am now evaluating TW5, and it looks even more impressive, a feat of design.
Anyway, I have a few questions, which I will submit in separate threads in order to keep the discussion followable.

Question 4:
Is it possible to have a runtime-resizable SideBar?
I guess that would have to be done with HTML frames.
I mean the kind of thing where the *browser* puts a draggable border between the StoryRiver and the SideBar, and it's a trivial matter of dragging that border to arbitrarily resize the two frames on either side of it.

I am aware of http://tw5tristate.tiddlyspot.com/ and http://inmysocks.tiddlyspot.com/#TiddlerWidthSettings, and they are both excellent options, but not *exactly* what I am looking for - so I might as well ask.

Cheers,
-Edward

Mat

unread,
May 26, 2015, 7:02:46 AM5/26/15
to tiddl...@googlegroups.com
Probably not exactly what you want, but I just created this:

Theme Tweak Size Sliders (the link shows all relevant tiddlers)

My hope is for more visual elements for the CSS in TW.

As seen in the tiddler there, I've inelegantly repeated a lot of wikitext and hope to find some method to instead use a template.


<:-)
TWaddle.tiddlyspot

Eric Shulman

unread,
May 26, 2015, 8:53:49 AM5/26/15
to tiddl...@googlegroups.com
please don't distribute my range.js widget yet. although it does work, it's not done... there are a few more parameters to implement such as formatted output for setting css attributes that include dimensions (e.g., em, px, %, etc.)

also, it's name has changed to use the "TWBook/" prefix, and it has not been not been packaged as a plugin yet. until i have officially published it as a plugin, i have made NO commitment to provide any support for it, and it is subject to changes without notice or assurances of backward compatibility.

-e

Eric Shulman

unread,
May 26, 2015, 9:44:45 AM5/26/15
to tiddl...@googlegroups.com
If you just want a default range control, you can use the <$edit-text> widget, like this:
   <$edit-text tag="input" type="range" tiddler="..." field="..."/>

In fact, if the existing $edit-text widget were extended so it recognized a few extra params: "min", "max", and "step", there would be no need for my range.js widget at all!   hmm... I think I need to write a ticket for Jeremy :)

-e

Mat

unread,
May 26, 2015, 9:59:24 AM5/26/15
to tiddl...@googlegroups.com
Eric wrote
 
please don't distribute my range.js widget yet. 

Oh, sorry! (Just so there is no misunderstanding, you didn't express this in that other thread.)

I'll of course do what you ask me to: Do you want me to remove it from TWaddle, including my *usage* of it? I obviously use and like it so I must ask if it would be OK to use it if I replace the tiddler head of it with the following (see below). This would remove commitment from your side and if anyone has questions I'm responsible to explain. As soon as you have an official release I'll replace it. Would this work?

<:-)

/*\
title: -----------
type: application/javascript
module-type: widget
author: momentarily undisclosed (it's not Mat. Ask Mat for explanation if necessary)

Derived from $:/core/modules/widgets/checkbox.js

\*/
 

Eric Shulman

unread,
May 26, 2015, 10:43:00 AM5/26/15
to tiddl...@googlegroups.com
On Tuesday, May 26, 2015 at 6:59:24 AM UTC-7, Mat wrote:
Eric wrote

please don't distribute my range.js widget yet. 

Oh, sorry! (Just so there is no misunderstanding, you didn't express this in that other thread.)

yes... that's true... it's just not ready for distribution... and, might not be needed...

I'll of course do what you ask me to: Do you want me to remove it from TWaddle, including my *usage* of it? I obviously use and like it so I must ask if it would be OK to use it if I replace the tiddler head of it with the following (see below). This would remove commitment from your side and if anyone has questions I'm responsible to explain. As soon as you have an official release I'll replace it. Would this work?

In a separate post on this thread, I noted that you can use <$edit-text tag="input" type="range" ...> to get a "simple" range control, without using any widget.  The only thing missing is the ability to set the min/max/step values.  I think the best implementation is to add support for those params to the core's edit-text widget. Then there's no need for me to publish the widget.

-e

Mat

unread,
May 26, 2015, 12:46:20 PM5/26/15
to tiddl...@googlegroups.com
@Eric

I have removed all stuff involving the range slider now from TWaddle and will look into how to use it without your widget.

Thanks for engaging in the matter!

<:-)

Eric Shulman

unread,
May 26, 2015, 3:22:30 PM5/26/15
to tiddl...@googlegroups.com
On Tuesday, May 26, 2015 at 9:46:20 AM UTC-7, Mat wrote:
I have removed all stuff involving the range slider now from TWaddle and will look into how to use it without your widget.
Thanks for engaging in the matter!

@mat I don't want to give you the impression that I was upset in any way.  It's just that, after having written the range.js widget, I realized that it wouldn't be needed at all IF the $edit-text widget can be extended to handle the "min", "max" and "step" parameters (which is *currently* doesn't).  As such, the range.js widget is, in my opinion, a temporary "polyfill" for some missing core bits.

The only problem is that your TWaddle examples are setting min and max to other values, and without being able to specify these params, the range control will default to min=0, max=100, step=1.  Assuming Jeremy is willing to add support for min/max/step params in $edit-text, then your current usage would be nearly the same, except you would replace <$range ...> with <$edit-text tag="input" type="range" ...>.  The rest would be the same.

-e


Mat

unread,
May 26, 2015, 5:43:25 PM5/26/15
to tiddl...@googlegroups.com
@Eric, no worry. Thanks for engaging in the issue. I think I'll find some workaround with the simpler variant you suggest until the issue is fully resolved.

<:-)

Mat

unread,
May 26, 2015, 5:48:51 PM5/26/15
to tiddl...@googlegroups.com
BTW, please do write an issue so Jeremy sees it, as you mention (or better yet, a pull ;-) I think the proposal makes sense and I see this as a useful function. I hope we will be able to make CSS and stylesheet settings much more user friendly, partly by using this type of range element.

<:-)

Jeremy Ruston

unread,
May 27, 2015, 8:44:41 AM5/27/15
to TiddlyWiki
I'd welcome a pull request for the additional attributes on the edit-text widget. The docs will also need to be updated; the modified tiddler should go in the prerelease edition so that it doesn't get included in content refreshes of 5.1.8.

Best wishes

Jeremy.


On Tue, May 26, 2015 at 10:48 PM, Mat <matia...@gmail.com> wrote:
BTW, please do write an issue so Jeremy sees it, as you mention (or better yet, a pull ;-) I think the proposal makes sense and I see this as a useful function. I hope we will be able to make CSS and stylesheet settings much more user friendly, partly by using this type of range element.

<:-)

--
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 post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d624e21d-9d03-4f31-9c69-f4417b432253%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Mat

unread,
May 27, 2015, 12:36:35 PM5/27/15
to tiddl...@googlegroups.com
@Edward (and perhaps also @Eric)

I have now updated the range sliders to set the sized in the Theme Tweaks, including for the Sidebar as you ask for Edward. Go to the Controlpanel>Size Sliders.

It is a hovering frame to keep it in place even when you're changing values. It stays in place for most of them at least. A more serious difficulty is what Eric hints brings up; there is no min or max which makes some sliders very sensitive. I've indicate where to be careful.

Hope to improve it in the future.

<:-)

Edward Bassett

unread,
May 27, 2015, 1:46:06 PM5/27/15
to tiddl...@googlegroups.com
Nice, thanks.
I find it's much easier to just click once on the slider control and then use the keyboard left/right arrow keys to change the value; that gives a much smoother experience.
Cheers,
-Edward

Måns

unread,
May 27, 2015, 2:02:17 PM5/27/15
to tiddl...@googlegroups.com
Hi @Mat

I love reading your Twaddle TW site. It full of great ideas!! :-P
It's also great fun to play with the sliders!
I was wondering if it would be possible to add arrow up arrow down shortcut key bindings when you hover over the slider? Something like mouse dragging up or down on a value field is very common in programs like Unity, Blender etc ... works great for those.

When you alter the story width, tiddler width etc. - you'd really wish you'd have some kind of a draggable controlpoint in the middle between the story column and the right sidebar to control all at once :-)

Thank you for Twaddle - It's very inspiring/inspired work!!

Cheers Måns Mårtensson

Måns

unread,
May 27, 2015, 2:05:06 PM5/27/15
to tiddl...@googlegroups.com
Hi Edward

I find it's much easier to just click once on the slider control and then use the keyboard left/right arrow keys to change the value; that gives a much smoother experience.

Aah - It actually works like that :-) Thank you for pointing that out :-)

Cheers Måns Mårtensson

 

Mat

unread,
May 27, 2015, 3:06:03 PM5/27/15
to tiddl...@googlegroups.com
I find it's much easier to just click once on the slider control and then use the keyboard left/right arrow keys to change the value; that gives a much smoother experience.

AH - that was news to me! In deed smoother for what otherwise can easily "shoot off" in some direction.

<:-)

Mat

unread,
May 27, 2015, 3:48:47 PM5/27/15
to tiddl...@googlegroups.com
@Måns
 
When you alter the story width, tiddler width etc. - you'd really wish you'd have some kind of a draggable controlpoint in the middle between the story column and the right sidebar to control all at once :-)

Yes, I agree. I think this would be possible:

Make the story column width and the sidebar fetch their position value from the same "source" (see below).
A range slider is stretched (CSS?) across the screen and perhaps made invisible except the handle (CSS!).
The "source" is set by multiplying: "slidervalue * 0.01 * screenwidth"  (the 0.01 is to get per cent)

If the rangeslider is in a regular tiddler, then it will only show up when the tiddler is open. 
Or there could be some checkbox in ctrlpanel to make the handle show up. This could control to show several such handles on the screen for drag-resizing...
 

Thank you for Twaddle - It's very inspiring/inspired work!!

Thanks for your kind words. If you find inaccuracies - false claims, wrong credits, missing warranted credits (many for sure!!!) or anything you feel isn't right - please tell me.


<:-)
Reply all
Reply to author
Forward
0 new messages