[TW5] Transcluded Menu Bar for Tiddlers in a Tabset? (Using /tobibeer/inc Plugin?)

265 views
Skip to first unread message

Scott Simmons (Secret-HQ)

unread,
Jan 17, 2016, 12:33:28 AM1/17/16
to tiddl...@googlegroups.com
Tobias, et. al. —

Is there a way to use the tobibeer/inc plugin to display the on-hover toolbar for transcluded tiddlers displayed in tabsets?

Because that would be FANTASTIC.

Tobias Beer

unread,
Jan 17, 2016, 6:20:13 AM1/17/16
to TiddlyWiki
Just on mobile atm. I'd think it boils down to whether or not the core uses a (/which?) template for tabcontents… or whether we'd have to actually override the core tabs macro.

I'd argue that all macros should:

- use templates wherever possible
- by pointing not to the actual template but rather another system tiddler defining a reference to the eventual core template -> so we hardly ever override a core template but rather point to another one

Scott Simmons (Secret-HQ)

unread,
Jan 17, 2016, 6:52:59 PM1/17/16
to TiddlyWiki
On Sunday, January 17, 2016 at 6:20:13 AM UTC-5, Tobias Beer wrote:

I'd think it boils down to whether or not the core uses a (/which?) template for tabcontents… or whether we'd have to actually override the core tabs macro.

It doesn't look like $:/core/macros/tabs uses any separate templates except one that can (optionally) be passed into the tabs macro to control how the contents of tabs are displayed.  (I may be reading that wrong, but I think that's what's going on.)

I can almost get it to work by overwriting the core shadow tiddler and inserting the <DL> code <$tabs>'s native <$list> macro (see attached screenshot, where purple are the insertions).  The hover menu's positioning is off a bit, but I could tweak the <DD> class to address that.  More importantly, I get this error in all the tabs:

Recursive transclusion error in transclude widget

