From 0112d040337f9495cabedd5bacbe60ad5d718130 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Sat, 9 Jul 2022 09:35:38 +0200 Subject: [PATCH] Fix 6731 tag and field name trim (#6740) * this commit should fix #6731. It trims field and tag whitespace * this commit increases tag space visibility as mentioned in 002d47b4d91f81b91bb9025a438c7f46c9ab3fe1 * fix a missing HTML end tag * fix $:/Manager select element max width --- core/wiki/macros/tag-picker.tid | 4 ++-- core/wiki/macros/tag.tid | 2 +- themes/tiddlywiki/vanilla/base.tid | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/core/wiki/macros/tag-picker.tid b/core/wiki/macros/tag-picker.tid index 560035e5b..92982a656 100644 --- a/core/wiki/macros/tag-picker.tid +++ b/core/wiki/macros/tag-picker.tid @@ -11,7 +11,7 @@ second-search-filter: [tags[]is[system]search:titlesort[]] \whitespace trim <$set name="tag" value={{{ [<__tiddler__>get[text]] }}}> <$list filter="[!contains:$tagField$!match[]]" variable="ignore" emptyMessage="<$action-listops $tiddler=<> $field=<<__tagField__>> $subfilter='-[]'/>"> -<$action-listops $tiddler=<> $field=<<__tagField__>> $subfilter="[]"/> +<$action-listops $tiddler=<> $field=<<__tagField__>> $subfilter="[trim[]]"/> $actions$ @@ -52,7 +52,7 @@ $actions$ <$button popup=<> class="tc-btn-invisible tc-btn-dropdown" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}}<$reveal state=<> type="nomatch" text=""><$button class="tc-btn-invisible tc-small-gap tc-btn-dropdown" tooltip={{$:/language/EditTemplate/Tags/ClearInput/Hint}} aria-label={{$:/language/EditTemplate/Tags/ClearInput/Caption}}>{{$:/core/images/close-button}}<> <$set name="tag" value={{{ [get[text]] }}}> <$button set=<> setTo="" class=""> -<$action-listops $tiddler=<> $field=<<__tagField__>> $subfilter="[]"/> +<$action-listops $tiddler=<> $field=<<__tagField__>> $subfilter="[trim[]]"/> $actions$ <$set name="currentTiddlerCSSEscaped" value={{{ [escapecss[]] }}}> <><$action-sendmessage $message="tm-focus-selector" $param=<>/> diff --git a/core/wiki/macros/tag.tid b/core/wiki/macros/tag.tid index c5a6b4c5d..3616fb97d 100644 --- a/core/wiki/macros/tag.tid +++ b/core/wiki/macros/tag.tid @@ -16,7 +16,7 @@ color:$(foregroundColor)$; $element-attributes$ class="tc-tag-label tc-btn-invisible" style=<> ->$actions$<$transclude tiddler="""$icon$"""/><$view tiddler=<<__tag__>> field="title" format="text" /> +>$actions$<$transclude tiddler="""$icon$"""/><$view tiddler=<<__tag__>> field="title" format="text" /> \end \define tag-pill-body(tag,icon,colour,palette,element-tag,element-attributes,actions) diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index a530bb274..41faefb19 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -738,7 +738,7 @@ button.tc-tag-label, span.tc-tag-label { font-weight: normal; line-height: 1.2em; color: <>; - white-space: nowrap; + white-space: break-spaces; vertical-align: baseline; background-color: <>; border-radius: 1em; @@ -775,7 +775,6 @@ button.tc-untagged-label { } .tc-tag-manager-table .tc-tag-label { - white-space: normal; } .tc-tag-manager-tag { @@ -2158,6 +2157,10 @@ html body.tc-body.tc-single-tiddler-window { margin: 0.5em 0; } +.tc-manager-control select { + max-width: 100%; +} + .tc-manager-list { width: 100%; border-top: 1px solid <>;