Tiddler Link (underline) too "long"

Thanks @Charlie_Veniot.

this looks good, but ‘toc-tabbed-internal-nav’ didn’t work anymore.

In your modified version there is this code missing:

\define toc-tabbed-internal-nav(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText,missingText,template:"")
<$linkcatcher to=<<__selectedTiddler__>>>
  <$macrocall $name="toc-tabbed-external-nav" tag=<<__tag__>> sort=<<__sort__>> selectedTiddler=<<__selectedTiddler__>> unselectedText=<<__unselectedText__>> missingText=<<__missingText__>> template=<<__template__>>/>
</$linkcatcher>
\end

I copied it at the end, but it didn’t work - see: $__core_macros_toc_modified.json (5.6 KB)

Here are some Test-files:
Test - toc-tabbed-internal-nav.json (444 Bytes)

Test 8.json (1.3 KB)
Test 9.json (837 Bytes)
Test 10.json (774 Bytes)

Thanks for your support
Stefan

It seems there is some additional whitespace used to adjust the element spacing, instead of proper CSS settings. I think it’s a bug. …

But even if we would fix that in the core you would need to adjust your macro too.

You are right. I’ll create a github issue. The fix should be straight forward. We should use the \whitespace trim pragma inside every macro definition. … A bit more testing is needed.

Edit: https://github.com/Jermolene/TiddlyWiki5/issues/6782

Can you explain where it’s introduced? I couldn’t find it offhand.
Thanks!

It’s introduced by the “redability indentation” of the source code without the \whitespace trim option

Well, sometimes I may be wrong. Sometimes I may be right. Sometimes I may just be the lunatic nobody was really looking for …

Ah. Now it’s obvious. Thanks!

Hello @pmario,
thanks for dedecting and opening an issue for this bug.
Stefan

Hello @pmario,

I saw, the issue 6782 has been fixed:

I copied https://tiddlywiki.com/#%24%3A%2Fcore%2Fmacros%2Ftoc into my wiki and I have still same behavior:

What else is missing?

Im running v5.2.3 in TiddlyDesktop (Version 0.0.15-prerelease.2)

Thanks
Stefan

You need to use the prerelease: https://tiddlywiki.com/prerelease/#%24%3A%2Fcore%2Fmacros%2Ftoc

Hello @pmario,

it doesn’t change - same issue:
grafik

Are you sure, you did CTRL reload the browser tab of the prerelease? … I did test it at the prerelease page and there are no extra spaces anymore. … Are you sure you don’t have a second tiddler with the “old” toc anywhere in your wiki?

Hello @pmario