(though I'm not sure what specifically is being transcluded into itself).
incWithTabsets.png

Scott Simmons (Secret-HQ)

unread,
Jan 17, 2016, 7:13:59 PM1/17/16
to tiddl...@googlegroups.com
On Sunday, January 17, 2016 at 6:52:59 PM UTC-5, Scott Simmons (Secret-HQ) wrote:

(though I'm not sure what specifically is being transcluded into itself).

Oh!  Looking again, I guess it's the <<{>> macrocall.  Switching to <$macrocall $name="tb-inc" text=<<currentTab>> /> eliminates the recursive transclusion problem — but now I can see the results are a bit mixed.  I'm inheriting a bold font weight on the tiddler transcluded into the tab, and it seems the hover bar doesn't show up if the tab to be transcluded actually exists and has content.
transcludedTab.png

Tobias Beer

unread,
Jan 18, 2016, 9:56:50 AM1/18/16
to tiddl...@googlegroups.com

Scott Simmons (Secret-HQ)

unread,
Jan 18, 2016, 5:32:09 PM1/18/16
to TiddlyWiki
On Monday, January 18, 2016 at 9:56:50 AM UTC-5, Tobias Beer wrote:

Man, oh, man — this is, as the kids say, the best thing evar!

Thanks, Tobias!

Alex Hough

unread,
Jan 19, 2016, 8:59:37 AM1/19/16
to TiddlyWiki
great idea!

Alex

--
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/62f80c28-af0a-4715-a253-cda08ece4a82%40googlegroups.com.

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

Tobias Beer

unread,
Jan 20, 2016, 10:46:19 AM1/20/16
to TiddlyWiki
Hi Scott,
 
Man, oh, man — this is, as the kids say, the best thing evar!

Happy to see you... happy. :-)

There appears to be an issue concerning the plugin library though,
whereas using a tabs template like so will break the ability
to add plugins using the "Get more plugin" ui.
What you will find is that it won't list any plugins from a library.

I have already made a pull request to fix it here:

#2245 retrieves url from connectionTiddler for modal to AddPlugins

To manually fix it, overwrite the file in the PR in your wiki.

Best wishes,

Tobias. 

Scott Simmons (Secret-HQ)

unread,
Jan 21, 2016, 2:02:27 AM1/21/16
to TiddlyWiki
Thanks for the heads-up!  Inc's new super power has driven me tabs-crazy (well, more than I already was).  It's great to be only one click away from the source tiddler of a tab at any given moment — without having to manually add links in tiddlers pointing to themselves.

On Wednesday, January 20, 2016 at 10:46:19 AM UTC-5, Tobias Beer wrote:

To manually fix it, overwrite the file in the PR in your wiki.

Do you mean the plugin repository shadow tiddler ($:/core/ui/ControlPanel/Plugins)?  Or the inc tabs template ($:/plugins/tobibeer/inc/templates/tabs)?

(Can I just temporarily disable the plugin when checking the plugin library?)

Tobias Beer

unread,
Jan 21, 2016, 4:00:59 AM1/21/16
to TiddlyWiki
Hi Scott,
 
To manually fix it, overwrite the file in the PR in your wiki.

Do you mean the plugin repository shadow tiddler ($:/core/ui/ControlPanel/Plugins)?  Or the inc tabs template ($:/plugins/tobibeer/inc/templates/tabs)?
 
Hi Scott, I mean the file changed in this Pull Request:

#2245 retrieves url from connectionTiddler for modal to AddPlugins


(Can I just temporarily disable the plugin when checking the plugin library?)

Not simply.

Best wishes,

Tobias. 

Scott Simmons (Secret-HQ)

unread,
Jan 21, 2016, 7:53:41 AM1/21/16
to TiddlyWiki
On Thursday, January 21, 2016 at 4:00:59 AM UTC-5, Tobias Beer wrote:

I mean the file changed in this Pull Request:

#2245 retrieves url from connectionTiddler for modal to AddPlugins


Thanks!

I was thinking "PR" = "plugin repository" instead of "pull request."  :D

Scott Simmons (Secret-HQ)

unread,
Jan 31, 2016, 10:25:00 AM1/31/16
to tiddl...@googlegroups.com
Hi, Tobias —

I hadn't realized it until last night, but there are some other complications from the modified $:/core/macros/tabs.  These crop up in the info panel:
  • Only the most basic fields (caption, tag, and title) get listed under fields.  (Look at a plugin tiddler for comparison.)
  • Tagging, References, List, and Listed all show as empty (even if they're not for the current tiddler).
  • Advanced displays information about $:/core/ui/TiddlerInfo/Advanced rather than the current tiddler.
I haven't dug in hard, but I wonder if it might be possible to restrict the effects of your tab wizardry to .tc-tiddler-body and thus sidestep the issue.  (That would mean no more hover menus in the sidebar, but perhaps that's a good thing.  Certainly the way I've been nesting tabs to create complex sidebar menus, I'd considered trying to make that limitation myself.  But such a modification might prevent the hover menus from scrambling up the info panel, too.)

Andrew Whiting

unread,
Feb 24, 2016, 6:21:22 AM2/24/16
to TiddlyWiki
Hi Scott, 

I'm having the same problem. Did you figure out how to fix it?

Andrew

Scott Simmons (Secret-HQ)

unread,
Feb 25, 2016, 6:17:23 PM2/25/16
to TiddlyWiki
Funny you should mention that, Andrew — !

I took a stab at modifying inc but ultimately decided the best solution for me was to write a simpler macro of my own and add it the core tabs macro to display a "go to" button in tabsets.  I've been pleased with it, but I just tore into it on Tuesday night to try to make it compatible with substories as well as tabs.  I'll take a look after dinner, see if I can clean it up, and post the tiddlers here later tonight.  :)

Scott Simmons (Secret-HQ)

unread,
Feb 26, 2016, 4:42:44 AM2/26/16
to tiddl...@googlegroups.com
That took longer than I thought.  (Crazy day!)

See how you like this approach:


It doesn't have all the bells and whistles of the inc toolbar, but it does display a quick button pushed into the far-right tiddler margin that allows you to go to the source of a tab.  I don't have it packaged up as a plugin at the moment because I keep tinkering with it and partnering it up with other things — but if you install the first three tiddlers listed on that page, you'll have its component parts.  (The fourth tiddler is a cloned version of the core macros tiddler for doing things like this.)

Be aware that I've modified $:/core/macros/tabs to include the "source button."  I'm trying to stay away from modifying core tiddlers where I can, but that was the best way to make this work.
Reply all
Reply to author
Forward
0 new messages