Free Button - Toggle Side bar Tabs

108 views
Skip to first unread message

TonyM

unread,
Jan 31, 2020, 10:54:21 PM1/31/20
to TiddlyWiki
From my Recent thead TiddlyWiki BaaS - Free Buttons as a service

Please find attached a demonstration button "Toggle Side bar Tabs"
  • Closing the side bar tabs, especially in large wikis can help with performance
  • This provides a Page Control button, you could use elsewhere to toggle the side bar tabs
  • You can keep access to the Title, Page Buttons and search without closing the side bar

Feedback invited
  • Is JSON file distribution OK?
  • Should I include the bundle tiddler (See marios bundles plugin)?
  • Absolutely anything else good or bad
toggle-side-bar-tabs.bundle.json

Mat

unread,
Feb 1, 2020, 4:44:02 AM2/1/20
to TiddlyWiki
TonyM wrote:
Feedback invited


I'll try it out in the weekend but here's a little feedback: IF you hope for people to try it out, it is MUCH better to put up an accessible demo e.g on tiddlyspot. Expecting people to download + install, which often also means that one first has to go get an empty TW, surely diminishes the number of people trying it out. With that said; thank you for creating and sharing stuff!!

<:-)

A Gloom

unread,
Feb 1, 2020, 4:58:57 AM2/1/20
to TiddlyWiki
Expecting people to download + install, which often also means that one first has to go get an empty TW, surely diminishes the number of people trying it out. With that said; thank you for creating and sharing stuff!!

It's not as convient as a online demo, but with example tiddlers people post here with coding problems-- I d/l the tiddler and import it into tiddlywiki . com and experiment with it there.

@Tony

this button (from the wiki I posted screenshots of) hides default tabs leaving just user created tabs


\define show-sbartabs()
<$action-setfield $tiddler="$:/state/systabshide" text="unlock" />
<$action-setfield $tiddler="$:/core/ui/SideBar/Tools" tags="$:/tags/SideBar" />
<$action-setfield $tiddler="$:/core/ui/SideBar/More" tags="$:/tags/SideBar" />
<$action-setfield $tiddler="z# utility side tab" tags="$:/tags/SideBar" />
<$action-setfield $tiddler="z Odd Stuff" tags="$:/tags/SideBar" />
\end
\define hide-sbartabs()
<$action-setfield $tiddler="$:/state/systabshide" text="lock" />
<$action-setfield $tiddler="$:/core/ui/SideBar/Tools" tags="" />
<$action-setfield $tiddler="$:/core/ui/SideBar/More" tags="" />
<$action-setfield $tiddler="z# utility side tab" tags="" />
<$action-setfield $tiddler="z Odd Stuff" tags="" />
\end
<$reveal type="nomatch" state="$:/state/systabshide" text="unlock">
<$button actions=<<show-sbartabs>> class=<<tv-config-toolbar-class>> tooltip="Show system tabs">
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
<span class="svgcolred">{{$:/core/images/locked-padlock}}</span>
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text"><$text text="hide/
reveal tabs"/></span>
</$list>
</$button>
</$reveal>
<$reveal type="
match" state="$:/state/systabshide" text="unlock">
<$button actions=<<hide-sbartabs>>  class=<<tv-config-toolbar-class>> tooltip="
Hide system tabs">
{{$:/core/images/unlocked-padlock}}
</$button>
</$reveal>


TonyM

unread,
Feb 1, 2020, 7:24:58 AM2/1/20
to TiddlyWiki
A gloom

That has some degree of control, over what's presented. For me the objective was to hide them all on large wikis just for performance.

I will try yours.

Thanks for sharing. Did you look inside my button to see how its designed. With a view to clone and reuse. You could make one for each tag as you did.

Actualy I made a system in my key wiki to allow any tab to me move onto the side bar, back in a tab and hide it as well.

I wonder if there is a best solution or just different ones. There are so many ways do do things in tw.

Regards
Tony

TonyM

unread,
Feb 1, 2020, 7:49:28 AM2/1/20
to TiddlyWiki
Mat

I will take what you say on board.

I find that last step a little frustrating. I want to automate that step but don't like single purpose wikis, and empty is too vanilla. Clearly I must do something. Since I may share a lot of buttons I will want a single site to publish buttons.

Since it is a non plugin json you can drop it on tiddlywiki.com to test.

For experiments I down load empty to a scratch folder and drop things on that. Sometimes I download all tiddlywiki.com if I want a lot of content. I Do not think your way, because my own work flow is different.

However I do want them accessible.

thanks for the feedback

Ps this buttons not rocket science but look at its design. It took my 5 mins from my button factory.

Regards
Tony

Mat

unread,
Feb 1, 2020, 8:19:17 AM2/1/20
to tiddl...@googlegroups.com
TonyM wrote:

don't like single purpose wikis, and empty is too vanilla.


What I hope to describe in this thread should be applicable for your needs too. Basically one complex central TW that pushes a filtered set of tiddlers to (e.g) single purpose wikis. Considering your experiments with buttons it may just be a perfect use case! Basically it would, in the central TW, use a separate save button for each such single purpose wiki.

<:-)

TonyM

unread,
Feb 1, 2020, 8:38:40 AM2/1/20
to TiddlyWiki
Mat

Interesting link also connected within https://groups.google.com/forum/m/#!topic/tiddlywiki/21BnNYG30eM

I think we are all seeing a new breakthrough arriving.

Rather than using empty like Jeremy suggest perhaps a demo wiki designed to present the item being demoed with instructions source and config notes all in a virtual wiki. Never create another demo wiki just provide a link or bookmarklet with the tiddlers to be the demo in it.

Tony

Tony

Ton Gerner

unread,
Feb 1, 2020, 11:26:36 AM2/1/20
to TiddlyWiki
Hi Tony,

An impressive piece of work.
I haven't had the time to look into the internals, but will do later.

It always strikes me this functionality can be also be done with one line of wikitext:

<$checkbox tiddler="$:/core/ui/SideBarSegments/tabs" tag="$:/tags/SideBarSegment"> Sidebar tabs</$checkbox>

And although you can disguise checkboxes as buttons (as Mat already mentioned in the other thread), I do use buttons as well instead of checkboxes ;-)

Some remarks to be inline with the TW5 layout:
  1. Under the Tools tab, the information next to the checkbox of the 'Hide sidebar button' misses a real button (with icon + caption text). The tagpill can be better left out. Description as: 'Toggle the sidebar tabs on/off' would be enough.
  2. Under Control panel > Appearance > Toolbars > Page Toolbar: the text next to the button (in the core buttons in the caption field) needs to be in lowercase and needs to be short (this caption text is the same as in the buttons under the Tools tab!). The description thereafter (in the core buttons in the description field) the same as under the Tools tab.
Cheers,

Ton
Hide_tabs_button.png
Reply all
Reply to author
Forward
0 new messages