From c5ea6628f51ceb53a7ed6e8d9344364ebae53629 Mon Sep 17 00:00:00 2001 From: Cameron Fischer Date: Wed, 6 Apr 2022 03:27:05 -0400 Subject: [PATCH] Trim Saga: Control panel and Editor Toolbar (#6600) Shout out to the TiddlySpot tiddler macro for being completely broken, but also being completely unused, so no one noticed. --- core/ui/ControlPanel/Advanced.tid | 1 + core/ui/ControlPanel/Appearance.tid | 1 + core/ui/ControlPanel/Cascades.tid | 1 + core/ui/ControlPanel/Info.tid | 1 + core/ui/ControlPanel/Parsing.tid | 3 +++ core/ui/ControlPanel/Plugins.tid | 1 + core/ui/ControlPanel/Plugins/Add/Updates.tid | 6 +++++- core/ui/ControlPanel/Plugins/AddPlugins.tid | 5 ++++- core/ui/ControlPanel/Saving.tid | 1 + core/ui/ControlPanel/Saving/TiddlySpot.tid | 3 ++- .../ControlPanel/Settings/DefaultMoreSidebarTab.tid | 1 + core/ui/ControlPanel/Settings/DefaultSidebarTab.tid | 1 + core/ui/ControlPanel/Settings/LinkToBehaviour.tid | 1 + core/ui/ControlPanel/Settings/ToolbarButtonStyle.tid | 1 + core/ui/ControlPanel/Toolbars.tid | 1 + core/ui/ControlPanel/Toolbars/EditorItemTemplate.tid | 9 ++++++++- core/ui/ControlPanel/Toolbars/ItemTemplate.tid | 12 +++++++++++- core/ui/DefaultSearchResultList.tid | 1 + core/ui/EditorToolbar/editor-height.tid | 1 + core/ui/EditorToolbar/excise-dropdown.tid | 9 +++++---- core/ui/EditorToolbar/file-import.tid | 4 ++++ core/ui/EditorToolbar/more-dropdown.tid | 6 +++++- core/ui/EditorToolbar/paint.tid | 1 + core/ui/EditorToolbar/preview.tid | 1 + core/ui/EditorToolbar/size-dropdown.tid | 7 ++++++- 25 files changed, 68 insertions(+), 11 deletions(-) diff --git a/core/ui/ControlPanel/Advanced.tid b/core/ui/ControlPanel/Advanced.tid index 0316089f9..9ce5b54c0 100644 --- a/core/ui/ControlPanel/Advanced.tid +++ b/core/ui/ControlPanel/Advanced.tid @@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Advanced tags: $:/tags/ControlPanel/Info caption: {{$:/language/ControlPanel/Advanced/Caption}} +\whitespace trim {{$:/language/ControlPanel/Advanced/Hint}}
diff --git a/core/ui/ControlPanel/Appearance.tid b/core/ui/ControlPanel/Appearance.tid index f8f88f6ab..5c03ae967 100644 --- a/core/ui/ControlPanel/Appearance.tid +++ b/core/ui/ControlPanel/Appearance.tid @@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Appearance tags: $:/tags/ControlPanel caption: {{$:/language/ControlPanel/Appearance/Caption}} +\whitespace trim {{$:/language/ControlPanel/Appearance/Hint}}
diff --git a/core/ui/ControlPanel/Cascades.tid b/core/ui/ControlPanel/Cascades.tid index bbd5a3750..3fb48da8b 100644 --- a/core/ui/ControlPanel/Cascades.tid +++ b/core/ui/ControlPanel/Cascades.tid @@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Cascades tags: $:/tags/ControlPanel/Advanced caption: {{$:/language/ControlPanel/Cascades/Caption}} +\whitespace trim {{$:/language/ControlPanel/Cascades/Hint}}
diff --git a/core/ui/ControlPanel/Info.tid b/core/ui/ControlPanel/Info.tid index 8d357395f..37c56c1e2 100644 --- a/core/ui/ControlPanel/Info.tid +++ b/core/ui/ControlPanel/Info.tid @@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Info tags: $:/tags/ControlPanel caption: {{$:/language/ControlPanel/Info/Caption}} +\whitespace trim {{$:/language/ControlPanel/Info/Hint}}
diff --git a/core/ui/ControlPanel/Parsing.tid b/core/ui/ControlPanel/Parsing.tid index 4ba0f0ae1..818d1f292 100644 --- a/core/ui/ControlPanel/Parsing.tid +++ b/core/ui/ControlPanel/Parsing.tid @@ -5,6 +5,7 @@ caption: {{$:/language/ControlPanel/Parsing/Caption}} \define lingo-base() $:/language/ControlPanel/Parsing/ \define toggle(Type) +\whitespace trim <$checkbox tiddler="""$:/config/WikiParserRules/$Type$/$(rule)$""" field="text" @@ -16,10 +17,12 @@ default="enable"> \end \define rules(type,Type) +\whitespace trim <$list filter="[wikiparserrules[$type$]]" variable="rule">
<>
\end +\whitespace trim <> diff --git a/core/ui/ControlPanel/Plugins.tid b/core/ui/ControlPanel/Plugins.tid index fa4292fec..995a6bdf0 100644 --- a/core/ui/ControlPanel/Plugins.tid +++ b/core/ui/ControlPanel/Plugins.tid @@ -5,6 +5,7 @@ caption: {{$:/language/ControlPanel/Plugins/Caption}} \define lingo-base() $:/language/ControlPanel/Plugins/ \define plugin-table(type) +\whitespace trim <$set name="plugin-type" value="""$type$"""> <$set name="qualified-state" value=<>> <$list filter="[!has[draft.of]plugin-type[$type$]sort[name]]" emptyMessage=<> template="$:/core/ui/Components/plugin-info"/> diff --git a/core/ui/ControlPanel/Plugins/Add/Updates.tid b/core/ui/ControlPanel/Plugins/Add/Updates.tid index 239889fd2..c9f2402b2 100644 --- a/core/ui/ControlPanel/Plugins/Add/Updates.tid +++ b/core/ui/ControlPanel/Plugins/Add/Updates.tid @@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Plugins/Add/Updates caption: <$importvariables filter="$:/core/ui/ControlPanel/Plugins/Add/Updates">{{$:/language/ControlPanel/Plugins/Updates/Caption}} (<>) \define each-updateable-plugin(body) +\whitespace trim <$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}sort[title]]" variable="assetInfo"> <$set name="libraryVersion" value={{{ [get[version]] }}}> <$list filter="[get[original-title]has[version]!version]" variable="ignore"> @@ -25,8 +26,11 @@ $body$ <$wikify name="count-filter" text=<>/>]]">>><$count filter=<>/> \end +\whitespace trim <$button actions=<> class="tc-btn-invisible tc-install-plugin tc-reinstall-upgrade"> -{{$:/core/images/download-button}} {{||$:/language/ControlPanel/Plugins/Updates/UpdateAll/Caption}} +{{$:/core/images/download-button}} + +{{||$:/language/ControlPanel/Plugins/Updates/UpdateAll/Caption}}
diff --git a/core/ui/ControlPanel/Plugins/AddPlugins.tid b/core/ui/ControlPanel/Plugins/AddPlugins.tid index 8fc3c324e..669e4dd54 100644 --- a/core/ui/ControlPanel/Plugins/AddPlugins.tid +++ b/core/ui/ControlPanel/Plugins/AddPlugins.tid @@ -1,7 +1,10 @@ title: $:/core/ui/ControlPanel/Plugins/AddPlugins \define lingo-base() $:/language/ControlPanel/Plugins/ +\whitespace trim <$button message="tm-modal" param="$:/core/ui/ControlPanel/Modals/AddPlugins" tooltip={{$:/language/ControlPanel/Plugins/Add/Hint}} class="tc-btn-big-green tc-primary-btn"> -{{$:/core/images/download-button}} <> +{{$:/core/images/download-button}} + +<> diff --git a/core/ui/ControlPanel/Saving.tid b/core/ui/ControlPanel/Saving.tid index 760b4e4b5..d54b2eef3 100644 --- a/core/ui/ControlPanel/Saving.tid +++ b/core/ui/ControlPanel/Saving.tid @@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Saving tags: $:/tags/ControlPanel caption: {{$:/language/ControlPanel/Saving/Caption}} +\whitespace trim {{$:/language/ControlPanel/Saving/Hint}}
diff --git a/core/ui/ControlPanel/Saving/TiddlySpot.tid b/core/ui/ControlPanel/Saving/TiddlySpot.tid index cb8c9edf3..a36115ec4 100644 --- a/core/ui/ControlPanel/Saving/TiddlySpot.tid +++ b/core/ui/ControlPanel/Saving/TiddlySpot.tid @@ -8,13 +8,14 @@ caption: {{$:/language/ControlPanel/Saving/TiddlySpot/Caption}} http://$(userName)$.tiddlyspot.com/$path$/ \end \define siteLink(path) +\whitespace trim <$reveal type="nomatch" state="$:/UploadName" text=""> <$set name="userName" value={{$:/UploadName}}> <$reveal type="match" state="$:/UploadURL" text=""> <> <$reveal type="nomatch" state="$:/UploadURL" text=""> -<$macrocall $name=resolvePath source={{$:/UploadBackupDir}} root={{$:/UploadURL}}>> +<$macrocall $name=resolvePath source={{$:/UploadBackupDir}} root={{$:/UploadURL}}/> diff --git a/core/ui/ControlPanel/Settings/DefaultMoreSidebarTab.tid b/core/ui/ControlPanel/Settings/DefaultMoreSidebarTab.tid index e6077f2a2..47f277bd4 100644 --- a/core/ui/ControlPanel/Settings/DefaultMoreSidebarTab.tid +++ b/core/ui/ControlPanel/Settings/DefaultMoreSidebarTab.tid @@ -3,6 +3,7 @@ tags: $:/tags/ControlPanel/Settings title: $:/core/ui/ControlPanel/Settings/DefaultMoreSidebarTab \define lingo-base() $:/language/ControlPanel/Settings/DefaultMoreSidebarTab/ +\whitespace trim <$link to="$:/config/DefaultMoreSidebarTab"><> diff --git a/core/ui/ControlPanel/Settings/DefaultSidebarTab.tid b/core/ui/ControlPanel/Settings/DefaultSidebarTab.tid index 538e15ca8..acd3421c7 100644 --- a/core/ui/ControlPanel/Settings/DefaultSidebarTab.tid +++ b/core/ui/ControlPanel/Settings/DefaultSidebarTab.tid @@ -3,6 +3,7 @@ tags: $:/tags/ControlPanel/Settings title: $:/core/ui/ControlPanel/Settings/DefaultSidebarTab \define lingo-base() $:/language/ControlPanel/Settings/DefaultSidebarTab/ +\whitespace trim <$link to="$:/config/DefaultSidebarTab"><> diff --git a/core/ui/ControlPanel/Settings/LinkToBehaviour.tid b/core/ui/ControlPanel/Settings/LinkToBehaviour.tid index 0dbd1973c..92d46601e 100644 --- a/core/ui/ControlPanel/Settings/LinkToBehaviour.tid +++ b/core/ui/ControlPanel/Settings/LinkToBehaviour.tid @@ -3,6 +3,7 @@ tags: $:/tags/ControlPanel/Settings caption: {{$:/language/ControlPanel/Settings/LinkToBehaviour/Caption}} \define lingo-base() $:/language/ControlPanel/Settings/LinkToBehaviour/ +\whitespace trim <$link to="$:/config/Navigation/openLinkFromInsideRiver"><> diff --git a/core/ui/ControlPanel/Settings/ToolbarButtonStyle.tid b/core/ui/ControlPanel/Settings/ToolbarButtonStyle.tid index 5054b32f6..a25b2a39e 100644 --- a/core/ui/ControlPanel/Settings/ToolbarButtonStyle.tid +++ b/core/ui/ControlPanel/Settings/ToolbarButtonStyle.tid @@ -3,6 +3,7 @@ tags: $:/tags/ControlPanel/Settings caption: {{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption}} \define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtonStyle/ +\whitespace trim <$link to="$:/config/Toolbar/ButtonClass"><> <$select tiddler="$:/config/Toolbar/ButtonClass"> diff --git a/core/ui/ControlPanel/Toolbars.tid b/core/ui/ControlPanel/Toolbars.tid index 9cff67ce6..63034dbc3 100644 --- a/core/ui/ControlPanel/Toolbars.tid +++ b/core/ui/ControlPanel/Toolbars.tid @@ -2,6 +2,7 @@ title: $:/core/ui/ControlPanel/Toolbars tags: $:/tags/ControlPanel/Appearance caption: {{$:/language/ControlPanel/Toolbars/Caption}} +\whitespace trim {{$:/language/ControlPanel/Toolbars/Hint}}
diff --git a/core/ui/ControlPanel/Toolbars/EditorItemTemplate.tid b/core/ui/ControlPanel/Toolbars/EditorItemTemplate.tid index e417e766c..b648c476a 100644 --- a/core/ui/ControlPanel/Toolbars/EditorItemTemplate.tid +++ b/core/ui/ControlPanel/Toolbars/EditorItemTemplate.tid @@ -3,7 +3,14 @@ title: $:/core/ui/ControlPanel/Toolbars/EditorItemTemplate \define config-title() $(config-base)$$(currentTiddler)$ \end +\whitespace trim <$draggable tiddler=<>> -<$checkbox tiddler=<> field="text" checked="show" unchecked="hide" default="show"/> <$transclude tiddler={{!!icon}}/> <$transclude field="caption"/> -- <$transclude field="description"/> +<$checkbox tiddler=<> field="text" checked="show" unchecked="hide" default="show"/> + +<$transclude tiddler={{!!icon}}/> + +<$transclude field="caption"/> + -- +<$transclude field="description"/> diff --git a/core/ui/ControlPanel/Toolbars/ItemTemplate.tid b/core/ui/ControlPanel/Toolbars/ItemTemplate.tid index 6b92d8189..ba41b1b8a 100644 --- a/core/ui/ControlPanel/Toolbars/ItemTemplate.tid +++ b/core/ui/ControlPanel/Toolbars/ItemTemplate.tid @@ -3,7 +3,17 @@ title: $:/core/ui/ControlPanel/Toolbars/ItemTemplate \define config-title() $(config-base)$$(currentTiddler)$ \end +\whitespace trim <$draggable tiddler=<>> -<$checkbox tiddler=<> field="text" checked="show" unchecked="hide" default="show"/> <$transclude field="caption"/> -- <$transclude field="description"/> +<$checkbox tiddler=<> field="text" checked="show" unchecked="hide" default="show"/> + + + +<$transclude field="caption"/> + + +-- +<$transclude field="description"/> + diff --git a/core/ui/DefaultSearchResultList.tid b/core/ui/DefaultSearchResultList.tid index 3c31c4e48..223efe6d7 100644 --- a/core/ui/DefaultSearchResultList.tid +++ b/core/ui/DefaultSearchResultList.tid @@ -5,6 +5,7 @@ first-search-filter: [!is[system]search:titlesort[title]limit[250]] second-search-filter: [!is[system]searchsort[title]limit[250]] \define searchResultList() +\whitespace trim //{{$:/language/Search/Matches/Title}}// <$list filter="[minlength[1]]" variable="ignore"> diff --git a/core/ui/EditorToolbar/editor-height.tid b/core/ui/EditorToolbar/editor-height.tid index eeb1e22c7..e684733e2 100644 --- a/core/ui/EditorToolbar/editor-height.tid +++ b/core/ui/EditorToolbar/editor-height.tid @@ -7,6 +7,7 @@ description: {{$:/language/Buttons/EditorHeight/Hint}} condition: [type[]] [get[type]prefix[text/]] [get[type]match[application/javascript]] [get[type]match[application/json]] [get[type]match[application/x-tiddler-dictionary]] [get[type]match[image/svg+xml]] +[first[]] dropdown: $:/core/ui/EditorToolbar/editor-height-dropdown +\whitespace trim <$reveal tag="span" state="$:/config/TextEditor/EditorHeight/Mode" type="match" text="fixed"> {{$:/core/images/fixed-height}} diff --git a/core/ui/EditorToolbar/excise-dropdown.tid b/core/ui/EditorToolbar/excise-dropdown.tid index 47aa27c8b..28888b4b5 100644 --- a/core/ui/EditorToolbar/excise-dropdown.tid +++ b/core/ui/EditorToolbar/excise-dropdown.tid @@ -3,9 +3,10 @@ title: $:/core/ui/EditorToolbar/excise-dropdown \define lingo-base() $:/language/Buttons/Excise/ \define body(config-title) +\whitespace trim ''<>'' -<> <$edit-text tag="input" tiddler="$config-title$/new-title" default="" focus="true"/> +<> <$edit-text tag="input" tiddler="$config-title$/new-title" default="" focus="true"/> <$set name="new-title" value={{$config-title$/new-title}}> <$list filter="""[is[tiddler]]"""> @@ -15,16 +16,16 @@ title: $:/core/ui/EditorToolbar/excise-dropdown -<$checkbox tiddler="""$config-title$/tagnew""" field="text" checked="yes" unchecked="no" default="false"> <> +<$checkbox tiddler="""$config-title$/tagnew""" field="text" checked="yes" unchecked="no" default="false"> <> -<> <$select tiddler="""$config-title$/type""" default="transclude"> +<> <$select tiddler="""$config-title$/type""" default="transclude"> <$reveal state="""$config-title$/type""" type="match" text="macro"> -<> <$edit-text tag="input" tiddler="""$config-title$/macro-title""" default="translink"/> +<> <$edit-text tag="input" tiddler="""$config-title$/macro-title""" default="translink"/> <$button> diff --git a/core/ui/EditorToolbar/file-import.tid b/core/ui/EditorToolbar/file-import.tid index d8024f3d8..20cff547d 100644 --- a/core/ui/EditorToolbar/file-import.tid +++ b/core/ui/EditorToolbar/file-import.tid @@ -13,6 +13,7 @@ condition: [!has[type]] [type[text/vnd.tiddlywiki] \define replacement-text-file() [[$title$]] \define postImportActions() +\whitespace trim <$list filter="[links[]] :reduce[get[type]prefix[image]thenelsesearch-replace[$title$],addprefix]" variable="imageTitle"> <$action-sendmessage $message="tm-edit-text-operation" @@ -24,10 +25,13 @@ condition: [!has[type]] [type[text/vnd.tiddlywiki] \end \define buttons() +\whitespace trim <$button class="tc-btn-invisible" actions=<> ><> + <$button class="tc-btn-invisible" message="tm-perform-import" param=<> actions=<> ><> \end +\whitespace trim <$reveal type="popup" state=<> tag="div" class="tc-editor-importpopup">
<$list filter="[field:plugin-type[import]]"> diff --git a/core/ui/EditorToolbar/more-dropdown.tid b/core/ui/EditorToolbar/more-dropdown.tid index 289f74011..c22d7b3dc 100644 --- a/core/ui/EditorToolbar/more-dropdown.tid +++ b/core/ui/EditorToolbar/more-dropdown.tid @@ -5,10 +5,14 @@ $:/config/EditorToolbarButtons/Visibility/$(toolbarItem)$ \end \define conditional-button() +\whitespace trim <$list filter={{$(toolbarItem)$!!condition}} variable="condition"> -<$transclude tiddler="$:/core/ui/EditTemplate/body/toolbar/button" mode="inline"/> <$transclude tiddler=<> field="description"/> +<$transclude tiddler="$:/core/ui/EditTemplate/body/toolbar/button" mode="inline"/> + +<$transclude tiddler=<> field="description"/> \end +\whitespace trim
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditorToolbar]!has[draft.of]] -[[$:/core/ui/EditorToolbar/more]]"> diff --git a/core/ui/EditorToolbar/paint.tid b/core/ui/EditorToolbar/paint.tid index 6fb8cd0c2..a807e1397 100644 --- a/core/ui/EditorToolbar/paint.tid +++ b/core/ui/EditorToolbar/paint.tid @@ -9,6 +9,7 @@ dropdown: $:/core/ui/EditorToolbar/paint-dropdown \define toolbar-paint()
\end +\whitespace trim <$set name="colour-picker-value" value={{$:/config/BitmapEditor/Colour}}> <> diff --git a/core/ui/EditorToolbar/preview.tid b/core/ui/EditorToolbar/preview.tid index b41002152..106b28d3c 100644 --- a/core/ui/EditorToolbar/preview.tid +++ b/core/ui/EditorToolbar/preview.tid @@ -8,6 +8,7 @@ condition: [] button-classes: tc-text-editor-toolbar-item-start-group shortcuts: ((preview)) +\whitespace trim <$reveal state=<> type="match" text="yes" tag="span"> {{$:/core/images/preview-open}} <$action-setfield $tiddler=<> $value="no"/> diff --git a/core/ui/EditorToolbar/size-dropdown.tid b/core/ui/EditorToolbar/size-dropdown.tid index 96e4ec7d9..11023bf37 100644 --- a/core/ui/EditorToolbar/size-dropdown.tid +++ b/core/ui/EditorToolbar/size-dropdown.tid @@ -33,9 +33,14 @@ title: $:/core/ui/EditorToolbar/size-dropdown \end \define toolbar-button-size(config-title) +\whitespace trim ''{{$:/language/Buttons/Size/Hint}}'' -<> <$edit-text tag="input" tiddler="""$config-title$/new-width""" default=<> focus="true" size="8"/> <> <$edit-text tag="input" tiddler="""$config-title$/new-height""" default=<> size="8"/> <$button popup="""$config-title$/presets-popup""" class="tc-btn-invisible tc-popup-keep" style="width: auto; display: inline-block; background-colour: inherit;" selectedClass="tc-selected"> +<> <$edit-text tag="input" tiddler="""$config-title$/new-width""" default=<> focus="true" size="8"/> + +<> <$edit-text tag="input" tiddler="""$config-title$/new-height""" default=<> size="8"/> + +<$button popup="""$config-title$/presets-popup""" class="tc-btn-invisible tc-popup-keep" style="width: auto; display: inline-block; background-colour: inherit;" selectedClass="tc-selected"> {{$:/core/images/down-arrow}}