Closed rubaboo closed 1 year ago
Hi @nameanyone that's a good idea. Would you be interested in working on a pull request?
Sorry, I'm not that skilled yet. I've done some trivial submits before.
Hi @nameanyone no problem, your contributions are much appreciated as is!
Would it be sensibe to have an optional configuration tiddler right under that namespace, e.g.:
title: $:/core/ui/SideBar/More/horizontal
...the sheer presence of which would trigger the desired magic via conditional variable asignment?
While documented, this could be a feature that ain't in the controlpanel. Is that advisable? Maybe we can, indeed, have some "TiddlyWiki Configurator" plugin... providing all options, also currently hidden ones, perhaps as a flat list. That one can "throw it out" when done.
IMO a little bit of new CSS should be enough to achieve this behaviour. There is no need for a new configuration tiddler and conditional layout handling. ... If CSS is not enough, its a bug.
I had a closer look and I still think, it should be possible to solve it using CSS. .. But messing with the tiddler code is much easier today, than it has been 7 years ago. Today it's pretty much a 2 liner.
Creating the docs and may be a config tiddler is probably 10 times more work.
If $:/core/ui/SideBar/More is changed to the following code and $:/config/ui/SideBar/More/horizontal
tiddler contains "yes" then it will show a horizontal view.
\whitespace trim
<div class={{{ [{$:/config/ui/SideBar/More/horizontal}match[yes]then[tc-sidebar-tabs]else[tc-more-sidebar]] }}}>
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/MoreSideBar]!has[draft.of]]" default={{$:/config/DefaultMoreSidebarTab}} state="$:/state/tab/moresidebar" class={{{ [{$:/config/ui/SideBar/More/horizontal}match[yes]then[tc-sidebar-tabs-more]else[tc-vertical tc-sidebar-tabs-more]] }}} explicitState="$:/state/tab/moresidebar-1850697562"/>
</div>
This feature request is still valid.
I would also have expected to be able to achieve the OP with CSS, because CSS is the only difference between the implementation of vertical and horizontal tabs in TW.
The problem with the CSS is, that tc-vertical
is used 6 times in vanilla/base CSS, with very complex settings. ...
So fixing it with CSS alone will probably need 6 more CSS rules, that are similarly or even more complex. ... So the much simpler and backwards compatible solution will be the 2 liner as described above.
So fixing it with CSS alone will probably need 6 more CSS rules, that are similarly or even more complex. ... So the much simpler and backwards compatible solution will be the 2 liner as described above.
OK, I'm happy with that. Please do create a PR.
@Jermolene -- This one can be closed. We do have a hidden setting now see: More sidebar tabs horizontal #7063
Thanks @pmario
I'd like to have the tabs inside SideBar/More arranged horizontally. I'd rather have that extra width available for the tab content. There is no easy CSS to achieve that, and I'd rather not override the shadow $:/core/ui/SideBar/More to remove "tc-vertical".