Im running v5.2.3 in TiddlyDesktop (Version 0.0.15-prerelease.2)
I copied content of prerelease (https://tiddlywiki.com/prerelease/#%24%3A%2Fcore%2Fmacros%2Ftoc) into my wiki, saved, closed and reopened it.

What do you mean with

Are you sure you don’t have a second tiddler with the “old” toc anywhere in your wiki?

I have tiddlers with “toc-selective-expandable” and “toc-tabbed-internal-nav” - eg:

Is there additional coding needed?

Thanks
Stefan

That’s how <<toc-selective-expandable>> looks like, if you test it on tiddlywiki.com/prerelease.

image

AS you can see, there is no date. … So it’s very likely, that you have overwritten the default macros and use a custom one. That’s why the changes from the prerelease don’t work.

You can open the AdvancedSearch → Filter tab and search for: \define toc-selective-expandable

It will show you all tiddlers, that define the macro. One of them shouldn’t be there.

Hello @pmario,

thanks for the hint.

I have additonal this macro tiddler: $:/_macros/alternative/toc
This macro was a copy of $:/macros/toc added the code to show my ‘published’ field.
The content was still the old code without the \whitespace trim option in…

I replaced it with code from prerelease and it works.

Thanks for your patient and your appreciated feedback.
Stefan

This is the new macro code with \whitespace trim option in:

$___macros_alternative_toc.json (10.8 KB)

With this new appied code I recognized, that there is no gap anymore between the title and the transcluded ‘erstellt’ field:
grafik

Checked also toc-tabbed-internal-nav - it is ok:
grafik

So I add &nbsp;

<!-- Anzeige Feld 'erstellt' im Inhaltsverzeichnis  --> 				
     @@<span style="font-size:0.7em;color:rgb(144, 238, 144);" > &nbsp; <$transclude field='erstellt'/></span>@@

to have a gab between the tiddler name and the transcluded field:
grafik

This will affect toc-tabbed-internal-nav with an additional line between:


code:

<style>
.colortext {
   font-variant:small-caps;
   color: rgba(255, 201, 102, 0.8);}
</style>

<$macrocall
	$name="toc-tabbed-internal-nav"
	tag="test"
    sort="sortan[]"
	selectedTiddler=<<qualify "$:/temp/toc/selectedTiddler">>
	unselectedText="<p>@@.colortext ← Thema wählen@@</p>"
	missingText="<p>@@.colortext Tiddler fehlt...@@</p>"
/>

How can this be fixed?

Thanks
Stefan

If you add the erstellt-field to Test 8, 9 and 10 it will be shown in the empty space below the tiddler. May be your tiddlers don’t have that field so it’s shown as empty. …

I don’t know, which palette you use. So I can’t recreate the screenshots in the same way as yours. I did use the Twilight-palette for my screenshots. If the tiddlers have the erstellt-field it looks like this:

That’s probably not what you want, but what the changes in the macros created. … The toc-tabbed-internal-nav internally use the toc-selective-expandable macro … So whatever is added there will also show up in toc-tabbed-xxx macros


Instead of using text like &nbsp for styling CSS classes should be used.

Several utility classes like tc-tiny-gap-left or tc-small-gap-left have been added to the core base stylesheets, to be used by plugin authors.

The following changes should fix your first problem with the text gap.

    <span style="font-size:0.7em;color:rgb(144, 238, 144);" class="tc-tiny-gap-left" ><$transclude field='erstellt'/></span>

See all “gap” utility classes: https://github.com/Jermolene/TiddlyWiki5/blob/f87ab06414c921448b4a41bb38bc9739cf95555f/themes/tiddlywiki/vanilla/base.tid#L3095-L3132

Your JSON file misses some icons: $:/core/images/caret-right and $:/core/images/angle-down, which makes it hard for me to test your code.

We (the devs) need to add some documentation for those classes, so users know about them, so they can use proper CSS classes for styling instead of whitespace text.


You should describe in plain text, what you expect from the toc-tabbed-xx macros. … So we can have a closer look, what we can do there.

Your macro call should look like this:

<$macrocall
	$name="toc-tabbed-internal-nav"
	tag="test"
    sort="sortan[]"
	selectedTiddler=<<qualify "$:/temp/toc/selectedTiddler">>
	unselectedText="""<p class="colortext"> ← Thema wählen</p>"""
	missingText="""<p class="colortext"> Tiddler fehlt...</p>"""
/>

the @@ shouldn’t be needed. … The same thing is true for the macro code. There shouldn’t be any @@ signs. … but that can be fixed later

Thanks for feedback @pmario.

You are right.

Tiddlers with individual created date (=‘erstellt’ field) should be listed.
For those I use toc-selective-expandable.

(add the code you mentioned:
<span style="font-size:0.7em;color:rgb(144, 238, 144);" class="tc-big-gap-left" ><$transclude field='erstellt'/></span> )

Result ok:
grafik


For tiddlers without ‘erstellt’ field I use toc-tabbed-internal-nav.
grafik

Issue: There is no need to reserve space in an extra line
(as it was before adding \whitespace trim pragma inside every macro definition)

My wish: It should look like this:
grafik


Your JSON file misses some icons: $:/core/images/caret-right and $:/core/images/angle-down, which makes it hard for me to test your code.

This is just “look and feel” related.
grafik

Thanks
Stefan

That’s not true. … If you remove the \whitespace trim and add your modified macro to tiddlywiki.com the toc-tabbed- macros are broken. They never worked with that modification.