From 92340d81ccca94cb3a866ab44c605e7d3e448779 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 25 Sep 2019 16:16:28 +0100 Subject: [PATCH 01/53] Introduce "parent-plugin" field to control how plugins are displayed in the chooser "Sub-plugins" are displayed within the dropdown of their parent plugin. This is a more elaborate version of #4109. It doesn't address dependent plugins (yet), this is just about grouping addon plugins under their parent. --- core/ui/ControlPanel/Modals/AddPlugins.tid | 9 +++++++++ .../tiddlywiki/codemirror-autocomplete/plugin.info | 1 + .../tiddlywiki/codemirror-closebrackets/plugin.info | 1 + plugins/tiddlywiki/codemirror-closetag/plugin.info | 1 + .../codemirror-fullscreen-editing/plugin.info | 1 + .../tiddlywiki/codemirror-keymap-emacs/plugin.info | 1 + .../codemirror-keymap-sublime-text/plugin.info | 1 + .../tiddlywiki/codemirror-keymap-vim/plugin.info | 1 + plugins/tiddlywiki/codemirror-mode-css/plugin.info | 1 + .../codemirror-mode-htmlembedded/plugin.info | 1 + .../codemirror-mode-htmlmixed/plugin.info | 1 + .../codemirror-mode-javascript/plugin.info | 1 + .../tiddlywiki/codemirror-mode-markdown/plugin.info | 1 + .../codemirror-mode-x-tiddlywiki/plugin.info | 1 + plugins/tiddlywiki/codemirror-mode-xml/plugin.info | 1 + .../codemirror-search-replace/plugin.info | 1 + plugins/tiddlywiki/codemirror/readme.tid | 13 +------------ themes/tiddlywiki/vanilla/base.tid | 7 ++++++- 18 files changed, 31 insertions(+), 13 deletions(-) diff --git a/core/ui/ControlPanel/Modals/AddPlugins.tid b/core/ui/ControlPanel/Modals/AddPlugins.tid index 3287819cf..95159bc9b 100644 --- a/core/ui/ControlPanel/Modals/AddPlugins.tid +++ b/core/ui/ControlPanel/Modals/AddPlugins.tid @@ -61,6 +61,13 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
<$transclude tiddler=<> field="readme" mode="block"/>
+
+<$set name="original-title" value={{{ [get[original-title]] }}}> +<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-pluginsort[title]sort[name]]" variable="assetInfo"> +<> + + +
@@ -83,8 +90,10 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]search:author,description,original-title,readme,title{$:/temp/RemoteAssetSearch/$(currentTiddler)$}sort[title]sort[name]]" variable="assetInfo"> +<$list filter="[[$:/temp/RemoteAssetSearch/$(currentTiddler)$]has[text]] ~[!has[parent-plugin]]" variable="ignore"> <> +
\end diff --git a/plugins/tiddlywiki/codemirror-autocomplete/plugin.info b/plugins/tiddlywiki/codemirror-autocomplete/plugin.info index f46e5bdac..b8696e4ca 100755 --- a/plugins/tiddlywiki/codemirror-autocomplete/plugin.info +++ b/plugins/tiddlywiki/codemirror-autocomplete/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/codemirror-autocomplete", "name": "CodeMirror Autocomplete", "description": "Autocompletion for CodeMirror", + "parent-plugin": "$:/plugins/tiddlywiki/codemirror", "list": "readme" } diff --git a/plugins/tiddlywiki/codemirror-closebrackets/plugin.info b/plugins/tiddlywiki/codemirror-closebrackets/plugin.info index a4eb8cac1..4f51acccf 100755 --- a/plugins/tiddlywiki/codemirror-closebrackets/plugin.info +++ b/plugins/tiddlywiki/codemirror-closebrackets/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/codemirror-closebrackets", "name": "CodeMirror Close Brackets", "description": "Close brackets for CodeMirror", + "parent-plugin": "$:/plugins/tiddlywiki/codemirror", "list": "readme" } diff --git a/plugins/tiddlywiki/codemirror-closetag/plugin.info b/plugins/tiddlywiki/codemirror-closetag/plugin.info index c8ec68505..4fa5b74c3 100755 --- a/plugins/tiddlywiki/codemirror-closetag/plugin.info +++ b/plugins/tiddlywiki/codemirror-closetag/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/codemirror-closetag", "name": "CodeMirror Close Tag", "description": "Close tags automatically for CodeMirror", + "parent-plugin": "$:/plugins/tiddlywiki/codemirror", "list": "readme" } diff --git a/plugins/tiddlywiki/codemirror-fullscreen-editing/plugin.info b/plugins/tiddlywiki/codemirror-fullscreen-editing/plugin.info index 89ba08df1..fc3c6f879 100755 --- a/plugins/tiddlywiki/codemirror-fullscreen-editing/plugin.info +++ b/plugins/tiddlywiki/codemirror-fullscreen-editing/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/codemirror-fullscreen", "name": "CodeMirror Fullscreen", "description": "Fullscreen editing for CodeMirror", + "parent-plugin": "$:/plugins/tiddlywiki/codemirror", "list": "readme" } diff --git a/plugins/tiddlywiki/codemirror-keymap-emacs/plugin.info b/plugins/tiddlywiki/codemirror-keymap-emacs/plugin.info index 519472a6c..efdd03ce8 100755 --- a/plugins/tiddlywiki/codemirror-keymap-emacs/plugin.info +++ b/plugins/tiddlywiki/codemirror-keymap-emacs/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/codemirror-keymap-emacs", "name": "CodeMirror Keymap Emacs", "description": "Keymap compatible with Emacs for CodeMirror", + "parent-plugin": "$:/plugins/tiddlywiki/codemirror", "list": "readme" } diff --git a/plugins/tiddlywiki/codemirror-keymap-sublime-text/plugin.info b/plugins/tiddlywiki/codemirror-keymap-sublime-text/plugin.info index 6f7ba6067..ad278481e 100755 --- a/plugins/tiddlywiki/codemirror-keymap-sublime-text/plugin.info +++ b/plugins/tiddlywiki/codemirror-keymap-sublime-text/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/codemirror-keymap-sublime-text", "name": "CodeMirror Keymap Sublime Text", "description": "Keymap compatible with Sublime Text for CodeMirror", + "parent-plugin": "$:/plugins/tiddlywiki/codemirror", "list": "readme" } diff --git a/plugins/tiddlywiki/codemirror-keymap-vim/plugin.info b/plugins/tiddlywiki/codemirror-keymap-vim/plugin.info index 0f5387d5c..54b882bd0 100755 --- a/plugins/tiddlywiki/codemirror-keymap-vim/plugin.info +++ b/plugins/tiddlywiki/codemirror-keymap-vim/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/codemirror-keymap-vim", "name": "CodeMirror Keymap Vim", "description": "Keymap compatible with Vim for CodeMirror", + "parent-plugin": "$:/plugins/tiddlywiki/codemirror", "list": "readme" } diff --git a/plugins/tiddlywiki/codemirror-mode-css/plugin.info b/plugins/tiddlywiki/codemirror-mode-css/plugin.info index e304dd256..d7f5ab397 100755 --- a/plugins/tiddlywiki/codemirror-mode-css/plugin.info +++ b/plugins/tiddlywiki/codemirror-mode-css/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/codemirror-mode-css", "name": "CodeMirror Mode CSS", "description": "CSS highlighting mode for CodeMirror", + "parent-plugin": "$:/plugins/tiddlywiki/codemirror", "list": "readme" } diff --git a/plugins/tiddlywiki/codemirror-mode-htmlembedded/plugin.info b/plugins/tiddlywiki/codemirror-mode-htmlembedded/plugin.info index a0f2f0528..09eaaae98 100755 --- a/plugins/tiddlywiki/codemirror-mode-htmlembedded/plugin.info +++ b/plugins/tiddlywiki/codemirror-mode-htmlembedded/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/codemirror-mode-htmlembedded", "name": "CodeMirror Mode HTML Embedded", "description": "Embedded HTML highlighting mode for CodeMirror", + "parent-plugin": "$:/plugins/tiddlywiki/codemirror", "list": "readme" } diff --git a/plugins/tiddlywiki/codemirror-mode-htmlmixed/plugin.info b/plugins/tiddlywiki/codemirror-mode-htmlmixed/plugin.info index a99c6e623..8e94358e2 100755 --- a/plugins/tiddlywiki/codemirror-mode-htmlmixed/plugin.info +++ b/plugins/tiddlywiki/codemirror-mode-htmlmixed/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/codemirror-mode-htmlmixed", "name": "CodeMirror Mode HTML Mixed", "description": "HTML mixed highlighting mode for CodeMirror", + "parent-plugin": "$:/plugins/tiddlywiki/codemirror", "list": "readme" } diff --git a/plugins/tiddlywiki/codemirror-mode-javascript/plugin.info b/plugins/tiddlywiki/codemirror-mode-javascript/plugin.info index c4d39ee7b..6be77d42f 100755 --- a/plugins/tiddlywiki/codemirror-mode-javascript/plugin.info +++ b/plugins/tiddlywiki/codemirror-mode-javascript/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/codemirror-mode-javascript", "name": "CodeMirror Mode JavaScript", "description": "JavaScript highlighting mode for CodeMirror", + "parent-plugin": "$:/plugins/tiddlywiki/codemirror", "list": "readme" } diff --git a/plugins/tiddlywiki/codemirror-mode-markdown/plugin.info b/plugins/tiddlywiki/codemirror-mode-markdown/plugin.info index 05593c4a1..140ba5326 100755 --- a/plugins/tiddlywiki/codemirror-mode-markdown/plugin.info +++ b/plugins/tiddlywiki/codemirror-mode-markdown/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/codemirror-mode-markdown", "name": "CodeMirror Mode Markdown", "description": "Markdown highlighting mode for CodeMirror", + "parent-plugin": "$:/plugins/tiddlywiki/codemirror", "list": "readme" } diff --git a/plugins/tiddlywiki/codemirror-mode-x-tiddlywiki/plugin.info b/plugins/tiddlywiki/codemirror-mode-x-tiddlywiki/plugin.info index 1d6244a81..60e5ac81d 100755 --- a/plugins/tiddlywiki/codemirror-mode-x-tiddlywiki/plugin.info +++ b/plugins/tiddlywiki/codemirror-mode-x-tiddlywiki/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/codemirror-mode-x-tiddlywiki", "name": "CodeMirror Mode TiddlyWiki Classic", "description": "Tiddlywiki Classic highlighting mode for CodeMirror", + "parent-plugin": "$:/plugins/tiddlywiki/codemirror", "list": "readme" } diff --git a/plugins/tiddlywiki/codemirror-mode-xml/plugin.info b/plugins/tiddlywiki/codemirror-mode-xml/plugin.info index 35065d0cf..b249a0c26 100755 --- a/plugins/tiddlywiki/codemirror-mode-xml/plugin.info +++ b/plugins/tiddlywiki/codemirror-mode-xml/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/codemirror-mode-xml", "name": "CodeMirror Mode XML", "description": "XML highlighting mode for CodeMirror", + "parent-plugin": "$:/plugins/tiddlywiki/codemirror", "list": "readme" } diff --git a/plugins/tiddlywiki/codemirror-search-replace/plugin.info b/plugins/tiddlywiki/codemirror-search-replace/plugin.info index 15f10dfa5..a78d7a343 100755 --- a/plugins/tiddlywiki/codemirror-search-replace/plugin.info +++ b/plugins/tiddlywiki/codemirror-search-replace/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/codemirror-search-replace", "name": "CodeMirror Search and Replace", "description": "Search and replace for CodeMirror", + "parent-plugin": "$:/plugins/tiddlywiki/codemirror", "list": "readme" } diff --git a/plugins/tiddlywiki/codemirror/readme.tid b/plugins/tiddlywiki/codemirror/readme.tid index 15b668346..c254a047f 100755 --- a/plugins/tiddlywiki/codemirror/readme.tid +++ b/plugins/tiddlywiki/codemirror/readme.tid @@ -1,17 +1,6 @@ title: $:/plugins/tiddlywiki/codemirror/readme -This plugin provides an enhanced text editor component based on [[CodeMirror|http://codemirror.net]]. -The basic configuration is designed to be as lightweight as possible and is just around 235kb of size. -Additional features can be installed with ~CodeMirror ~AddOns from the plugin library: - -* Code colouring for many languages (see [[the official documentation here|http://codemirror.net/mode/index.html]]) -* Auto closing brackets and tags -* Folding brackets, comments, and tags -* Auto-completion -* Search and Replace -* Fullscreen Editing -* Optional Emacs, Sublime Text or Vim Keymaps - +This plugin provides an enhanced text editor component based on [[CodeMirror|http://codemirror.net]]. The basic configuration is designed to be as lightweight as possible and is just around 235kb of size. Additional features can be installed with ~CodeMirror ~AddOns from the plugin library. [[Source code|https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/codemirror]] diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index e02a8c10c..bd202604e 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -2073,12 +2073,17 @@ html body.tc-body.tc-single-tiddler-window { display: flex; border: 1px solid <>; fill: <>; - background-colour: <>; + background-color: <>; margin: 0.5em 0 0.5em 0; padding: 4px; align-items: center; } +.tc-plugin-info-sub-plugins .tc-plugin-info { + margin: 0.5em 1em 0.5em 1em; + background: rgba(255,255,0,0.05); +} + .tc-plugin-info-disabled { background: -webkit-repeating-linear-gradient(45deg, #ff0, #ff0 10px, #eee 10px, #eee 20px); background: repeating-linear-gradient(45deg, #ff0, #ff0 10px, #eee 10px, #eee 20px); From 58f1eb77bd4faf9376b33e9ba02f92205111be73 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 25 Sep 2019 21:56:54 +0100 Subject: [PATCH 02/53] Fix sub-plugin dropdown display --- themes/tiddlywiki/vanilla/base.tid | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index bd202604e..054a0a536 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -2084,6 +2084,11 @@ html body.tc-body.tc-single-tiddler-window { background: rgba(255,255,0,0.05); } +.tc-plugin-info-sub-plugins .tc-plugin-info-dropdown { + margin-left: 1em; + margin-right: 1em; +} + .tc-plugin-info-disabled { background: -webkit-repeating-linear-gradient(45deg, #ff0, #ff0 10px, #eee 10px, #eee 20px); background: repeating-linear-gradient(45deg, #ff0, #ff0 10px, #eee 10px, #eee 20px); From e752ba7c6abcdde229258aa1562e6de518c3556e Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 25 Sep 2019 21:57:22 +0100 Subject: [PATCH 03/53] Use the dependents and parent-plugin fields to automatically install dependencies --- core/ui/ControlPanel/Modals/AddPlugins.tid | 17 +++++++++++++++++ plugins/tiddlywiki/aws/plugin.info | 3 ++- plugins/tiddlywiki/text-slicer/plugin.info | 3 ++- plugins/tiddlywiki/xlsx-utils/plugin.info | 3 ++- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/core/ui/ControlPanel/Modals/AddPlugins.tid b/core/ui/ControlPanel/Modals/AddPlugins.tid index 95159bc9b..f5b35b53c 100644 --- a/core/ui/ControlPanel/Modals/AddPlugins.tid +++ b/core/ui/ControlPanel/Modals/AddPlugins.tid @@ -5,6 +5,13 @@ subtitle: {{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/
<$button class={{{ [get[original-title]get[version]then[tc-reinstall]] tc-btn-invisible tc-install-plugin +[join[ ]] }}}> <$action-sendmessage $message="tm-load-plugin-from-library" url={{!!url}} title={{$(assetInfo)$!!original-title}}/> +<$set name="url" value={{!!url}}> +<$set name="currentTiddler" value=<>> +<$list filter="[enlist{!!dependents}] [{!!parent-plugin}] +[sort[title]]" variable="dependency"> +<$action-sendmessage $message="tm-load-plugin-from-library" url=<> title=<>/> + + + {{$:/core/images/download-button}} <$list filter="[get[original-title]get[version]]" variable="installedVersion" emptyMessage="""{{$:/language/ControlPanel/Plugins/Install/Caption}}"""> {{$:/language/ControlPanel/Plugins/Reinstall/Caption}} @@ -57,6 +64,16 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$ {{$:/language/ControlPanel/Plugins/AlreadyInstalled/Hint}} +<$set name="currentTiddler" value=<>> +<$list filter="[enlist{!!dependents}] [get[parent-plugin]] +[limit[1]]" variable="ignore"> +
+Also requires: +<$list filter="[enlist{!!dependents}] [{!!parent-plugin}] +[sort[title]]" variable="dependency"> +<$text text=<>/> + +
+ +
<$transclude tiddler=<> field="readme" mode="block"/> diff --git a/plugins/tiddlywiki/aws/plugin.info b/plugins/tiddlywiki/aws/plugin.info index 89f248824..e01c82d7c 100644 --- a/plugins/tiddlywiki/aws/plugin.info +++ b/plugins/tiddlywiki/aws/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/aws", "name": "AWS", "description": "Amazon Web Services extensions and tools", - "list": "readme setup commands lambda" + "list": "readme setup commands lambda", + "dependents": ["$:/plugins/tiddlywiki/async","$:/plugins/tiddlywiki/jszip"] } diff --git a/plugins/tiddlywiki/text-slicer/plugin.info b/plugins/tiddlywiki/text-slicer/plugin.info index 937014060..a05456570 100644 --- a/plugins/tiddlywiki/text-slicer/plugin.info +++ b/plugins/tiddlywiki/text-slicer/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/text-slicer", "name": "Text Slicer", "description": "Tools for slicing text into tiddlers", - "list": "readme docs" + "list": "readme docs", + "dependents": ["$:/plugins/tiddlywiki/sax"] } diff --git a/plugins/tiddlywiki/xlsx-utils/plugin.info b/plugins/tiddlywiki/xlsx-utils/plugin.info index 1fe58b75e..b269439a2 100644 --- a/plugins/tiddlywiki/xlsx-utils/plugin.info +++ b/plugins/tiddlywiki/xlsx-utils/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/xlsx-utils", "name": "XLSX Utils", "description": "XLSX spreadsheet utilities", - "list": "readme controls license" + "list": "readme controls license", + "dependents": ["$:/plugins/tiddlywiki/jszip"] } From cb3bec65a1c634f80f62de9251f4fa85c96d72f3 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 26 Sep 2019 08:51:35 +0100 Subject: [PATCH 04/53] Don't crash for edit enginges that don't support cancelPopups --- core/modules/editor/engines/framed.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/modules/editor/engines/framed.js b/core/modules/editor/engines/framed.js index c807ffde9..7984eff4f 100644 --- a/core/modules/editor/engines/framed.js +++ b/core/modules/editor/engines/framed.js @@ -158,7 +158,9 @@ FramedEngine.prototype.focus = function() { Handle the focus event */ FramedEngine.prototype.handleFocusEvent = function(event) { - this.widget.cancelPopups(); + if(this.widget.cancelPopups) { + this.widget.cancelPopups(); + } return true; }; From 93e01435d1e1b622134b3aca2fe41ca905d3c9b3 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 27 Sep 2019 16:47:55 +0100 Subject: [PATCH 05/53] Dynamic plugins: Change "contains JavaScript" to "requires reload" We might in the future offer support for certain types of JS module to be hot loaded. --- core/modules/commands/savelibrarytiddlers.js | 4 ++-- core/modules/startup/plugins.js | 4 ++-- core/modules/upgraders/plugins.js | 8 ++++---- core/modules/wiki.js | 10 +++++----- core/ui/ControlPanel/Modals/AddPlugins.tid | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/core/modules/commands/savelibrarytiddlers.js b/core/modules/commands/savelibrarytiddlers.js index b1874c9b5..58030d3d8 100644 --- a/core/modules/commands/savelibrarytiddlers.js +++ b/core/modules/commands/savelibrarytiddlers.js @@ -69,7 +69,7 @@ Command.prototype.execute = function() { // Collect the skinny list data var pluginTiddlers = JSON.parse(tiddler.text), readmeContent = (pluginTiddlers.tiddlers[title + "/readme"] || {}).text, - doesContainJavaScript = !!$tw.wiki.doesPluginInfoContainModules(pluginTiddlers), + doesRequireReload = !!$tw.wiki.doesPluginInfoRequireReload(pluginTiddlers), iconTiddler = pluginTiddlers.tiddlers[title + "/icon"] || {}, iconType = iconTiddler.type, iconText = iconTiddler.text, @@ -80,7 +80,7 @@ Command.prototype.execute = function() { skinnyList.push($tw.utils.extend({},tiddler,{ text: undefined, readme: readmeContent, - "contains-javascript": doesContainJavaScript ? "yes" : "no", + "requires-reload": doesRequireReload ? "yes" : "no", icon: iconContent })); }); diff --git a/core/modules/startup/plugins.js b/core/modules/startup/plugins.js index 5dd03bbf1..907579dbe 100644 --- a/core/modules/startup/plugins.js +++ b/core/modules/startup/plugins.js @@ -28,8 +28,8 @@ exports.startup = function() { requireReloadDueToPluginChange = false; $tw.utils.each(Object.keys(changes),function(title) { var tiddler = $tw.wiki.getTiddler(title), - containsModules = $tw.wiki.doesPluginContainModules(title); - if(containsModules) { + requiresReload = $tw.wiki.doesPluginRequireReload(title); + if(requiresReload) { requireReloadDueToPluginChange = true; } else if(tiddler) { var pluginType = tiddler.fields["plugin-type"]; diff --git a/core/modules/upgraders/plugins.js b/core/modules/upgraders/plugins.js index d1e699762..68aa62fb2 100644 --- a/core/modules/upgraders/plugins.js +++ b/core/modules/upgraders/plugins.js @@ -41,14 +41,14 @@ exports.upgrade = function(wiki,titles,tiddlers) { // Check if we're dealing with a plugin if(incomingTiddler && incomingTiddler["plugin-type"]) { // Check whether the plugin contains JS modules - var doesContainJavaScript = $tw.wiki.doesPluginInfoContainModules(JSON.parse(incomingTiddler.text)) ? ($tw.wiki.getTiddlerText("$:/language/ControlPanel/Plugins/PluginWillRequireReload") + " ") : ""; - messages[title] = doesContainJavaScript; + var requiresReload = $tw.wiki.doesPluginInfoRequireReload(JSON.parse(incomingTiddler.text)) ? ($tw.wiki.getTiddlerText("$:/language/ControlPanel/Plugins/PluginWillRequireReload") + " ") : ""; + messages[title] = requiresReload; if(incomingTiddler.version) { // Upgrade the incoming plugin if it is in the upgrade library var libraryTiddler = getLibraryTiddler(title); if(libraryTiddler && libraryTiddler["plugin-type"] && libraryTiddler.version) { tiddlers[title] = libraryTiddler; - messages[title] = doesContainJavaScript + $tw.language.getString("Import/Upgrader/Plugins/Upgraded",{variables: {incoming: incomingTiddler.version, upgraded: libraryTiddler.version}}); + messages[title] = requiresReload + $tw.language.getString("Import/Upgrader/Plugins/Upgraded",{variables: {incoming: incomingTiddler.version, upgraded: libraryTiddler.version}}); return; } // Suppress the incoming plugin if it is older than the currently installed one @@ -57,7 +57,7 @@ exports.upgrade = function(wiki,titles,tiddlers) { // Reject the incoming plugin by blanking all its fields if($tw.utils.checkVersions(existingTiddler.fields.version,incomingTiddler.version)) { tiddlers[title] = Object.create(null); - messages[title] = doesContainJavaScript + $tw.language.getString("Import/Upgrader/Plugins/Suppressed/Version",{variables: {incoming: incomingTiddler.version, existing: existingTiddler.fields.version}}); + messages[title] = requiresReload + $tw.language.getString("Import/Upgrader/Plugins/Suppressed/Version",{variables: {incoming: incomingTiddler.version, existing: existingTiddler.fields.version}}); return; } } diff --git a/core/modules/wiki.js b/core/modules/wiki.js index e7f84e13c..b505f50da 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -1460,13 +1460,13 @@ exports.invokeUpgraders = function(titles,tiddlers) { return messages; }; -// Determine whether a plugin by title contains JS modules. -exports.doesPluginContainModules = function(title) { - return this.doesPluginInfoContainModules(this.getPluginInfo(title) || this.getTiddlerDataCached(title)); +// Determine whether a plugin by title is dynamically loadable +exports.doesPluginRequireReload = function(title) { + return this.doesPluginInfoRequireReload(this.getPluginInfo(title) || this.getTiddlerDataCached(title)); }; -// Determine whether a plugin info structure contains JS modules. -exports.doesPluginInfoContainModules = function(pluginInfo) { +// Determine whether a plugin info structure is dynamically loadable +exports.doesPluginInfoRequireReload = function(pluginInfo) { if(pluginInfo) { var foundModule = false; $tw.utils.each(pluginInfo.tiddlers,function(tiddler) { diff --git a/core/ui/ControlPanel/Modals/AddPlugins.tid b/core/ui/ControlPanel/Modals/AddPlugins.tid index f5b35b53c..3c650fcc3 100644 --- a/core/ui/ControlPanel/Modals/AddPlugins.tid +++ b/core/ui/ControlPanel/Modals/AddPlugins.tid @@ -19,7 +19,7 @@ subtitle: {{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/
-<$reveal stateTitle=<> stateField="contains-javascript" type="match" text="yes">{{$:/language/ControlPanel/Plugins/PluginWillRequireReload}} +<$reveal stateTitle=<> stateField="requires-reload" type="match" text="yes">{{$:/language/ControlPanel/Plugins/PluginWillRequireReload}}
\end From 0193bfd5e939919fba9b52c80d316f33e642c114 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 27 Sep 2019 21:57:46 +0100 Subject: [PATCH 06/53] Plugin docs updates --- .../tiddlers/mechanisms/PluginMechanism.tid | 31 ++++++++++++------- ...lling a plugin from the plugin library.tid | 5 +-- .../plugins/Manually installing a plugin.tid | 5 +-- .../tiddlers/plugins/PluginFolders.tid | 3 +- .../tiddlers/plugins/Plugin_Fields.tid | 21 +++++++------ .../plugins/Uninstalling a plugin.tid | 12 ++++--- 6 files changed, 46 insertions(+), 31 deletions(-) diff --git a/editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid b/editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid index 5b1a4ef27..a2505a188 100644 --- a/editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid +++ b/editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid @@ -1,27 +1,36 @@ created: 20130826122000000 -modified: 20161015122959346 +modified: 20190927172137277 tags: Mechanisms title: PluginMechanism type: text/vnd.tiddlywiki ! Introduction -[[Plugins]] are bundles of tiddlers that are distributed and managed as a single unit by being packed into a single JSON tiddler. Users can install them with drag and drop, or using the [[plugin library|Installing a plugin from the plugin library]]. +[[Plugins]] are bundles of tiddlers that are distributed and managed as a single unit. Users can install them with drag and drop, or using the [[plugin library|Installing a plugin from the plugin library]]. -The tiddlers within registered plugins behave as ShadowTiddlers: they can be freely overwritten by creating a tiddler with the same title, but deleting that tiddler restores the underlying tiddler value from the plugin. +<<.from-version "5.1.22">> Plugins that contain JavaScript modules require a reload of the wiki before they will work. Plugins that do not contain JavaScript modules are automatically dynamically loaded and unloaded. -Plugins have a `plugin-type` field that may take the following values: +Plugins can be used to package any tiddler content, including JavaScript [[modules|Modules]] that extend and enhance the core TiddlyWiki5 functionality. The tiddlers within registered plugins are ShadowTiddlers: they can be freely overwritten by creating a tiddler with the same title, but deleting that tiddler restores the underlying tiddler value from the plugin. -* `plugin` //(default)// - a plain plugin -* `theme` - a theme plugin (see ThemeMechanism) -* `language` - for translations only - -Plugins can be used to package ordinary content, or can include JavaScript [[modules|Modules]] that extend and enhance the core TiddlyWiki5 functionality. - -Plugins conventionally have a title of the form `$:/plugins/publisher/name`. Plugins that are part of the core TiddlyWiki distribution have titles of the form `$:/plugins/tiddlywiki/name`. +By convention, plugin titles have the form `$:/plugins//`. Plugins that are part of the core TiddlyWiki distribution have titles of the form `$:/plugins/tiddlywiki/`. When [[running TiddlyWiki under Node.js|TiddlyWiki on Node.js]], plugins can also be stored as individual tiddler files in [[PluginFolders]]. +Plugins have a `plugin-type` field that determines how it is treated. The following values are defined by the core: + +* `plugin` - an ordinary plugin +* `theme` - a theme plugin (see ThemeMechanism). Only the theme plugin named in the tiddler $:/theme is activated at any one time (along with any dependent theme plugins) +* `language` - a language plugin (see TranslationMechanism). Only the language plugin named in the tiddler $:/language is activated at any one time (along with any dependent language plugins) + +The following plugin types are used internally by the core: + +* `import` - for the special $:/Import plugin created while importing is in progress +* `info` - for the special $:/temp/info-plugin tiddler created by the InfoMechanism + +Custom plugin types can also be used. They will automatically receive the same behaviour as plain plugins but can display a custom user interface using an appropriate [[view template segment|SystemTag: $:/tags/ViewTemplate]]. + +See [[Plugin Fields]] for details of the other fields used by plugins. + ! More information <> diff --git a/editions/tw5.com/tiddlers/plugins/Installing a plugin from the plugin library.tid b/editions/tw5.com/tiddlers/plugins/Installing a plugin from the plugin library.tid index 6edc5ad13..d4e2fef3b 100644 --- a/editions/tw5.com/tiddlers/plugins/Installing a plugin from the plugin library.tid +++ b/editions/tw5.com/tiddlers/plugins/Installing a plugin from the plugin library.tid @@ -1,5 +1,5 @@ created: 20160107222352710 -modified: 20160720145836265 +modified: 20190927205622498 tags: Plugins title: Installing a plugin from the plugin library type: text/vnd.tiddlywiki @@ -17,7 +17,8 @@ Follow these instructions when using TiddlyWiki as a standalone HTML file: ## Use the ''search'' box to search the plugin details # Click the ''install'' button to install a plugin # Save your TiddlyWiki {{$:/core/images/save-button}} -# ''Refresh the page so that TiddlyWiki loads the new plugin'' {{$:/core/images/refresh-button}} +# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completes installation of the plugin {{$:/core/images/refresh-button}} +#* <<.from-version "5.1.22">> It is no longer necessary to refresh TiddlyWiki when deleting plugins that support dynamic loading. See PluginMechanism for more details # The plugin should now be available for use ! Client-Server Configuration diff --git a/editions/tw5.com/tiddlers/plugins/Manually installing a plugin.tid b/editions/tw5.com/tiddlers/plugins/Manually installing a plugin.tid index 6b52fe33c..426615b3c 100644 --- a/editions/tw5.com/tiddlers/plugins/Manually installing a plugin.tid +++ b/editions/tw5.com/tiddlers/plugins/Manually installing a plugin.tid @@ -1,5 +1,5 @@ created: 20160107222430613 -modified: 20160617104949358 +modified: 20190927205631648 tags: Plugins title: Manually installing a plugin type: text/vnd.tiddlywiki @@ -9,5 +9,6 @@ type: text/vnd.tiddlywiki # In another browser window, find a link to the plugin, e.g. [[$:/plugins/tiddlywiki/example]]. You will typically find these links on the home page of the plugin (for example, https://tiddlywiki.com/plugins/tiddlywiki/katex/) # Drag the link [[$:/plugins/tiddlywiki/example]] to the browser window containing your TiddlyWiki # Save your TiddlyWiki ({{$:/core/images/save-button}}) -# ''Refresh the page so that TiddlyWiki loads the new plugin'' ({{$:/core/images/refresh-button}}) +# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completes installation of the plugin {{$:/core/images/refresh-button}} +#* <<.from-version "5.1.22">> It is no longer necessary to refresh TiddlyWiki when deleting plugins that support dynamic loading. See PluginMechanism for more details # The plugin should now be available for use \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/plugins/PluginFolders.tid b/editions/tw5.com/tiddlers/plugins/PluginFolders.tid index d842affc1..393f1ef40 100644 --- a/editions/tw5.com/tiddlers/plugins/PluginFolders.tid +++ b/editions/tw5.com/tiddlers/plugins/PluginFolders.tid @@ -1,5 +1,5 @@ created: 20161015113519246 -modified: 20161015113833256 +modified: 20190927172743140 tags: PluginMechanism title: PluginFolders type: text/vnd.tiddlywiki @@ -13,6 +13,7 @@ The JSON structure for plugin tiddlers is as follows: ``` { "title": "$:/plugins/publisher/name", + "name": "name", "description": "An exemplary plugin for demonstration purposes", "author": "JeremyRuston", "version": "1.2.3-alpha3", diff --git a/editions/tw5.com/tiddlers/plugins/Plugin_Fields.tid b/editions/tw5.com/tiddlers/plugins/Plugin_Fields.tid index 86636179e..f4d7e6d0a 100644 --- a/editions/tw5.com/tiddlers/plugins/Plugin_Fields.tid +++ b/editions/tw5.com/tiddlers/plugins/Plugin_Fields.tid @@ -1,5 +1,5 @@ created: 20161015122718559 -modified: 20161015122719647 +modified: 20190927172655698 tags: PluginMechanism title: Plugin Fields type: text/vnd.tiddlywiki @@ -9,14 +9,15 @@ type: text/vnd.tiddlywiki Plugins are stored as tiddlers with the following fields: |!Field |!Description | -|title |Title of plugin | +|author |//(optional)// Author of plugin | +|dependents |List of dependencies: plugins that should be installed in order for this one to work | |description |Description of plugin | -|author |Author of plugin | -|version |Version string (must conform to [ext[SemanticVersioning|http://semver.org/]] convention) | -|source |Source URL of plugin | -|type |Must be ''application/json'' | -|plugin-type |Can be ''plugin'' (default), ''language'' or ''theme'' | -|text |JSON encoding of the list of tiddlers comprising the plugin | |list |Names of exposed plugin information tiddlers (see below) | -|name |Name of the theme (only for themes) | -|dependents |List of dependent plugins (currently only implemented for themes) | \ No newline at end of file +|name |Brief name of the plugin | +|plugin-type |Generally ''plugin'', ''language'' or ''theme''; see PluginMechanism for details | +|parent-plugin |//(optional)// <<.from-version "5.1.22">> Title of the plugin under which this plugin should be displayed as a sub-plugin in the control panel plugin chooser | +|source |//(optional)// Source URL of plugin | +|text |JSON encoding of the list of tiddlers comprising the plugin | +|title |Title of plugin | +|type |Must be ''application/json'' | +|version |//(optional)// Version string (should conform to [ext[SemanticVersioning|http://semver.org/]] convention) | \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/plugins/Uninstalling a plugin.tid b/editions/tw5.com/tiddlers/plugins/Uninstalling a plugin.tid index f2b0e633e..096183bfb 100644 --- a/editions/tw5.com/tiddlers/plugins/Uninstalling a plugin.tid +++ b/editions/tw5.com/tiddlers/plugins/Uninstalling a plugin.tid @@ -1,5 +1,5 @@ created: 20160107222504269 -modified: 20160720145839711 +modified: 20190927205509760 tags: Plugins title: Uninstalling a plugin type: text/vnd.tiddlywiki @@ -9,12 +9,14 @@ type: text/vnd.tiddlywiki Follow these instructions when using TiddlyWiki as a standalone HTML file: # Create a backup of your current TiddlyWiki HTML file ([[just in case|The First Rule of Using TiddlyWiki]]) -# Open the [[control panel|$:/ControlPanel]] {{$:/core/images/options-button}} and go to the ''Plugins'' tab -# Click on the plugin you want to delete to open its tiddler +# Open the [[control panel|$:/ControlPanel]] and go to the ''Plugins'' tab +# Click on the plugin you want to delete to open it as a standalone tiddler # Click the {{$:/core/images/down-arrow}} ''more'' button and {{$:/core/images/delete-button}} ''delete'' the tiddler # Save your TiddlyWiki {{$:/core/images/save-button}} -# ''Refresh the window so that TiddlyWiki completely removes the plugin'' {{$:/core/images/refresh-button}} -# The plugin should now be deleted +# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completely removes the plugin {{$:/core/images/refresh-button}} +#* <<.from-version "5.1.22">> It is no longer necessary to refresh TiddlyWiki when deleting plugins that support dynamic loading. See PluginMechanism for more details +# The plugin should no longer be active or available + ! Client-Server Configuration From ded9d4074c82b61006fc4887c2ab8b958907f719 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 28 Sep 2019 10:06:18 +0100 Subject: [PATCH 07/53] Plugin library chooser improvements * Make "Also requires:" translatable * Clearer styling for sub-plugins * Documentation tweaks --- core/language/en-GB/ControlPanel.multids | 1 + core/ui/ControlPanel/Modals/AddPlugins.tid | 2 +- .../tw5.com/tiddlers/Plugin Dependencies.tid | 13 ++++++++++++ editions/tw5.com/tiddlers/Plugin Types.tid | 18 ++++++++++++++++ .../tiddlers/mechanisms/PluginMechanism.tid | 21 ++++++++++--------- .../tiddlers/plugins/Plugin_Fields.tid | 5 ++--- themes/tiddlywiki/vanilla/base.tid | 7 ++++++- 7 files changed, 52 insertions(+), 15 deletions(-) create mode 100644 editions/tw5.com/tiddlers/Plugin Dependencies.tid create mode 100644 editions/tw5.com/tiddlers/Plugin Types.tid diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids index d1fd8f374..c7ff155c0 100644 --- a/core/language/en-GB/ControlPanel.multids +++ b/core/language/en-GB/ControlPanel.multids @@ -63,6 +63,7 @@ Parsing/Pragma/Caption: Pragma Parse Rules Plugins/Add/Caption: Get more plugins Plugins/Add/Hint: Install plugins from the official library Plugins/AlreadyInstalled/Hint: This plugin is already installed at version <$text text=<>/> +Plugins/AlsoRequires: Also requires: Plugins/Caption: Plugins Plugins/Disable/Caption: disable Plugins/Disable/Hint: Disable this plugin when reloading page diff --git a/core/ui/ControlPanel/Modals/AddPlugins.tid b/core/ui/ControlPanel/Modals/AddPlugins.tid index 3c650fcc3..d25dc93ef 100644 --- a/core/ui/ControlPanel/Modals/AddPlugins.tid +++ b/core/ui/ControlPanel/Modals/AddPlugins.tid @@ -67,7 +67,7 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$ <$set name="currentTiddler" value=<>> <$list filter="[enlist{!!dependents}] [get[parent-plugin]] +[limit[1]]" variable="ignore">
-Also requires: +{{$:/language/ControlPanel/Plugins/AlsoRequires}} <$list filter="[enlist{!!dependents}] [{!!parent-plugin}] +[sort[title]]" variable="dependency"> <$text text=<>/> diff --git a/editions/tw5.com/tiddlers/Plugin Dependencies.tid b/editions/tw5.com/tiddlers/Plugin Dependencies.tid new file mode 100644 index 000000000..5fa9c2f75 --- /dev/null +++ b/editions/tw5.com/tiddlers/Plugin Dependencies.tid @@ -0,0 +1,13 @@ +created: 20190928081852771 +modified: 20190928082758674 +tags: PluginMechanism +title: Plugin Dependencies +type: text/vnd.tiddlywiki + +The simplest form of dependency between plugins is that one plugin can declare itself to be a sub-plugin of another plugin by specifying that plugin in the `parent-plugin` [[field|Plugin Fields]]. Sub-plugins are displayed in the control panel plugin chooser within the expandable area of their parent plugin. For example, the official plugin library includes the [[CodeMirror Plugin]] and also more than a dozen sub-plugins that extend the CodeMirror plugin with optional functionality. Note that sub-plugins cannot themselves have further sub-plugins. + +Plugins can also use their `dependents` [[field|Plugin Fields]] to list the titles of any other plugins that should also be installed. Note that the list is not resolved recursively: dependents of dependents will not be installed. + +When installing a plugin from the plugin library, both the `parent-plugin` and `dependents` fields are used to determine any additional plugins to be installed. + +Note that the `dependents` field is also used by the ThemeMechanism and the LanguageMechanism to switch in dependent theme/language plugins. diff --git a/editions/tw5.com/tiddlers/Plugin Types.tid b/editions/tw5.com/tiddlers/Plugin Types.tid new file mode 100644 index 000000000..c496fdbd0 --- /dev/null +++ b/editions/tw5.com/tiddlers/Plugin Types.tid @@ -0,0 +1,18 @@ +created: 20190928081810311 +modified: 20190928081811355 +tags: +title: Plugin Types +type: text/vnd.tiddlywiki + +Plugins have a `plugin-type` field that determines how it is treated. The following values are defined by the core: + +* `plugin` - an ordinary plugin +* `theme` - a theme plugin (see ThemeMechanism). Only the theme plugin named in the tiddler $:/theme is activated at any one time (along with any dependent theme plugins) +* `language` - a language plugin (see TranslationMechanism). Only the language plugin named in the tiddler $:/language is activated at any one time (along with any dependent language plugins) + +The following plugin types are used internally by the core: + +* `import` - for the special $:/Import plugin created while importing is in progress +* `info` - for the special $:/temp/info-plugin tiddler created by the InfoMechanism + +While not supported by the plugin library, it is also possible to use custom plugin types to build plugin-like behaviour with a custom user interface. Plugins with a custom type will automatically receive the same behaviour as plain plugins but can display a custom user interface using an appropriate [[view template segment|SystemTag: $:/tags/ViewTemplate]]. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid b/editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid index a2505a188..c51417887 100644 --- a/editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid +++ b/editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid @@ -1,5 +1,5 @@ created: 20130826122000000 -modified: 20190927172137277 +modified: 20190928082000464 tags: Mechanisms title: PluginMechanism type: text/vnd.tiddlywiki @@ -16,20 +16,21 @@ By convention, plugin titles have the form `$:/plugins//`. Plug When [[running TiddlyWiki under Node.js|TiddlyWiki on Node.js]], plugins can also be stored as individual tiddler files in [[PluginFolders]]. -Plugins have a `plugin-type` field that determines how it is treated. The following values are defined by the core: +! Plugin Types -* `plugin` - an ordinary plugin -* `theme` - a theme plugin (see ThemeMechanism). Only the theme plugin named in the tiddler $:/theme is activated at any one time (along with any dependent theme plugins) -* `language` - a language plugin (see TranslationMechanism). Only the language plugin named in the tiddler $:/language is activated at any one time (along with any dependent language plugins) +{{Plugin Types}} -The following plugin types are used internally by the core: +! Plugin Dependencies -* `import` - for the special $:/Import plugin created while importing is in progress -* `info` - for the special $:/temp/info-plugin tiddler created by the InfoMechanism +{{Plugin Dependencies}} -Custom plugin types can also be used. They will automatically receive the same behaviour as plain plugins but can display a custom user interface using an appropriate [[view template segment|SystemTag: $:/tags/ViewTemplate]]. +! Plugin Ordering -See [[Plugin Fields]] for details of the other fields used by plugins. +{{Plugin Ordering}} + +! Plugin Fields + +{{Plugin Fields}} ! More information diff --git a/editions/tw5.com/tiddlers/plugins/Plugin_Fields.tid b/editions/tw5.com/tiddlers/plugins/Plugin_Fields.tid index f4d7e6d0a..5c2bb6fdf 100644 --- a/editions/tw5.com/tiddlers/plugins/Plugin_Fields.tid +++ b/editions/tw5.com/tiddlers/plugins/Plugin_Fields.tid @@ -1,11 +1,9 @@ created: 20161015122718559 -modified: 20190927172655698 +modified: 20190928083018378 tags: PluginMechanism title: Plugin Fields type: text/vnd.tiddlywiki -! Plugin fields - Plugins are stored as tiddlers with the following fields: |!Field |!Description | @@ -14,6 +12,7 @@ Plugins are stored as tiddlers with the following fields: |description |Description of plugin | |list |Names of exposed plugin information tiddlers (see below) | |name |Brief name of the plugin | +|plugin-priority |//(optional)// Numerical priority (higher numbers install later, the core plugin has a priority of zero | |plugin-type |Generally ''plugin'', ''language'' or ''theme''; see PluginMechanism for details | |parent-plugin |//(optional)// <<.from-version "5.1.22">> Title of the plugin under which this plugin should be displayed as a sub-plugin in the control panel plugin chooser | |source |//(optional)// Source URL of plugin | diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 054a0a536..11d5b3cfc 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -2179,7 +2179,12 @@ a.tc-tiddlylink.tc-plugin-info:hover .tc-plugin-info > .tc-plugin-info-chunk > s } .tc-plugin-info-dropdown-body { - padding: 1em 1em 1em 1em; + padding: 1em 1em 0 1em; +} + +.tc-plugin-info-sub-plugins { + padding-top: 0.5em; + background: <>; } .tc-plugin-library-listing .tc-install-plugin { From 55e3b8d66d4114e3f8021c99c254af7989281940 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 28 Sep 2019 11:49:09 +0100 Subject: [PATCH 08/53] Plugin improvements * Improve docs * Improve styling of subplugins --- core/ui/ControlPanel/Modals/AddPlugins.tid | 6 ++++-- editions/tw5.com/tiddlers/Plugin Types.tid | 6 ++++-- themes/tiddlywiki/vanilla/base.tid | 2 ++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/core/ui/ControlPanel/Modals/AddPlugins.tid b/core/ui/ControlPanel/Modals/AddPlugins.tid index d25dc93ef..70235d498 100644 --- a/core/ui/ControlPanel/Modals/AddPlugins.tid +++ b/core/ui/ControlPanel/Modals/AddPlugins.tid @@ -78,13 +78,15 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
<$transclude tiddler=<> field="readme" mode="block"/>
-
<$set name="original-title" value={{{ [get[original-title]] }}}> +<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-pluginlimit[1]]" variable="ignore"> +
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-pluginsort[title]sort[name]]" variable="assetInfo"> <> -
+ +
diff --git a/editions/tw5.com/tiddlers/Plugin Types.tid b/editions/tw5.com/tiddlers/Plugin Types.tid index c496fdbd0..8afb91a66 100644 --- a/editions/tw5.com/tiddlers/Plugin Types.tid +++ b/editions/tw5.com/tiddlers/Plugin Types.tid @@ -1,5 +1,5 @@ created: 20190928081810311 -modified: 20190928081811355 +modified: 20190928103750812 tags: title: Plugin Types type: text/vnd.tiddlywiki @@ -15,4 +15,6 @@ The following plugin types are used internally by the core: * `import` - for the special $:/Import plugin created while importing is in progress * `info` - for the special $:/temp/info-plugin tiddler created by the InfoMechanism -While not supported by the plugin library, it is also possible to use custom plugin types to build plugin-like behaviour with a custom user interface. Plugins with a custom type will automatically receive the same behaviour as plain plugins but can display a custom user interface using an appropriate [[view template segment|SystemTag: $:/tags/ViewTemplate]]. \ No newline at end of file +While not supported by the plugin library, it is also possible to use custom plugin types to build plugin-like behaviour with a custom user interface. Plugins with a custom type will automatically receive the same behaviour as plain plugins but can display a custom user interface using an appropriate [[view template segment|SystemTag: $:/tags/ViewTemplate]]. + +By default, tiddlers within plugins with custom plugin types will not be registered as shadow tiddlers (the constituent tiddlers can still be addressed as subtiddlers by the TranscludeWidget, ViewWidget or the [[plugintiddlers Operator]]). Setting a configuration tiddler `$:/config/RegisterPluginType/` to `yes` will cause the tiddlers within the plugin to be registered as shadow tiddlers. diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 11d5b3cfc..1213fe7ab 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -2168,6 +2168,7 @@ a.tc-tiddlylink.tc-plugin-info:hover .tc-plugin-info > .tc-plugin-info-chunk > s .tc-plugin-info-dropdown { border: 1px solid <>; + background: <>; margin-top: -8px; } @@ -2180,6 +2181,7 @@ a.tc-tiddlylink.tc-plugin-info:hover .tc-plugin-info > .tc-plugin-info-chunk > s .tc-plugin-info-dropdown-body { padding: 1em 1em 0 1em; + background: <>; } .tc-plugin-info-sub-plugins { From 66435b49923ab15fce7b6c2d695f93e8b61f2395 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 28 Sep 2019 11:50:53 +0100 Subject: [PATCH 09/53] Update release note --- editions/prerelease/tiddlers/Release 5.1.22.tid | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/editions/prerelease/tiddlers/Release 5.1.22.tid b/editions/prerelease/tiddlers/Release 5.1.22.tid index ea0cfdfec..8a734e4e9 100644 --- a/editions/prerelease/tiddlers/Release 5.1.22.tid +++ b/editions/prerelease/tiddlers/Release 5.1.22.tid @@ -11,6 +11,12 @@ type: text/vnd.tiddlywiki Plugins [[can now|https://github.com/Jermolene/TiddlyWiki5/pull/4259]] be loaded or deleted dynamically, without requiring a reload -- as long as they don't contain any ~JavaScript modules. Plugins that require a reload are indicated in the plugin chooser in [[$:/ControlPanel]]. +The [[plugin listing|$:/core/ui/ControlPanel/Plugins]] and the [[plugin chooser|$:/core/ui/ControlPanel/Modals/AddPlugins]] in the control panel feature several improvements: + +* The plugin chooser now displays plugins that provide add-on functionality to another plugin as nested "sub-plugins", making the main listing easier to navigate +* Plugins may now declare dependencies that are automatically installed without user intervention +* All plugins now feature a concise, informal name (in addition to the description and title) + ! Translation Improvements * Improved Dutch translation From 916d006ed531d0dc77fd18a1a63f178e214d0fc3 Mon Sep 17 00:00:00 2001 From: Bram Chen Date: Sun, 29 Sep 2019 22:55:25 +0800 Subject: [PATCH 10/53] Add chinese translations for `Plugins/AlsoRequires` (#4277) --- languages/zh-Hans/ControlPanel.multids | 1 + languages/zh-Hant/ControlPanel.multids | 1 + 2 files changed, 2 insertions(+) diff --git a/languages/zh-Hans/ControlPanel.multids b/languages/zh-Hans/ControlPanel.multids index c771a8a3c..a46206f13 100644 --- a/languages/zh-Hans/ControlPanel.multids +++ b/languages/zh-Hans/ControlPanel.multids @@ -58,6 +58,7 @@ Palette/ShowEditor/Caption: 显示编辑器 Plugins/Add/Hint: 从官方插件库安装插件 Plugins/Add/Caption: 获取更多插件 Plugins/AlreadyInstalled/Hint: 此插件已经安装版本 <$text text=<>/> +Plugins/AlsoRequires: 还需要: Plugins/Caption: 插件 Plugins/Disable/Caption: 禁用 Plugins/Disable/Hint: 重新加载页面时禁用此插件 diff --git a/languages/zh-Hant/ControlPanel.multids b/languages/zh-Hant/ControlPanel.multids index f94406edb..e27bb6ac7 100644 --- a/languages/zh-Hant/ControlPanel.multids +++ b/languages/zh-Hant/ControlPanel.multids @@ -58,6 +58,7 @@ Palette/ShowEditor/Caption: 顯示編輯器 Plugins/Add/Hint: 從官方插件庫安裝插件 Plugins/Add/Caption: 獲取更多插件 Plugins/AlreadyInstalled/Hint: 此插件已經安裝版本 <$text text=<>/> +Plugins/AlsoRequires: 還需要: Plugins/Caption: 插件 Plugins/Disable/Caption: 停用 Plugins/Disable/Hint: 重新載入頁面時停用此插件 From 0e771e24193eb7eaf56434fc0a6efc3209ad29f3 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 3 Oct 2019 12:13:29 +0100 Subject: [PATCH 11/53] Fix currentTiddler in pagecontrol buttons Bug introduced in 8db893b9c99744e02797aa1837657f33b9222d62 Fixes #4283 --- core/ui/PageControls.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/ui/PageControls.tid b/core/ui/PageControls.tid index 31df286fe..93a7bc224 100644 --- a/core/ui/PageControls.tid +++ b/core/ui/PageControls.tid @@ -7,7 +7,7 @@ $:/config/PageControlButtons/Visibility/$(listItem)$
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem"> <$set name="hidden" value=<>> -<$list filter="[!text[hide]]" storyview="pop"> +<$list filter="[!text[hide]]" storyview="pop" variable="ignore"> <$set name="tv-config-toolbar-class" filter="[] [encodeuricomponent[]addprefix[tc-btn-]]"> <$transclude tiddler=<> mode="inline"/> From a054d100e73db95071299e92c4321c2aa8e42382 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 4 Oct 2019 11:23:17 +0100 Subject: [PATCH 12/53] Fix usage of tm-edit-text-operation count parameter Fixes #3912 --- core/modules/editor/operations/text/prefix-lines.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/modules/editor/operations/text/prefix-lines.js b/core/modules/editor/operations/text/prefix-lines.js index ad67232fc..fd483a983 100644 --- a/core/modules/editor/operations/text/prefix-lines.js +++ b/core/modules/editor/operations/text/prefix-lines.js @@ -13,12 +13,13 @@ Text editor operation to add a prefix to the selected lines "use strict"; exports["prefix-lines"] = function(event,operation) { + var targetCount = parseInt(event.paramObject.count + "",10); // Cut just past the preceding line break, or the start of the text operation.cutStart = $tw.utils.findPrecedingLineBreak(operation.text,operation.selStart); // Cut to just past the following line break, or to the end of the text operation.cutEnd = $tw.utils.findFollowingLineBreak(operation.text,operation.selEnd); // Compose the required prefix - var prefix = $tw.utils.repeat(event.paramObject.character,event.paramObject.count); + var prefix = $tw.utils.repeat(event.paramObject.character,targetCount); // Process each line var lines = operation.text.substring(operation.cutStart,operation.cutEnd).split(/\r?\n/mg); $tw.utils.each(lines,function(line,index) { @@ -33,7 +34,7 @@ exports["prefix-lines"] = function(event,operation) { line = line.substring(1); } // We're done if we removed the exact required prefix, otherwise add it - if(count !== event.paramObject.count) { + if(count !== targetCount) { // Apply the prefix line = prefix + " " + line; } From fb9ea69ad265abf787daeab968d2a19758c61a5c Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 4 Oct 2019 11:40:22 +0100 Subject: [PATCH 13/53] Selective expandable TOC: use "sort" filter when determining whether node is expandable Fixes #4284 --- core/wiki/macros/toc.tid | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/wiki/macros/toc.tid b/core/wiki/macros/toc.tid index 7602793f1..512a5e569 100644 --- a/core/wiki/macros/toc.tid +++ b/core/wiki/macros/toc.tid @@ -106,7 +106,7 @@ tags: $:/tags/Macro <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item" >
  • >> <$link> - <$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}"> + <$list filter="[all[current]tagging[]$sort$limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}"> <$reveal type="nomatch" stateTitle=<> text="open"> <$button setTitle=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/right-arrow}} @@ -132,7 +132,7 @@ tags: $:/tags/Macro <$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix] }}}> <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item">
  • >> - <$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}} <$view field='caption'><$view field='title'/>"> + <$list filter="[all[current]tagging[]$sort$limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}} <$view field='caption'><$view field='title'/>"> <$reveal type="nomatch" stateTitle=<> text="open"> <$button setTitle=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/right-arrow}} From 124efb31ea250b06eb6d0546900e74feb65dc6c8 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 4 Oct 2019 17:47:37 +0100 Subject: [PATCH 14/53] Update release note --- editions/prerelease/tiddlers/Release 5.1.22.tid | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editions/prerelease/tiddlers/Release 5.1.22.tid b/editions/prerelease/tiddlers/Release 5.1.22.tid index 8a734e4e9..e7b47d2c7 100644 --- a/editions/prerelease/tiddlers/Release 5.1.22.tid +++ b/editions/prerelease/tiddlers/Release 5.1.22.tid @@ -29,6 +29,9 @@ The [[plugin listing|$:/core/ui/ControlPanel/Plugins]] and the [[plugin chooser| ! Bug Fixes * [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4243]] problem with the [[GitLab saver|Saving to a Git service]] +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/issues/4237]] bug with permaview button when placed above the search box +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/a054d100e73db95071299e92c4321c2aa8e42382]] usage of ''count'' parameter of [[WidgetMessage: tm-edit-text-operation]] +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/issues/4284]] bug with toc-selective-expandable macro still showing disclosure arrow despite excluding tiddlers ! Contributors From 89716bb81d68b9c68d3c0fd2f2de96afad1b086a Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sun, 6 Oct 2019 14:58:45 +0100 Subject: [PATCH 15/53] Add class identifying the tiddler body editor See https://groups.google.com/d/msgid/tiddlywiki/13fb3572-4259-46c3-9cc7-6ed85b636177%40googlegroups.com --- core/ui/EditTemplate/body-editor.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/ui/EditTemplate/body-editor.tid b/core/ui/EditTemplate/body-editor.tid index 48d51b104..9920b03c5 100644 --- a/core/ui/EditTemplate/body-editor.tid +++ b/core/ui/EditTemplate/body-editor.tid @@ -3,7 +3,7 @@ title: $:/core/ui/EditTemplate/body/editor <$edit field="text" - class="tc-edit-texteditor" + class="tc-edit-texteditor tc-edit-texteditor-body" placeholder={{$:/language/EditTemplate/Body/Placeholder}} tabindex={{$:/config/EditTabIndex}} From 1010ca01cce7d084c5991e086813081d0e10f3b3 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sun, 6 Oct 2019 14:59:08 +0100 Subject: [PATCH 16/53] Stylesheet cleanup --- editions/tw5.com/tiddlers/system/tw5.com-styles.tid | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editions/tw5.com/tiddlers/system/tw5.com-styles.tid b/editions/tw5.com/tiddlers/system/tw5.com-styles.tid index 5164f84e3..4671d3894 100644 --- a/editions/tw5.com/tiddlers/system/tw5.com-styles.tid +++ b/editions/tw5.com/tiddlers/system/tw5.com-styles.tid @@ -1,6 +1,8 @@ title: $:/_tw5.com-styles tags: $:/tags/Stylesheet +\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline macrocallblock + .tc-double-spaced-list li { padding-bottom: .5em; padding-top: .5em; From cb2640669be50f6ca957b459446f19f32f8a323a Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sun, 6 Oct 2019 17:34:50 +0100 Subject: [PATCH 17/53] HTTP Server: should include bag in returned tiddlers The bag field is included in the tiddlers baked into the HTML file, but is also needed on tiddlers read from the server dynamically. Fixes #4291 --- core/modules/server/routes/get-tiddler.js | 1 + 1 file changed, 1 insertion(+) diff --git a/core/modules/server/routes/get-tiddler.js b/core/modules/server/routes/get-tiddler.js index 9088aa49d..e125d7055 100644 --- a/core/modules/server/routes/get-tiddler.js +++ b/core/modules/server/routes/get-tiddler.js @@ -34,6 +34,7 @@ exports.handler = function(request,response,state) { } }); tiddlerFields.revision = state.wiki.getChangeCount(title); + tiddlerFields.bag = "default"; tiddlerFields.type = tiddlerFields.type || "text/vnd.tiddlywiki"; response.writeHead(200, {"Content-Type": "application/json"}); response.end(JSON.stringify(tiddlerFields),"utf8"); From 8efd0ace343f6c5a3232c1ef9f3f06e81c7fefff Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Mon, 7 Oct 2019 16:13:56 +0200 Subject: [PATCH 18/53] Missing whitespace trim in PageControls (#4293) * add whitespace trim to advanced search button * add whitespace trim to new tiddler * add whitespace trim to new journal * add whitespace trim to new image * add whitespace trim to control panel button * add whitespace trim to tiddler manager button * add whitespace trim to language button * add whitespace trim to palette button * add whitespace trim to theme button * add whitespace trim to storyview button * add whitespace trim to timestamp button * add whitespace trim to encryption button * add whitespace trim to tag-manager button --- core/ui/PageControls/advanced-search.tid | 1 + core/ui/PageControls/controlpanel.tid | 1 + core/ui/PageControls/encryption.tid | 3 ++- core/ui/PageControls/language.tid | 3 ++- core/ui/PageControls/manager.tid | 1 + core/ui/PageControls/new-image.tid | 1 + core/ui/PageControls/new-journal.tid | 1 + core/ui/PageControls/newtiddler.tid | 1 + core/ui/PageControls/palette.tid | 3 ++- core/ui/PageControls/storyview.tid | 3 ++- core/ui/PageControls/tag-button.tid | 1 + core/ui/PageControls/theme.tid | 3 ++- core/ui/PageControls/timestamp.tid | 3 ++- 13 files changed, 19 insertions(+), 6 deletions(-) diff --git a/core/ui/PageControls/advanced-search.tid b/core/ui/PageControls/advanced-search.tid index c2962c9c4..caeaaebb8 100644 --- a/core/ui/PageControls/advanced-search.tid +++ b/core/ui/PageControls/advanced-search.tid @@ -3,6 +3,7 @@ tags: $:/tags/PageControls caption: {{$:/core/images/advanced-search-button}} {{$:/language/Buttons/AdvancedSearch/Caption}} description: {{$:/language/Buttons/AdvancedSearch/Hint}} +\whitespace trim \define control-panel-button(class) <$button to="$:/AdvancedSearch" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class="""$(tv-config-toolbar-class)$ $class$"""> <$list filter="[match[yes]]"> diff --git a/core/ui/PageControls/controlpanel.tid b/core/ui/PageControls/controlpanel.tid index 056f77263..82fac7398 100644 --- a/core/ui/PageControls/controlpanel.tid +++ b/core/ui/PageControls/controlpanel.tid @@ -3,6 +3,7 @@ tags: $:/tags/PageControls caption: {{$:/core/images/options-button}} {{$:/language/Buttons/ControlPanel/Caption}} description: {{$:/language/Buttons/ControlPanel/Hint}} +\whitespace trim \define control-panel-button(class) <$button to="$:/ControlPanel" tooltip={{$:/language/Buttons/ControlPanel/Hint}} aria-label={{$:/language/Buttons/ControlPanel/Caption}} class="""$(tv-config-toolbar-class)$ $class$"""> <$list filter="[match[yes]]"> diff --git a/core/ui/PageControls/encryption.tid b/core/ui/PageControls/encryption.tid index 80d473152..b4b5e553f 100644 --- a/core/ui/PageControls/encryption.tid +++ b/core/ui/PageControls/encryption.tid @@ -3,6 +3,7 @@ tags: $:/tags/PageControls caption: {{$:/core/images/locked-padlock}} {{$:/language/Buttons/Encryption/Caption}} description: {{$:/language/Buttons/Encryption/Hint}} +\whitespace trim <$reveal type="match" state="$:/isEncrypted" text="yes"> <$button message="tm-clear-password" tooltip={{$:/language/Buttons/Encryption/ClearPassword/Hint}} aria-label={{$:/language/Buttons/Encryption/ClearPassword/Caption}} class=<>> <$list filter="[match[yes]]"> @@ -22,4 +23,4 @@ description: {{$:/language/Buttons/Encryption/Hint}} <$text text={{$:/language/Buttons/Encryption/SetPassword/Caption}}/> - \ No newline at end of file + diff --git a/core/ui/PageControls/language.tid b/core/ui/PageControls/language.tid index 5591a768b..623c71004 100644 --- a/core/ui/PageControls/language.tid +++ b/core/ui/PageControls/language.tid @@ -3,6 +3,7 @@ tags: $:/tags/PageControls caption: {{$:/core/images/globe}} {{$:/language/Buttons/Language/Caption}} description: {{$:/language/Buttons/Language/Hint}} +\whitespace trim \define flag-title() $(languagePluginTitle)$/icon \end @@ -24,4 +25,4 @@ $(languagePluginTitle)$/icon
    {{$:/snippets/languageswitcher}}
    - \ No newline at end of file + diff --git a/core/ui/PageControls/manager.tid b/core/ui/PageControls/manager.tid index 09b3b05fc..7255747f4 100644 --- a/core/ui/PageControls/manager.tid +++ b/core/ui/PageControls/manager.tid @@ -3,6 +3,7 @@ tags: $:/tags/PageControls caption: {{$:/core/images/list}} {{$:/language/Buttons/Manager/Caption}} description: {{$:/language/Buttons/Manager/Hint}} +\whitespace trim \define manager-button(class) <$button to="$:/Manager" tooltip={{$:/language/Buttons/Manager/Hint}} aria-label={{$:/language/Buttons/Manager/Caption}} class="""$(tv-config-toolbar-class)$ $class$"""> <$list filter="[match[yes]]"> diff --git a/core/ui/PageControls/new-image.tid b/core/ui/PageControls/new-image.tid index 71b401ad8..fab7df573 100644 --- a/core/ui/PageControls/new-image.tid +++ b/core/ui/PageControls/new-image.tid @@ -3,6 +3,7 @@ tags: $:/tags/PageControls caption: {{$:/core/images/new-image-button}} {{$:/language/Buttons/NewImage/Caption}} description: {{$:/language/Buttons/NewImage/Hint}} +\whitespace trim <$button tooltip={{$:/language/Buttons/NewImage/Hint}} aria-label={{$:/language/Buttons/NewImage/Caption}} class=<> actions={{$:/core/ui/Actions/new-image}}> <$list filter="[match[yes]]"> {{$:/core/images/new-image-button}} diff --git a/core/ui/PageControls/new-journal.tid b/core/ui/PageControls/new-journal.tid index 797b65b49..914352e1b 100644 --- a/core/ui/PageControls/new-journal.tid +++ b/core/ui/PageControls/new-journal.tid @@ -3,6 +3,7 @@ tags: $:/tags/PageControls caption: {{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournal/Caption}} description: {{$:/language/Buttons/NewJournal/Hint}} +\whitespace trim \define journalButton() <$button tooltip={{$:/language/Buttons/NewJournal/Hint}} aria-label={{$:/language/Buttons/NewJournal/Caption}} class=<> actions={{$:/core/ui/Actions/new-journal}}> <$list filter="[match[yes]]"> diff --git a/core/ui/PageControls/newtiddler.tid b/core/ui/PageControls/newtiddler.tid index 1896d827f..7ea1994ff 100644 --- a/core/ui/PageControls/newtiddler.tid +++ b/core/ui/PageControls/newtiddler.tid @@ -3,6 +3,7 @@ tags: $:/tags/PageControls caption: {{$:/core/images/new-button}} {{$:/language/Buttons/NewTiddler/Caption}} description: {{$:/language/Buttons/NewTiddler/Hint}} +\whitespace trim <$button actions={{$:/core/ui/Actions/new-tiddler}} tooltip={{$:/language/Buttons/NewTiddler/Hint}} aria-label={{$:/language/Buttons/NewTiddler/Caption}} class=<>> <$list filter="[match[yes]]"> {{$:/core/images/new-button}} diff --git a/core/ui/PageControls/palette.tid b/core/ui/PageControls/palette.tid index d0a2ca60b..6fdbdb439 100644 --- a/core/ui/PageControls/palette.tid +++ b/core/ui/PageControls/palette.tid @@ -3,6 +3,7 @@ tags: $:/tags/PageControls caption: {{$:/core/images/palette}} {{$:/language/Buttons/Palette/Caption}} description: {{$:/language/Buttons/Palette/Hint}} +\whitespace trim <$button popup=<> tooltip={{$:/language/Buttons/Palette/Hint}} aria-label={{$:/language/Buttons/Palette/Caption}} class=<> selectedClass="tc-selected"> <$list filter="[match[yes]]"> @@ -17,4 +18,4 @@ description: {{$:/language/Buttons/Palette/Hint}}
    {{$:/snippets/paletteswitcher}}
    - \ No newline at end of file + diff --git a/core/ui/PageControls/storyview.tid b/core/ui/PageControls/storyview.tid index f84c0d2f9..c4d0b7365 100644 --- a/core/ui/PageControls/storyview.tid +++ b/core/ui/PageControls/storyview.tid @@ -3,6 +3,7 @@ tags: $:/tags/PageControls caption: {{$:/core/images/storyview-classic}} {{$:/language/Buttons/StoryView/Caption}} description: {{$:/language/Buttons/StoryView/Hint}} +\whitespace trim \define icon() $:/core/images/storyview-$(storyview)$ \end @@ -22,4 +23,4 @@ $:/core/images/storyview-$(storyview)$
    {{$:/snippets/viewswitcher}}
    - \ No newline at end of file + diff --git a/core/ui/PageControls/tag-button.tid b/core/ui/PageControls/tag-button.tid index 808a3bfd6..e7e6bdc89 100644 --- a/core/ui/PageControls/tag-button.tid +++ b/core/ui/PageControls/tag-button.tid @@ -3,6 +3,7 @@ tags: $:/tags/PageControls caption: {{$:/core/images/tag-button}} {{$:/language/Buttons/TagManager/Caption}} description: {{$:/language/Buttons/TagManager/Hint}} +\whitespace trim \define control-panel-button(class) <$button to="$:/TagManager" tooltip={{$:/language/Buttons/TagManager/Hint}} aria-label={{$:/language/Buttons/TagManager/Caption}} class="""$(tv-config-toolbar-class)$ $class$"""> <$list filter="[match[yes]]"> diff --git a/core/ui/PageControls/theme.tid b/core/ui/PageControls/theme.tid index b859beb68..2d8eadc7b 100644 --- a/core/ui/PageControls/theme.tid +++ b/core/ui/PageControls/theme.tid @@ -3,6 +3,7 @@ tags: $:/tags/PageControls caption: {{$:/core/images/theme-button}} {{$:/language/Buttons/Theme/Caption}} description: {{$:/language/Buttons/Theme/Hint}} +\whitespace trim <$button popup=<> tooltip={{$:/language/Buttons/Theme/Hint}} aria-label={{$:/language/Buttons/Theme/Caption}} class=<> selectedClass="tc-selected"> <$list filter="[match[yes]]"> @@ -19,4 +20,4 @@ description: {{$:/language/Buttons/Theme/Hint}} {{$:/snippets/themeswitcher}}
  • - \ No newline at end of file + diff --git a/core/ui/PageControls/timestamp.tid b/core/ui/PageControls/timestamp.tid index b25a1af05..abf89b70c 100644 --- a/core/ui/PageControls/timestamp.tid +++ b/core/ui/PageControls/timestamp.tid @@ -3,6 +3,7 @@ tags: $:/tags/PageControls caption: {{$:/core/images/timestamp-on}} {{$:/language/Buttons/Timestamp/Caption}} description: {{$:/language/Buttons/Timestamp/Hint}} +\whitespace trim <$reveal type="nomatch" state="$:/config/TimestampDisable" text="yes"> <$button tooltip={{$:/language/Buttons/Timestamp/On/Hint}} aria-label={{$:/language/Buttons/Timestamp/On/Caption}} class=<>> <$action-setfield $tiddler="$:/config/TimestampDisable" $value="yes"/> @@ -24,4 +25,4 @@ description: {{$:/language/Buttons/Timestamp/Hint}} <$text text={{$:/language/Buttons/Timestamp/Off/Caption}}/> - \ No newline at end of file + From d8fd2f75d60760dd56ca0d4730994d63179f4b83 Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Mon, 7 Oct 2019 19:50:30 +0200 Subject: [PATCH 19/53] Two missing whitespace trims for PageControls (#4296) * add whitespace trim to help button * add whitespace trim to new markdown button * Update help.tid --- plugins/tiddlywiki/help/help.tid | 2 ++ plugins/tiddlywiki/markdown/new-markdown.tid | 1 + 2 files changed, 3 insertions(+) diff --git a/plugins/tiddlywiki/help/help.tid b/plugins/tiddlywiki/help/help.tid index 2cdc12649..599ccf6a2 100644 --- a/plugins/tiddlywiki/help/help.tid +++ b/plugins/tiddlywiki/help/help.tid @@ -3,7 +3,9 @@ tags: $:/tags/PageControls caption: {{$:/core/images/help}} {{$:/language/Buttons/Help/Caption}} description: {{$:/language/Buttons/Help/Hint}} +\whitespace trim \define help-inner() +\whitespace trim <$reveal type="match" state="$:/config/ShowHelp" text="yes"> <$button set="$:/config/ShowHelp" setTo="no" tooltip={{$:/language/Buttons/Help/Hint}} aria-label={{$:/language/Buttons/Help/Caption}} class="""$(tv-config-toolbar-class)$ tc-selected"""> <$list filter="[prefix[yes]]"> diff --git a/plugins/tiddlywiki/markdown/new-markdown.tid b/plugins/tiddlywiki/markdown/new-markdown.tid index 688ea9709..ff6d40c82 100755 --- a/plugins/tiddlywiki/markdown/new-markdown.tid +++ b/plugins/tiddlywiki/markdown/new-markdown.tid @@ -4,6 +4,7 @@ caption: {{$:/plugins/tiddlywiki/markdown/images/new-markdown-button}} {{$:/lang description: {{$:/language/Buttons/NewMarkdown/Hint}} list-after: $:/core/ui/Buttons/new-tiddler +\whitespace trim <$button tooltip={{$:/language/Buttons/NewMarkdown/Hint}} aria-label={{$:/language/Buttons/NewMarkdown/Caption}} class=<>> <$action-sendmessage $message="tm-new-tiddler" type="text/x-markdown"/> <$list filter="[prefix[yes]]"> From e9211b0eee8e0b081f9f1597bde6673bf4c55d5c Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 11 Oct 2019 10:57:29 +0100 Subject: [PATCH 20/53] Allow sidebar tabs to be independently targeted via CSS --- core/ui/SideBar/More.tid | 2 +- core/ui/SideBarSegments/tabs.tid | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/ui/SideBar/More.tid b/core/ui/SideBar/More.tid index 624a3ae4a..1c21f9d68 100644 --- a/core/ui/SideBar/More.tid +++ b/core/ui/SideBar/More.tid @@ -3,5 +3,5 @@ tags: $:/tags/SideBar caption: {{$:/language/SideBar/More/Caption}}
    -<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/MoreSideBar]!has[draft.of]]" default={{$:/config/DefaultMoreSidebarTab}} state="$:/state/tab/moresidebar" class="tc-vertical" /> +<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/MoreSideBar]!has[draft.of]]" default={{$:/config/DefaultMoreSidebarTab}} state="$:/state/tab/moresidebar" class="tc-vertical tc-sidebar-tabs-more" />
    \ No newline at end of file diff --git a/core/ui/SideBarSegments/tabs.tid b/core/ui/SideBarSegments/tabs.tid index 8247ecf83..24037e8e0 100644 --- a/core/ui/SideBarSegments/tabs.tid +++ b/core/ui/SideBarSegments/tabs.tid @@ -3,6 +3,6 @@ tags: $:/tags/SideBarSegment
    -<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]" default={{$:/config/DefaultSidebarTab}} state="$:/state/tab/sidebar" /> +<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]" default={{$:/config/DefaultSidebarTab}} state="$:/state/tab/sidebar" class="tc-sidebar-tabs-main"/>
    From 81f1e6af4e5920c6ff41e7f08171bfddc1b26dfc Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 11 Oct 2019 15:34:57 +0100 Subject: [PATCH 21/53] Vertical tabs: remove word break setting See discussion here: https://groups.google.com/d/msgid/tiddlywiki/467c887e-edf6-4187-9727-bf806fdeb711%40googlegroups.com --- themes/tiddlywiki/vanilla/base.tid | 1 - 1 file changed, 1 deletion(-) diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 1213fe7ab..4fb297615 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -1806,7 +1806,6 @@ html body.tc-body.tc-single-tiddler-window { } .tc-tab-content.tc-vertical { - word-break: break-word; display: inline-block; vertical-align: top; padding-top: 0; From d30eacc6520971c95bdabf24f4c4122534d9414a Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 11 Oct 2019 17:46:30 +0100 Subject: [PATCH 22/53] Select widget: fix bug with deselecting entries programmatically Previously, it was not possible to deselect entries by editing the tiddler $:/generated-list-demo-state used in the final example of the SelectWidget docs --- core/modules/widgets/select.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/modules/widgets/select.js b/core/modules/widgets/select.js index d860d42cf..6efeb588f 100644 --- a/core/modules/widgets/select.js +++ b/core/modules/widgets/select.js @@ -96,11 +96,8 @@ SelectWidget.prototype.setSelectValue = function() { var select = this.getSelectDomNode(); var values = Array.isArray(value) ? value : $tw.utils.parseStringArray(value); for(var i=0; i < select.children.length; i++){ - if(values.indexOf(select.children[i].value) != -1) { - select.children[i].selected = true; - } + select.children[i].selected = values.indexOf(select.children[i].value) !== -1 } - } else { var domNode = this.getSelectDomNode(); if(domNode.value !== value) { From 9ed45cfaadff162fa56b578d9238a3ead691fe99 Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Sat, 12 Oct 2019 10:24:05 +0200 Subject: [PATCH 23/53] Add whitespace trim to SideBarSegments search (#4302) --- core/ui/SideBarSegments/search.tid | 1 + 1 file changed, 1 insertion(+) diff --git a/core/ui/SideBarSegments/search.tid b/core/ui/SideBarSegments/search.tid index 529ce74aa..f0ab71a98 100644 --- a/core/ui/SideBarSegments/search.tid +++ b/core/ui/SideBarSegments/search.tid @@ -1,6 +1,7 @@ title: $:/core/ui/SideBarSegments/search tags: $:/tags/SideBarSegment +\whitespace trim - \end From 66b68f4a58f2e7e24954d6f59c3791deaf0025e6 Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Sat, 12 Oct 2019 13:04:10 +0200 Subject: [PATCH 25/53] Allow configuration of default focus field of new tiddlers (#4238) * add editFocus attribute to edit widget * add focus condition to title editTemplate * add focus condition to body-editor editTemplate * add focus attribute to type editTemplate * add focus attribute to fields editTemplate * add focus attribute to tag-picker * add $:/config/AutoFocus tiddler ... default focus is title * Update Basics.tid * Update ControlPanel.multids * Create minifocusswitcher.tid * Update minifocusswitcher.tid * Update Basics.tid * Update body-editor.tid --- core/language/en-GB/ControlPanel.multids | 1 + core/modules/widgets/edit.js | 4 +++- core/ui/ControlPanel/Basics.tid | 1 + core/ui/EditTemplate/body-editor.tid | 1 + core/ui/EditTemplate/fields.tid | 2 +- core/ui/EditTemplate/title.tid | 2 +- core/ui/EditTemplate/type.tid | 2 +- core/wiki/config/AutoFocus.tid | 2 ++ core/wiki/macros/tag-picker.tid | 2 +- core/wiki/minifocusswitcher.tid | 7 +++++++ 10 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 core/wiki/config/AutoFocus.tid create mode 100644 core/wiki/minifocusswitcher.tid diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids index c7ff155c0..90884aa60 100644 --- a/core/language/en-GB/ControlPanel.multids +++ b/core/language/en-GB/ControlPanel.multids @@ -5,6 +5,7 @@ Advanced/Hint: Internal information about this TiddlyWiki Appearance/Caption: Appearance Appearance/Hint: Ways to customise the appearance of your TiddlyWiki. Basics/AnimDuration/Prompt: Animation duration: +Basics/AutoFocus/Prompt: Default AutoFocus field: Basics/Caption: Basics Basics/DefaultTiddlers/BottomHint: Use [[double square brackets]] for titles with spaces. Or you can choose to <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">retain story ordering Basics/DefaultTiddlers/Prompt: Default tiddlers: diff --git a/core/modules/widgets/edit.js b/core/modules/widgets/edit.js index 678297ab2..92ac0e1be 100644 --- a/core/modules/widgets/edit.js +++ b/core/modules/widgets/edit.js @@ -47,6 +47,7 @@ EditWidget.prototype.execute = function() { this.editClass = this.getAttribute("class"); this.editPlaceholder = this.getAttribute("placeholder"); this.editTabIndex = this.getAttribute("tabindex"); + this.editFocus = this.getAttribute("focus",""); // Choose the appropriate edit widget this.editorType = this.getEditorType(); // Make the child widgets @@ -58,7 +59,8 @@ EditWidget.prototype.execute = function() { index: {type: "string", value: this.editIndex}, "class": {type: "string", value: this.editClass}, "placeholder": {type: "string", value: this.editPlaceholder}, - "tabindex": {type: "string", value: this.editTabIndex} + "tabindex": {type: "string", value: this.editTabIndex}, + "focus": {type: "string", value: this.editFocus} }, children: this.parseTreeNode.children }]); diff --git a/core/ui/ControlPanel/Basics.tid b/core/ui/ControlPanel/Basics.tid index 11563a3bc..a4fc82e5f 100644 --- a/core/ui/ControlPanel/Basics.tid +++ b/core/ui/ControlPanel/Basics.tid @@ -24,6 +24,7 @@ caption: {{$:/language/ControlPanel/Basics/Caption}} |<$link to="$:/config/NewJournal/Title"><> |<$edit-text tiddler="$:/config/NewJournal/Title" default="" tag="input"/> | |<$link to="$:/config/NewJournal/Text"><> |<$edit tiddler="$:/config/NewJournal/Text" tag="textarea" class="tc-edit-texteditor" default=""/> | |<$link to="$:/config/NewJournal/Tags"><> |<$edit-text tiddler="$:/config/NewJournal/Tags" default="" tag="input"/> | +|<> |{{$:/snippets/minifocusswitcher}} | |<> |{{$:/snippets/minilanguageswitcher}} | |<> |<> | |<> |<> | diff --git a/core/ui/EditTemplate/body-editor.tid b/core/ui/EditTemplate/body-editor.tid index 9920b03c5..a299d063d 100644 --- a/core/ui/EditTemplate/body-editor.tid +++ b/core/ui/EditTemplate/body-editor.tid @@ -6,6 +6,7 @@ title: $:/core/ui/EditTemplate/body/editor class="tc-edit-texteditor tc-edit-texteditor-body" placeholder={{$:/language/EditTemplate/Body/Placeholder}} tabindex={{$:/config/EditTabIndex}} + focus={{{ [{$:/config/Autofocus}match[text]then[true]] ~[[false]] }}} ><$set diff --git a/core/ui/EditTemplate/fields.tid b/core/ui/EditTemplate/fields.tid index 4b5ab5d4b..ad0c78214 100644 --- a/core/ui/EditTemplate/fields.tid +++ b/core/ui/EditTemplate/fields.tid @@ -40,7 +40,7 @@ $value={{$:/temp/newfieldvalue}}/> <$text text=<>/>: -<$edit-text tiddler=<> field=<> placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} tabindex={{$:/config/EditTabIndex}}/> +<$edit-text tiddler=<> field=<> placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} tabindex={{$:/config/EditTabIndex}} focus={{{ [{$:/config/AutoFocus}match[fields]then[true]] ~[[false]] }}}/> <$button class="tc-btn-invisible" tooltip={{$:/language/EditTemplate/Field/Remove/Hint}} aria-label={{$:/language/EditTemplate/Field/Remove/Caption}}> diff --git a/core/ui/EditTemplate/title.tid b/core/ui/EditTemplate/title.tid index 6496db075..0f3632ad1 100644 --- a/core/ui/EditTemplate/title.tid +++ b/core/ui/EditTemplate/title.tid @@ -1,7 +1,7 @@ title: $:/core/ui/EditTemplate/title tags: $:/tags/EditTemplate -<$edit-text field="draft.title" class="tc-titlebar tc-edit-texteditor" focus="true" tabindex={{$:/config/EditTabIndex}}/> +<$edit-text field="draft.title" class="tc-titlebar tc-edit-texteditor" focus={{{ [{$:/config/AutoFocus}match[title]then[true]] ~[[false]] }}} tabindex={{$:/config/EditTabIndex}}/> <$vars pattern="""[\|\[\]{}]""" bad-chars="""`| [ ] { }`"""> diff --git a/core/ui/EditTemplate/type.tid b/core/ui/EditTemplate/type.tid index 8bf206d74..64c941037 100644 --- a/core/ui/EditTemplate/type.tid +++ b/core/ui/EditTemplate/type.tid @@ -3,7 +3,7 @@ tags: $:/tags/EditTemplate \define lingo-base() $:/language/EditTemplate/
    <$fieldmangler> -<> <$edit-text field="type" tag="input" default="" placeholder={{$:/language/EditTemplate/Type/Placeholder}} focusPopup=<> class="tc-edit-typeeditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}}/> <$button popup=<> class="tc-btn-invisible tc-btn-dropdown" tooltip={{$:/language/EditTemplate/Type/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Type/Dropdown/Caption}}>{{$:/core/images/down-arrow}} <$button message="tm-remove-field" param="type" class="tc-btn-invisible tc-btn-icon" tooltip={{$:/language/EditTemplate/Type/Delete/Hint}} aria-label={{$:/language/EditTemplate/Type/Delete/Caption}}>{{$:/core/images/delete-button}} +<> <$edit-text field="type" tag="input" default="" placeholder={{$:/language/EditTemplate/Type/Placeholder}} focusPopup=<> class="tc-edit-typeeditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}} focus={{{ [{$:/config/AutoFocus}match[type]then[true]] ~[[false]] }}}/> <$button popup=<> class="tc-btn-invisible tc-btn-dropdown" tooltip={{$:/language/EditTemplate/Type/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Type/Dropdown/Caption}}>{{$:/core/images/down-arrow}} <$button message="tm-remove-field" param="type" class="tc-btn-invisible tc-btn-icon" tooltip={{$:/language/EditTemplate/Type/Delete/Hint}} aria-label={{$:/language/EditTemplate/Type/Delete/Caption}}>{{$:/core/images/delete-button}}
    diff --git a/core/wiki/config/AutoFocus.tid b/core/wiki/config/AutoFocus.tid new file mode 100644 index 000000000..a1a9f71b1 --- /dev/null +++ b/core/wiki/config/AutoFocus.tid @@ -0,0 +1,2 @@ +title: $:/config/AutoFocus +text: title diff --git a/core/wiki/macros/tag-picker.tid b/core/wiki/macros/tag-picker.tid index 9f29c3665..b0c1543cb 100644 --- a/core/wiki/macros/tag-picker.tid +++ b/core/wiki/macros/tag-picker.tid @@ -18,7 +18,7 @@ $(actions)$
    <$keyboard key="ENTER" actions=<>> -<$edit-text tiddler="$:/temp/NewTagName" tag="input" default="" placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} focusPopup=<> class="tc-edit-texteditor tc-popup-handle" tabindex=<>/> +<$edit-text tiddler="$:/temp/NewTagName" tag="input" default="" placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} focusPopup=<> class="tc-edit-texteditor tc-popup-handle" tabindex=<> focus={{{ [{$:/config/AutoFocus}match[tags]then[true]] ~[[false]] }}}/> <$button popup=<> class="tc-btn-invisible" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}} <$set name="tag" value={{$:/temp/NewTagName}}> diff --git a/core/wiki/minifocusswitcher.tid b/core/wiki/minifocusswitcher.tid new file mode 100644 index 000000000..ca9e1d4a0 --- /dev/null +++ b/core/wiki/minifocusswitcher.tid @@ -0,0 +1,7 @@ +title: $:/snippets/minifocusswitcher + +<$select tiddler="$:/config/Autofocus"> +<$list filter="title tags text type fields"> + + + From d01b781283115f32eac345f92e483741918a65a7 Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Sat, 12 Oct 2019 15:08:52 +0200 Subject: [PATCH 26/53] Restore previous popup mechanism (no cancelling when focusing inputs) (#4305) * remove cancelpopups from factory.js * remove handleFocusEvent from framed engine * remove cancelPopups from simple engine * Update popup.js --- core/modules/editor/engines/framed.js | 11 ------- core/modules/editor/engines/simple.js | 1 - core/modules/editor/factory.js | 7 ----- core/modules/utils/dom/popup.js | 41 ++++++--------------------- 4 files changed, 8 insertions(+), 52 deletions(-) diff --git a/core/modules/editor/engines/framed.js b/core/modules/editor/engines/framed.js index 7984eff4f..6e7da24da 100644 --- a/core/modules/editor/engines/framed.js +++ b/core/modules/editor/engines/framed.js @@ -79,7 +79,6 @@ function FramedEngine(options) { // Add event listeners $tw.utils.addEventListeners(this.domNode,[ {name: "click",handlerObject: this,handlerMethod: "handleClickEvent"}, - {name: "focus",handlerObject: this,handlerMethod: "handleFocusEvent"}, {name: "input",handlerObject: this,handlerMethod: "handleInputEvent"}, {name: "keydown",handlerObject: this.widget,handlerMethod: "handleKeydownEvent"} ]); @@ -153,16 +152,6 @@ FramedEngine.prototype.focus = function() { this.domNode.select(); } }; - -/* -Handle the focus event -*/ -FramedEngine.prototype.handleFocusEvent = function(event) { - if(this.widget.cancelPopups) { - this.widget.cancelPopups(); - } - return true; -}; /* Handle a click diff --git a/core/modules/editor/engines/simple.js b/core/modules/editor/engines/simple.js index acd4bc3d2..bb77893d7 100644 --- a/core/modules/editor/engines/simple.js +++ b/core/modules/editor/engines/simple.js @@ -122,7 +122,6 @@ SimpleEngine.prototype.handleInputEvent = function(event) { Handle a dom "focus" event */ SimpleEngine.prototype.handleFocusEvent = function(event) { - this.widget.cancelPopups(); if(this.widget.editFocusPopup) { $tw.popup.triggerPopup({ domNode: this.domNode, diff --git a/core/modules/editor/factory.js b/core/modules/editor/factory.js index 82b4484c6..8dfc88037 100644 --- a/core/modules/editor/factory.js +++ b/core/modules/editor/factory.js @@ -248,13 +248,6 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) { } }; - /* - Cancel Popups - */ - EditTextWidget.prototype.cancelPopups = function() { - $tw.popup.cancel(0,this.engine.domNode); - }; - /* Handle a dom "keydown" event, which we'll bubble up to our container for the keyboard widgets benefit */ diff --git a/core/modules/utils/dom/popup.js b/core/modules/utils/dom/popup.js index aa89d705c..4ae1a44cd 100644 --- a/core/modules/utils/dom/popup.js +++ b/core/modules/utils/dom/popup.js @@ -149,46 +149,21 @@ Popup.prototype.show = function(options) { } }; -/* -Detect if a Popup contains an input field that has focus -Returns true or false -*/ -Popup.prototype.detectInputWithinPopup = function(node) { - var withinPopup = false, - currNode = node; - for(var i=0; i Date: Sat, 12 Oct 2019 15:10:06 +0200 Subject: [PATCH 27/53] Add two missing tooltips: add-tag button and add-field button (#4306) * add tooltip to field add button * Update EditTemplate.multids * Update EditTemplate.multids * add tooltip to tag-picker add button --- core/language/en-GB/EditTemplate.multids | 2 ++ core/ui/EditTemplate/fields.tid | 2 +- core/wiki/macros/tag-picker.tid | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/language/en-GB/EditTemplate.multids b/core/language/en-GB/EditTemplate.multids index 9a80300f0..90ee4975f 100644 --- a/core/language/en-GB/EditTemplate.multids +++ b/core/language/en-GB/EditTemplate.multids @@ -8,6 +8,7 @@ Field/Remove/Hint: Remove field Field/Dropdown/Caption: field list Field/Dropdown/Hint: Show field list Fields/Add/Button: add +Fields/Add/Button/Hint: add field Fields/Add/Name/Placeholder: field name Fields/Add/Prompt: Add a new field: Fields/Add/Value/Placeholder: field value @@ -16,6 +17,7 @@ Fields/Add/Dropdown/User: User fields Shadow/Warning: This is a shadow tiddler. Any changes you make will override the default version from the plugin <> Shadow/OverriddenWarning: This is a modified shadow tiddler. You can revert to the default version in the plugin <> by deleting this tiddler Tags/Add/Button: add +Tags/Add/Button/Hint: add tag Tags/Add/Placeholder: tag name Tags/Dropdown/Caption: tag list Tags/Dropdown/Hint: Show tag list diff --git a/core/ui/EditTemplate/fields.tid b/core/ui/EditTemplate/fields.tid index ad0c78214..6923fac17 100644 --- a/core/ui/EditTemplate/fields.tid +++ b/core/ui/EditTemplate/fields.tid @@ -13,7 +13,7 @@ $:/config/EditTemplateFields/Visibility/$(currentField)$ \define new-field() <$vars name={{$:/temp/newfieldname}}> <$reveal type="nomatch" text="" default=<>> -<$button> +<$button tooltip=<>> <$action-sendmessage $message="tm-add-field" $name=<> $value={{$:/temp/newfieldvalue}}/> diff --git a/core/wiki/macros/tag-picker.tid b/core/wiki/macros/tag-picker.tid index b0c1543cb..952aaf0c5 100644 --- a/core/wiki/macros/tag-picker.tid +++ b/core/wiki/macros/tag-picker.tid @@ -7,7 +7,7 @@ tags: $:/tags/Macro \end \define tag-button() -<$button class="tc-btn-invisible" tag="a"> +<$button class="tc-btn-invisible" tag="a" tooltip={{$:/language/EditTemplate/Tags/Add/Button/Hint}}> $(actions)$ <$action-deletetiddler $tiddler="$:/temp/NewTagName"/> <$macrocall $name="tag-pill" tag=<>/> From ea6113b255796bbc621519c45ec279f1151758b1 Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Sat, 12 Oct 2019 16:10:24 +0200 Subject: [PATCH 28/53] Fix CamelCase AutoFocus in ControlPanel (#4308) * from AutoFocus to ~AutoFocus * Update minifocusswitcher.tid * Update Basics.tid * Update body-editor.tid --- core/language/en-GB/ControlPanel.multids | 2 +- core/ui/ControlPanel/Basics.tid | 2 +- core/ui/EditTemplate/body-editor.tid | 2 +- core/wiki/minifocusswitcher.tid | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids index 90884aa60..3b086e851 100644 --- a/core/language/en-GB/ControlPanel.multids +++ b/core/language/en-GB/ControlPanel.multids @@ -5,7 +5,7 @@ Advanced/Hint: Internal information about this TiddlyWiki Appearance/Caption: Appearance Appearance/Hint: Ways to customise the appearance of your TiddlyWiki. Basics/AnimDuration/Prompt: Animation duration: -Basics/AutoFocus/Prompt: Default AutoFocus field: +Basics/AutoFocus/Prompt: Default ~AutoFocus field: Basics/Caption: Basics Basics/DefaultTiddlers/BottomHint: Use [[double square brackets]] for titles with spaces. Or you can choose to <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">retain story ordering Basics/DefaultTiddlers/Prompt: Default tiddlers: diff --git a/core/ui/ControlPanel/Basics.tid b/core/ui/ControlPanel/Basics.tid index a4fc82e5f..4a4379e82 100644 --- a/core/ui/ControlPanel/Basics.tid +++ b/core/ui/ControlPanel/Basics.tid @@ -24,7 +24,7 @@ caption: {{$:/language/ControlPanel/Basics/Caption}} |<$link to="$:/config/NewJournal/Title"><> |<$edit-text tiddler="$:/config/NewJournal/Title" default="" tag="input"/> | |<$link to="$:/config/NewJournal/Text"><> |<$edit tiddler="$:/config/NewJournal/Text" tag="textarea" class="tc-edit-texteditor" default=""/> | |<$link to="$:/config/NewJournal/Tags"><> |<$edit-text tiddler="$:/config/NewJournal/Tags" default="" tag="input"/> | -|<> |{{$:/snippets/minifocusswitcher}} | +|<> |{{$:/snippets/minifocusswitcher}} | |<> |{{$:/snippets/minilanguageswitcher}} | |<> |<> | |<> |<> | diff --git a/core/ui/EditTemplate/body-editor.tid b/core/ui/EditTemplate/body-editor.tid index a299d063d..fe2a034c6 100644 --- a/core/ui/EditTemplate/body-editor.tid +++ b/core/ui/EditTemplate/body-editor.tid @@ -6,7 +6,7 @@ title: $:/core/ui/EditTemplate/body/editor class="tc-edit-texteditor tc-edit-texteditor-body" placeholder={{$:/language/EditTemplate/Body/Placeholder}} tabindex={{$:/config/EditTabIndex}} - focus={{{ [{$:/config/Autofocus}match[text]then[true]] ~[[false]] }}} + focus={{{ [{$:/config/AutoFocus}match[text]then[true]] ~[[false]] }}} ><$set diff --git a/core/wiki/minifocusswitcher.tid b/core/wiki/minifocusswitcher.tid index ca9e1d4a0..979db1f6c 100644 --- a/core/wiki/minifocusswitcher.tid +++ b/core/wiki/minifocusswitcher.tid @@ -1,6 +1,6 @@ title: $:/snippets/minifocusswitcher -<$select tiddler="$:/config/Autofocus"> +<$select tiddler="$:/config/AutoFocus"> <$list filter="title tags text type fields"> From 007fc8239bd87026a308b8dfc0be12b5bc202294 Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Sat, 12 Oct 2019 17:30:59 +0200 Subject: [PATCH 29/53] Add default new tiddler tags mechanism and interface (#4307) * Update ControlPanel.multids * Update Basics.tid * Update new-tiddler.tid * Update new-journal.tid * Update new-image.tid * Update new-here.tid * Update new-journal-here.tid * Update new-tiddler.tid * Update new-image.tid * Update new-journal.tid * Update new-tiddler.tid * Update new-image.tid * Update new-here.tid * Update new-journal-here.tid * Update Basics.tid * Update Basics.tid --- core/language/en-GB/ControlPanel.multids | 1 + core/ui/Actions/new-image.tid | 2 +- core/ui/Actions/new-journal.tid | 2 +- core/ui/Actions/new-tiddler.tid | 2 +- core/ui/ControlPanel/Basics.tid | 5 +++-- core/ui/ViewToolbar/new-here.tid | 4 ++-- core/ui/ViewToolbar/new-journal-here.tid | 4 ++-- 7 files changed, 11 insertions(+), 9 deletions(-) diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids index 3b086e851..051b26296 100644 --- a/core/language/en-GB/ControlPanel.multids +++ b/core/language/en-GB/ControlPanel.multids @@ -14,6 +14,7 @@ Basics/Language/Prompt: Hello! Current language: Basics/NewJournal/Title/Prompt: Title of new journal tiddlers Basics/NewJournal/Text/Prompt: Text for new journal tiddlers Basics/NewJournal/Tags/Prompt: Tags for new journal tiddlers +Basics/NewTiddler/Tags/Prompt: Tags for new tiddlers Basics/NewTiddler/Title/Prompt: Title of new tiddlers Basics/OverriddenShadowTiddlers/Prompt: Number of overridden shadow tiddlers: Basics/ShadowTiddlers/Prompt: Number of shadow tiddlers: diff --git a/core/ui/Actions/new-image.tid b/core/ui/Actions/new-image.tid index 372933e90..1e46ebcdb 100644 --- a/core/ui/Actions/new-image.tid +++ b/core/ui/Actions/new-image.tid @@ -6,5 +6,5 @@ description: create a new image tiddler image/$(imageType)$ \end <$vars imageType={{$:/config/NewImageType}}> -<$action-sendmessage $message="tm-new-tiddler" type=<>/> +<$action-sendmessage $message="tm-new-tiddler" type=<> tags={{$:/config/NewTiddler/Tags!!tags}}/> diff --git a/core/ui/Actions/new-journal.tid b/core/ui/Actions/new-journal.tid index 4c5082f78..5cb7eeade 100644 --- a/core/ui/Actions/new-journal.tid +++ b/core/ui/Actions/new-journal.tid @@ -2,7 +2,7 @@ title: $:/core/ui/Actions/new-journal tags: $:/tags/Actions description: create a new journal tiddler -<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} journalTags={{$:/config/NewJournal/Tags}} journalText={{$:/config/NewJournal/Text}}> +<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} journalTags={{{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}> <$wikify name="journalTitle" text="""<$macrocall $name="now" format=<>/>"""> <$reveal type="nomatch" state=<> text=""> <$action-sendmessage $message="tm-new-tiddler" title=<> tags=<> text={{{ [get[]] }}}/> diff --git a/core/ui/Actions/new-tiddler.tid b/core/ui/Actions/new-tiddler.tid index 272b61007..e176f0ab3 100644 --- a/core/ui/Actions/new-tiddler.tid +++ b/core/ui/Actions/new-tiddler.tid @@ -2,4 +2,4 @@ title: $:/core/ui/Actions/new-tiddler tags: $:/tags/Actions description: create a new empty tiddler -<$action-sendmessage $message="tm-new-tiddler"/> +<$action-sendmessage $message="tm-new-tiddler" tags={{$:/config/NewTiddler/Tags!!tags}}/> diff --git a/core/ui/ControlPanel/Basics.tid b/core/ui/ControlPanel/Basics.tid index 4a4379e82..72a1ca9f3 100644 --- a/core/ui/ControlPanel/Basics.tid +++ b/core/ui/ControlPanel/Basics.tid @@ -22,9 +22,10 @@ caption: {{$:/language/ControlPanel/Basics/Caption}} |<$link to="$:/DefaultTiddlers"><> |<>
    <$edit tag="textarea" tiddler="$:/DefaultTiddlers" class="tc-edit-texteditor"/>
    //<>// | |<$link to="$:/language/DefaultNewTiddlerTitle"><> |<$edit-text tiddler="$:/language/DefaultNewTiddlerTitle" default="" tag="input"/> | |<$link to="$:/config/NewJournal/Title"><> |<$edit-text tiddler="$:/config/NewJournal/Title" default="" tag="input"/> | +|<$link to="$:/config/NewTiddler/Tags"><> |{{$:/config/NewTiddler/Tags||$:/core/ui/EditTemplate/tags}} | |<$link to="$:/config/NewJournal/Text"><> |<$edit tiddler="$:/config/NewJournal/Text" tag="textarea" class="tc-edit-texteditor" default=""/> | -|<$link to="$:/config/NewJournal/Tags"><> |<$edit-text tiddler="$:/config/NewJournal/Tags" default="" tag="input"/> | -|<> |{{$:/snippets/minifocusswitcher}} | +|<$link to="$:/config/NewJournal/Tags"><> |{{$:/config/NewJournal/Tags||$:/core/ui/EditTemplate/tags}} | +|<> |{{$:/snippets/minifocusswitcher}} | |<> |{{$:/snippets/minilanguageswitcher}} | |<> |<> | |<> |<> | diff --git a/core/ui/ViewToolbar/new-here.tid b/core/ui/ViewToolbar/new-here.tid index 7b3f96c32..87f73e267 100644 --- a/core/ui/ViewToolbar/new-here.tid +++ b/core/ui/ViewToolbar/new-here.tid @@ -5,7 +5,7 @@ description: {{$:/language/Buttons/NewHere/Hint}} \whitespace trim \define newHereActions() -<$set name="tags" filter="[]"> +<$set name="tags" filter="[addsuffix[ ]addsuffix{$:/config/NewTiddler/Tags!!tags}]"> <$action-sendmessage $message="tm-new-tiddler" tags=<>/> \end @@ -21,4 +21,4 @@ description: {{$:/language/Buttons/NewHere/Hint}} \end -<> \ No newline at end of file +<> diff --git a/core/ui/ViewToolbar/new-journal-here.tid b/core/ui/ViewToolbar/new-journal-here.tid index e41fd4063..b540185ca 100644 --- a/core/ui/ViewToolbar/new-journal-here.tid +++ b/core/ui/ViewToolbar/new-journal-here.tid @@ -23,9 +23,9 @@ description: {{$:/language/Buttons/NewJournalHere/Hint}} \end <$set name="journalTitleTemplate" value={{$:/config/NewJournal/Title}}> -<$set name="journalTags" value={{$:/config/NewJournal/Tags}}> +<$set name="journalTags" value={{$:/config/NewJournal/Tags!!tags}}> <$set name="currentTiddlerTag" value=<>> <> - \ No newline at end of file + From 920f0869c4f0931067944fbb23b4cd084f341a0f Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Sat, 12 Oct 2019 17:40:51 +0200 Subject: [PATCH 30/53] Fix: remove cancelPopups from codemirror engine (#4310) --- plugins/tiddlywiki/codemirror/engine.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/tiddlywiki/codemirror/engine.js b/plugins/tiddlywiki/codemirror/engine.js index 5fa4686cf..630482d7d 100755 --- a/plugins/tiddlywiki/codemirror/engine.js +++ b/plugins/tiddlywiki/codemirror/engine.js @@ -125,9 +125,6 @@ function CodeMirrorEngine(options) { event.stopPropagation(); // Otherwise TW's dropzone widget sees the drop event return false; }); - this.cm.on("focus",function() { - self.widget.cancelPopups(); - }); this.cm.on("keydown",function(cm,event) { return self.widget.handleKeydownEvent.call(self.widget,event); }); From f0779b58ac8f516382cfe45c0a6a6fd1cd2caf45 Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Sun, 13 Oct 2019 11:19:07 +0200 Subject: [PATCH 31/53] Revert "Add default new tiddler tags mechanism and interface (#4307)" (#4312) This reverts commit 007fc8239bd87026a308b8dfc0be12b5bc202294. --- core/language/en-GB/ControlPanel.multids | 1 - core/ui/Actions/new-image.tid | 2 +- core/ui/Actions/new-journal.tid | 2 +- core/ui/Actions/new-tiddler.tid | 2 +- core/ui/ControlPanel/Basics.tid | 5 ++--- core/ui/ViewToolbar/new-here.tid | 4 ++-- core/ui/ViewToolbar/new-journal-here.tid | 4 ++-- 7 files changed, 9 insertions(+), 11 deletions(-) diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids index 051b26296..3b086e851 100644 --- a/core/language/en-GB/ControlPanel.multids +++ b/core/language/en-GB/ControlPanel.multids @@ -14,7 +14,6 @@ Basics/Language/Prompt: Hello! Current language: Basics/NewJournal/Title/Prompt: Title of new journal tiddlers Basics/NewJournal/Text/Prompt: Text for new journal tiddlers Basics/NewJournal/Tags/Prompt: Tags for new journal tiddlers -Basics/NewTiddler/Tags/Prompt: Tags for new tiddlers Basics/NewTiddler/Title/Prompt: Title of new tiddlers Basics/OverriddenShadowTiddlers/Prompt: Number of overridden shadow tiddlers: Basics/ShadowTiddlers/Prompt: Number of shadow tiddlers: diff --git a/core/ui/Actions/new-image.tid b/core/ui/Actions/new-image.tid index 1e46ebcdb..372933e90 100644 --- a/core/ui/Actions/new-image.tid +++ b/core/ui/Actions/new-image.tid @@ -6,5 +6,5 @@ description: create a new image tiddler image/$(imageType)$ \end <$vars imageType={{$:/config/NewImageType}}> -<$action-sendmessage $message="tm-new-tiddler" type=<> tags={{$:/config/NewTiddler/Tags!!tags}}/> +<$action-sendmessage $message="tm-new-tiddler" type=<>/> diff --git a/core/ui/Actions/new-journal.tid b/core/ui/Actions/new-journal.tid index 5cb7eeade..4c5082f78 100644 --- a/core/ui/Actions/new-journal.tid +++ b/core/ui/Actions/new-journal.tid @@ -2,7 +2,7 @@ title: $:/core/ui/Actions/new-journal tags: $:/tags/Actions description: create a new journal tiddler -<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} journalTags={{{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}> +<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} journalTags={{$:/config/NewJournal/Tags}} journalText={{$:/config/NewJournal/Text}}> <$wikify name="journalTitle" text="""<$macrocall $name="now" format=<>/>"""> <$reveal type="nomatch" state=<> text=""> <$action-sendmessage $message="tm-new-tiddler" title=<> tags=<> text={{{ [get[]] }}}/> diff --git a/core/ui/Actions/new-tiddler.tid b/core/ui/Actions/new-tiddler.tid index e176f0ab3..272b61007 100644 --- a/core/ui/Actions/new-tiddler.tid +++ b/core/ui/Actions/new-tiddler.tid @@ -2,4 +2,4 @@ title: $:/core/ui/Actions/new-tiddler tags: $:/tags/Actions description: create a new empty tiddler -<$action-sendmessage $message="tm-new-tiddler" tags={{$:/config/NewTiddler/Tags!!tags}}/> +<$action-sendmessage $message="tm-new-tiddler"/> diff --git a/core/ui/ControlPanel/Basics.tid b/core/ui/ControlPanel/Basics.tid index 72a1ca9f3..4a4379e82 100644 --- a/core/ui/ControlPanel/Basics.tid +++ b/core/ui/ControlPanel/Basics.tid @@ -22,10 +22,9 @@ caption: {{$:/language/ControlPanel/Basics/Caption}} |<$link to="$:/DefaultTiddlers"><> |<>
    <$edit tag="textarea" tiddler="$:/DefaultTiddlers" class="tc-edit-texteditor"/>
    //<>// | |<$link to="$:/language/DefaultNewTiddlerTitle"><> |<$edit-text tiddler="$:/language/DefaultNewTiddlerTitle" default="" tag="input"/> | |<$link to="$:/config/NewJournal/Title"><> |<$edit-text tiddler="$:/config/NewJournal/Title" default="" tag="input"/> | -|<$link to="$:/config/NewTiddler/Tags"><> |{{$:/config/NewTiddler/Tags||$:/core/ui/EditTemplate/tags}} | |<$link to="$:/config/NewJournal/Text"><> |<$edit tiddler="$:/config/NewJournal/Text" tag="textarea" class="tc-edit-texteditor" default=""/> | -|<$link to="$:/config/NewJournal/Tags"><> |{{$:/config/NewJournal/Tags||$:/core/ui/EditTemplate/tags}} | -|<> |{{$:/snippets/minifocusswitcher}} | +|<$link to="$:/config/NewJournal/Tags"><> |<$edit-text tiddler="$:/config/NewJournal/Tags" default="" tag="input"/> | +|<> |{{$:/snippets/minifocusswitcher}} | |<> |{{$:/snippets/minilanguageswitcher}} | |<> |<> | |<> |<> | diff --git a/core/ui/ViewToolbar/new-here.tid b/core/ui/ViewToolbar/new-here.tid index 87f73e267..7b3f96c32 100644 --- a/core/ui/ViewToolbar/new-here.tid +++ b/core/ui/ViewToolbar/new-here.tid @@ -5,7 +5,7 @@ description: {{$:/language/Buttons/NewHere/Hint}} \whitespace trim \define newHereActions() -<$set name="tags" filter="[addsuffix[ ]addsuffix{$:/config/NewTiddler/Tags!!tags}]"> +<$set name="tags" filter="[]"> <$action-sendmessage $message="tm-new-tiddler" tags=<>/> \end @@ -21,4 +21,4 @@ description: {{$:/language/Buttons/NewHere/Hint}} \end -<> +<> \ No newline at end of file diff --git a/core/ui/ViewToolbar/new-journal-here.tid b/core/ui/ViewToolbar/new-journal-here.tid index b540185ca..e41fd4063 100644 --- a/core/ui/ViewToolbar/new-journal-here.tid +++ b/core/ui/ViewToolbar/new-journal-here.tid @@ -23,9 +23,9 @@ description: {{$:/language/Buttons/NewJournalHere/Hint}} \end <$set name="journalTitleTemplate" value={{$:/config/NewJournal/Title}}> -<$set name="journalTags" value={{$:/config/NewJournal/Tags!!tags}}> +<$set name="journalTags" value={{$:/config/NewJournal/Tags}}> <$set name="currentTiddlerTag" value=<>> <> - + \ No newline at end of file From 4cf96e7339b3b7d8e84a5b73d9871cdad50c5a84 Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Sun, 13 Oct 2019 11:19:44 +0200 Subject: [PATCH 32/53] Revert "Fix: make tag-picker "add-tag" button more consistent (#4199)" (#4311) This reverts commit 74172b35ceae84f254e20d6d7ec4dff2cca692b1. --- core/ui/EditTemplate/tags.tid | 10 +++++++++- core/wiki/macros/tag-picker.tid | 6 ++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/core/ui/EditTemplate/tags.tid b/core/ui/EditTemplate/tags.tid index 0bc581592..d368ce491 100644 --- a/core/ui/EditTemplate/tags.tid +++ b/core/ui/EditTemplate/tags.tid @@ -25,6 +25,14 @@ color:$(foregroundColor)$; <$macrocall $name="tag-body-inner" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} icon="""$icon$"""/> \end +\define tag-picker-actions() +<$action-listops + $tiddler=<> + $field="tags" + $subfilter="[] [all[current]tags[]]" +/> +\end +
    <$fieldmangler> <$list filter="[all[current]tags[]sort[title]]" storyview="pop"> @@ -32,6 +40,6 @@ color:$(foregroundColor)$; <$set name="tabIndex" value={{$:/config/EditTabIndex}}> -<$macrocall $name="tag-picker"/> +<$macrocall $name="tag-picker" actions=<>/>
    diff --git a/core/wiki/macros/tag-picker.tid b/core/wiki/macros/tag-picker.tid index 952aaf0c5..8d58748f2 100644 --- a/core/wiki/macros/tag-picker.tid +++ b/core/wiki/macros/tag-picker.tid @@ -14,7 +14,8 @@ $(actions)$ \end -\define tag-picker() +\define tag-picker(actions) +<$set name="actions" value="""$actions$""">
    <$keyboard key="ENTER" actions=<>> @@ -23,7 +24,7 @@ $(actions)$ <$button popup=<> class="tc-btn-invisible" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}} <$set name="tag" value={{$:/temp/NewTagName}}> <$button set="$:/temp/NewTagName" setTo="" class=""> -<> +$actions$ <$action-deletetiddler $tiddler="$:/temp/NewTagName"/> {{$:/language/EditTemplate/Tags/Add/Button}} @@ -45,4 +46,5 @@ $(actions)$
    + \end From 9395d7567179c436d0e8ac26fc976d717eae7f50 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sun, 13 Oct 2019 15:35:36 +0100 Subject: [PATCH 33/53] Fix sizes of SVG icons in documentation Fixes #4153 --- .../tw5.com/tiddlers/concepts/ColourPalettes.tid | 2 +- editions/tw5.com/tiddlers/concepts/InfoPanel.tid | 2 +- editions/tw5.com/tiddlers/concepts/Modules.tid | 2 +- editions/tw5.com/tiddlers/concepts/PermaLinks.tid | 4 ++-- editions/tw5.com/tiddlers/features/AutoSave.tid | 4 ++-- .../tiddlers/features/Importing Tiddlers.tid | 2 +- editions/tw5.com/tiddlers/features/SafeMode.tid | 2 +- .../tiddlers/features/Searching in TiddlyWiki.tid | 2 +- .../Adding_a_table_of_contents_to_the_sidebar.tid | 4 ++-- .../howtos/How to create keyboard shortcuts.tid | 2 +- .../tiddlers/howtos/How to export tiddlers.tid | 8 ++++---- ... put the last modification date in a banner.tid | 2 +- editions/tw5.com/tiddlers/howtos/Insert link.tid | 2 +- .../tw5.com/tiddlers/howtos/Insert picture.tid | 2 +- .../tw5.com/tiddlers/howtos/KeyboardShortcuts.tid | 2 +- editions/tw5.com/tiddlers/howtos/More actions.tid | 2 +- .../howtos/Setting a page background image.tid | 2 +- editions/tw5.com/tiddlers/howtos/Tagging.tid | 4 ++-- editions/tw5.com/tiddlers/howtos/Upgrading.tid | 2 +- editions/tw5.com/tiddlers/howtos/Using Excise.tid | 4 ++-- editions/tw5.com/tiddlers/howtos/Using Stamp.tid | 12 ++++++------ .../tw5.com/tiddlers/howtos/Using Stylesheets.tid | 2 +- .../tw5.com/tiddlers/mechanisms/AlertMechanism.tid | 2 +- .../nodejs/Installing TiddlyWiki on Node.js.tid | 2 +- ...Installing a plugin from the plugin library.tid | 8 ++++---- .../plugins/Manually installing a plugin.tid | 4 ++-- .../tiddlers/plugins/Uninstalling a plugin.tid | 6 +++--- .../tiddlers/saving/Emergency Tiddler Export.tid | 2 +- editions/tw5.com/tiddlers/saving/Encryption.tid | 6 +++--- .../tw5.com/tiddlers/saving/Saving on Android.tid | 4 ++-- .../tiddlers/saving/Saving on TiddlySpot.tid | 4 ++-- .../tiddlers/saving/Saving on a PHP Server.tid | 2 +- .../tiddlers/saving/Saving on iPad_iPhone.tid | 6 +++--- .../saving/Saving with TiddlyFox on Android.tid | 4 ++-- .../tiddlers/saving/Saving with TiddlyFox.tid | 4 ++-- .../tiddlers/saving/Saving with TiddlyIE.tid | 4 ++-- .../Saving with the HTML5 fallback saver.tid | 4 ++-- editions/tw5.com/tiddlers/system/doc-macros.tid | 2 ++ editions/tw5.com/tiddlers/system/doc-styles.tid | 6 ++++++ .../tiddlers/wikitext/Block Quotes in WikiText.tid | 2 +- .../tiddlers/wikitext/Code Blocks in WikiText.tid | 2 +- .../tiddlers/wikitext/Formatting in WikiText.tid | 14 +++++++------- .../tiddlers/wikitext/Images in WikiText.tid | 2 +- .../tiddlers/wikitext/Linking in WikiText.tid | 2 +- .../tiddlers/wikitext/Lists in WikiText.tid | 4 ++-- .../Creating and editing tiddlers.tid | 12 ++++++------ .../workingwithtw/Creating journal tiddlers.tid | 6 +++--- .../Navigating between open tiddlers.tid | 2 +- .../tw5.com/tiddlers/workingwithtw/Performance.tid | 2 +- .../Sharing your tiddlers with others.tid | 6 +++--- 50 files changed, 101 insertions(+), 93 deletions(-) diff --git a/editions/tw5.com/tiddlers/concepts/ColourPalettes.tid b/editions/tw5.com/tiddlers/concepts/ColourPalettes.tid index 75faa41e2..ad1ab780f 100644 --- a/editions/tw5.com/tiddlers/concepts/ColourPalettes.tid +++ b/editions/tw5.com/tiddlers/concepts/ColourPalettes.tid @@ -12,7 +12,7 @@ table-border: #ccc ... ``` -Several palettes form part of the core. The system tiddler [[$:/palette]] always contains the title of the currently selected palette tiddler. You can change a palette using the {{$:/core/images/palette}} ''palette'' button, found on the "Tools" tab in the sidebar. +Several palettes form part of the core. The system tiddler [[$:/palette]] always contains the title of the currently selected palette tiddler. You can change a palette using the <<.icon $:/core/images/palette>> ''palette'' button, found on the "Tools" tab in the sidebar. To retrieve the value of a named colour from the current palette, e.g. for use in a stylesheet tiddler, use the <<.mlink colour>> macro: diff --git a/editions/tw5.com/tiddlers/concepts/InfoPanel.tid b/editions/tw5.com/tiddlers/concepts/InfoPanel.tid index 21b21ae74..8c422a5c5 100644 --- a/editions/tw5.com/tiddlers/concepts/InfoPanel.tid +++ b/editions/tw5.com/tiddlers/concepts/InfoPanel.tid @@ -4,7 +4,7 @@ tags: Features title: InfoPanel type: text/vnd.tiddlywiki -Each tiddler has a panel of additional information. To reveal it, click the {{$:/core/images/down-arrow}} button in the tiddler's toolbar and then choose {{$:/core/images/info-button}} ''info'' from the dropdown list. +Each tiddler has a panel of additional information. To reveal it, click the <<.icon $:/core/images/down-arrow>> button in the tiddler's toolbar and then choose <<.icon $:/core/images/info-button>> ''info'' from the dropdown list. The info panel has the following tabs: diff --git a/editions/tw5.com/tiddlers/concepts/Modules.tid b/editions/tw5.com/tiddlers/concepts/Modules.tid index 30630b66f..189d2ae24 100644 --- a/editions/tw5.com/tiddlers/concepts/Modules.tid +++ b/editions/tw5.com/tiddlers/concepts/Modules.tid @@ -6,4 +6,4 @@ type: text/vnd.tiddlywiki A //module// in TiddlyWiki5 is a tiddler containing executable JavaScript, of the type `application/javascript` and with the field `module-type` set to the ModuleType of the module. -See [[control panel|$:/ControlPanel]] {{$:/core/images/options-button}} > ''Info'' > ''Advanced'' > ''Loaded Modules'' for a list of currently loaded modules. +See [[control panel|$:/ControlPanel]] <<.icon $:/core/images/options-button>> > ''Info'' > ''Advanced'' > ''Loaded Modules'' for a list of currently loaded modules. diff --git a/editions/tw5.com/tiddlers/concepts/PermaLinks.tid b/editions/tw5.com/tiddlers/concepts/PermaLinks.tid index 3aeca187e..5127228d6 100644 --- a/editions/tw5.com/tiddlers/concepts/PermaLinks.tid +++ b/editions/tw5.com/tiddlers/concepts/PermaLinks.tid @@ -8,7 +8,7 @@ Permalinks allow direct links to individual tiddlers within a TiddlyWiki. ! Simple Permalinks -The simplest form of permalink ({{$:/core/images/permalink-button}}) is a single target tiddler title appended to the base URL with `#`: +The simplest form of permalink (<<.icon $:/core/images/permalink-button>>) is a single target tiddler title appended to the base URL with `#`: https://tiddlywiki.com/#HelloThere @@ -42,7 +42,7 @@ Both the target tiddler title and the story filter should be URL encoded (but no ! Permalink Behaviour -Two important aspects of TiddlyWiki's behaviour with permalinks can be controlled via options in the [[control panel|$:/ControlPanel]] {{$:/core/images/options-button}} ''Settings'' tab: +Two important aspects of TiddlyWiki's behaviour with permalinks can be controlled via options in the [[control panel|$:/ControlPanel]] <<.icon $:/core/images/options-button>> ''Settings'' tab: * Whether to automatically update the address bar at each navigation, and if so whether to include the story sequence as well as the target tiddler * Whether the updates to the address bar should affect browser history. The default is ''no''; when switched to ''yes'' you can rewind navigation between tiddlers using the browser back and forward buttons diff --git a/editions/tw5.com/tiddlers/features/AutoSave.tid b/editions/tw5.com/tiddlers/features/AutoSave.tid index c8e766098..17a0ef59c 100644 --- a/editions/tw5.com/tiddlers/features/AutoSave.tid +++ b/editions/tw5.com/tiddlers/features/AutoSave.tid @@ -4,8 +4,8 @@ tags: Features title: AutoSave type: text/vnd.tiddlywiki -If there is a SaverModule available that supports it, TiddlyWiki will automatically trigger a save of the current document on clicking {{$:/core/images/done-button}} ''ok'' or {{$:/core/images/delete-button}} ''delete'' when editing a tiddler. +If there is a SaverModule available that supports it, TiddlyWiki will automatically trigger a save of the current document on clicking <<.icon $:/core/images/done-button>> ''ok'' or <<.icon $:/core/images/delete-button>> ''delete'' when editing a tiddler. You should see a yellow notification at the top right of the window to confirm that an automatic save has taken place. -Automatic saving can be enabled or disabled through the ''Settings'' tab of the [[control panel|$:/ControlPanel]] {{$:/core/images/options-button}}. Behind the scenes, it is controlled through the configuration tiddler [[$:/config/AutoSave]], which must have the value ''yes'' to enable automatic saving. +Automatic saving can be enabled or disabled through the ''Settings'' tab of the [[control panel|$:/ControlPanel]] <<.icon $:/core/images/options-button>>. Behind the scenes, it is controlled through the configuration tiddler [[$:/config/AutoSave]], which must have the value ''yes'' to enable automatic saving. diff --git a/editions/tw5.com/tiddlers/features/Importing Tiddlers.tid b/editions/tw5.com/tiddlers/features/Importing Tiddlers.tid index a03082a9f..2e03b4cd1 100644 --- a/editions/tw5.com/tiddlers/features/Importing Tiddlers.tid +++ b/editions/tw5.com/tiddlers/features/Importing Tiddlers.tid @@ -10,7 +10,7 @@ You can import tiddlers into a ~TiddlyWiki from external files or directly from There are several ways to import content from external files: -* Use the {{$:/core/images/import-button}} ''import'' button (under the ''Tools'' tab in the sidebar) to select a local file +* Use the <<.icon $:/core/images/import-button>> ''import'' button (under the ''Tools'' tab in the sidebar) to select a local file * Drag and drop files from Windows Explorer or OS X Finder etc. into the TiddlyWiki browser window * Paste content directly from the clipboard using the menu or keyboard shortcut (ctrl-V or cmd-V) ** Currently supported in Chrome, Firefox and Edge (but not Internet Explorer) diff --git a/editions/tw5.com/tiddlers/features/SafeMode.tid b/editions/tw5.com/tiddlers/features/SafeMode.tid index 03fa8f00d..66f55da11 100644 --- a/editions/tw5.com/tiddlers/features/SafeMode.tid +++ b/editions/tw5.com/tiddlers/features/SafeMode.tid @@ -18,7 +18,7 @@ https://tiddlywiki.com/#:safe Safe mode triggers two changes: -* All plugins are temporarily disabled. You can use the [[control panel|$:/ControlPanel]] {{$:/core/images/options-button}} to disable individual plugins +* All plugins are temporarily disabled. You can use the [[control panel|$:/ControlPanel]] <<.icon $:/core/images/options-button>> to disable individual plugins * Any tiddlers that override shadow tiddlers are renamed to give them the prefix `SAFE: `, thus restoring the underlying shadow tiddler * Certain configuration options are ignored, and the default settings used instead: ** WikiParserRuleConfiguration diff --git a/editions/tw5.com/tiddlers/features/Searching in TiddlyWiki.tid b/editions/tw5.com/tiddlers/features/Searching in TiddlyWiki.tid index 98cbf2eb1..2cd7a8bc6 100644 --- a/editions/tw5.com/tiddlers/features/Searching in TiddlyWiki.tid +++ b/editions/tw5.com/tiddlers/features/Searching in TiddlyWiki.tid @@ -14,7 +14,7 @@ Typing text into the search box in the sidebar will turn up a list of all the ti ! Advanced searching -Clicking on the magnifying glass icon {{$:/core/images/advanced-search-button}} to the right of the search box will open [[$:/AdvancedSearch]]. This tiddler contains four tabs: +Clicking on the magnifying glass icon <<.icon $:/core/images/advanced-search-button>> to the right of the search box will open [[$:/AdvancedSearch]]. This tiddler contains four tabs: * The ''standard'' tab contains another instance of the search box found in the sidebar * The ''system'' tab allows you to limit your search to system tiddlers diff --git a/editions/tw5.com/tiddlers/howtos/Adding_a_table_of_contents_to_the_sidebar.tid b/editions/tw5.com/tiddlers/howtos/Adding_a_table_of_contents_to_the_sidebar.tid index 5587a8854..4c43d22ce 100644 --- a/editions/tw5.com/tiddlers/howtos/Adding_a_table_of_contents_to_the_sidebar.tid +++ b/editions/tw5.com/tiddlers/howtos/Adding_a_table_of_contents_to_the_sidebar.tid @@ -19,7 +19,7 @@ A customisable [[table of contents|Table-of-Contents Macros]] can be added to th # Add a ''caption'' field with the text ''Contents'' # Add a ''list-after'' field with the text ''~$:/core/ui/SideBar/Open'' -Add entries to the table of contents by creating tiddlers tagged ''~TableOfContents''. An easy way is to choose {{$:/core/images/new-here-button}} ''new here'' from the tiddler toolbar of the ''~TableOfContents'' tiddler. -(if you don't see the "new here" button, click on the down arrow {{$:/core/images/down-arrow}} to see more menu options.) +Add entries to the table of contents by creating tiddlers tagged ''~TableOfContents''. An easy way is to choose <<.icon $:/core/images/new-here-button>> ''new here'' from the tiddler toolbar of the ''~TableOfContents'' tiddler. +(if you don't see the "new here" button, click on the down arrow <<.icon $:/core/images/down-arrow>> to see more menu options.) To create child tiddlers (tiddlers that come below other tiddlers), tag them with the name of the parent tiddler. diff --git a/editions/tw5.com/tiddlers/howtos/How to create keyboard shortcuts.tid b/editions/tw5.com/tiddlers/howtos/How to create keyboard shortcuts.tid index cbcbd3ba8..3b82a0a6a 100644 --- a/editions/tw5.com/tiddlers/howtos/How to create keyboard shortcuts.tid +++ b/editions/tw5.com/tiddlers/howtos/How to create keyboard shortcuts.tid @@ -14,7 +14,7 @@ A tiddler with the <<.def prefix>> `$:/config/ShortcutInfo/` and a ''unique suff In the [[Keyboard Shortcuts Tab|$:/core/ui/ControlPanel/KeyboardShortcuts]] the ''key combination'' that should trigger the shortcut can be configured: -> Look for the ''unique suffix'' defined for the new shortcut and click the <$button class="tc-btn-invisible">{{$:/core/images/edit-button}}<$action-sendmessage $message="tm-notify" $param="$:/core/images/edit-button"/> button to open a popup that detects ''key combinations'' and shows the detected combination in its input field +> Look for the ''unique suffix'' defined for the new shortcut and click the <$button class="tc-btn-invisible"><<.icon $:/core/images/edit-button>><$action-sendmessage $message="tm-notify" $param="$:/core/images/edit-button"/> button to open a popup that detects ''key combinations'' and shows the detected combination in its input field >The ''add shortcut'' assigns the key-combination to the shortcut diff --git a/editions/tw5.com/tiddlers/howtos/How to export tiddlers.tid b/editions/tw5.com/tiddlers/howtos/How to export tiddlers.tid index de66f05e9..c1c30b880 100644 --- a/editions/tw5.com/tiddlers/howtos/How to export tiddlers.tid +++ b/editions/tw5.com/tiddlers/howtos/How to export tiddlers.tid @@ -6,17 +6,17 @@ type: text/vnd.tiddlywiki ! Selecting All tiddlers for export -To export ''all'' tiddlers click on the "Tools" tab of the Sidebar. Find and click the {{$:/core/images/export-button}} ''export all'' button. A pop-up menu will offer you the chance to export tiddlers in multiple formats. +To export ''all'' tiddlers click on the "Tools" tab of the Sidebar. Find and click the <<.icon $:/core/images/export-button>> ''export all'' button. A pop-up menu will offer you the chance to export tiddlers in multiple formats. ! Exporting a tiddler -If you want to export a particular tiddler, first navigate to that tiddler. Then click on the {{$:/core/images/down-arrow}} ''more'' button that appears above the tiddler. From the list that appears select {{$:/core/images/export-button}} ''export tiddler''. A pop-up menu will offer you the chance to export the tiddler in multiple formats. +If you want to export a particular tiddler, first navigate to that tiddler. Then click on the <<.icon $:/core/images/down-arrow>> ''more'' button that appears above the tiddler. From the list that appears select <<.icon $:/core/images/export-button>> ''export tiddler''. A pop-up menu will offer you the chance to export the tiddler in multiple formats. ! Exporting tiddlers matching a criteria (filter) -To export a selection of tiddlers, click the little magnifying glass {{$:/core/images/advanced-search-button}} next to the search area on the sidebar. This will open the [[Advanced Search|$:/AdvancedSearch]] tiddler. Click on the "Filter" tab of the Advanced Search tiddler. Only the [[Filter|Filters]] tab will allow you to export a selection of tiddlers. [[Filters]] follow a particular syntax. Click on this [[Filters|Filters]] link to learn about how to make filters. +To export a selection of tiddlers, click the little magnifying glass <<.icon $:/core/images/advanced-search-button>> next to the search area on the sidebar. This will open the [[Advanced Search|$:/AdvancedSearch]] tiddler. Click on the "Filter" tab of the Advanced Search tiddler. Only the [[Filter|Filters]] tab will allow you to export a selection of tiddlers. [[Filters]] follow a particular syntax. Click on this [[Filters|Filters]] link to learn about how to make filters. -Once you have written a filter, a list of tiddlers matching the filter will appear. Now you can click on the {{$:/core/images/export-button}} ''export tiddler'' button to the right of the filter input field. A pop-up menu will offer you the chance to export tiddlers in multiple formats. +Once you have written a filter, a list of tiddlers matching the filter will appear. Now you can click on the <<.icon $:/core/images/export-button>> ''export tiddler'' button to the right of the filter input field. A pop-up menu will offer you the chance to export tiddlers in multiple formats. ! Export formats diff --git a/editions/tw5.com/tiddlers/howtos/How to put the last modification date in a banner.tid b/editions/tw5.com/tiddlers/howtos/How to put the last modification date in a banner.tid index ba1d780be..25a5a3128 100644 --- a/editions/tw5.com/tiddlers/howtos/How to put the last modification date in a banner.tid +++ b/editions/tw5.com/tiddlers/howtos/How to put the last modification date in a banner.tid @@ -7,7 +7,7 @@ type: text/vnd.tiddlywiki Here's how to display the last modification date of a wiki in a banner in the corner of the window: # [[Install the plugin|Installing a plugin from the plugin library]] <<.def "Corner ribbon">> in your ~TiddlyWiki -# Save ({{$:/core/images/save-button}}) and reload ({{$:/core/images/refresh-button}}) your wiki +# Save (<<.icon $:/core/images/save-button>>) and reload (<<.icon $:/core/images/refresh-button>>) your wiki # Create a new tiddler called [[$:/_MyRibbon]] tagged [[$:/tags/PageControls]] and containing:
    ``` diff --git a/editions/tw5.com/tiddlers/howtos/Insert link.tid b/editions/tw5.com/tiddlers/howtos/Insert link.tid index 91ef2dc17..d5e8ad5be 100644 --- a/editions/tw5.com/tiddlers/howtos/Insert link.tid +++ b/editions/tw5.com/tiddlers/howtos/Insert link.tid @@ -5,6 +5,6 @@ title: Insert link This will give you a dialog to search for and pick existing tiddlers in the wiki. When you pick a tiddler it will be inserted as a WikiText link where the cursor is in the text field. -Pressing {{$:/core/images/link}} will give you `[[Some link]]` +Pressing <<.icon $:/core/images/link>> will give you `[[Some link]]` It wil ''not'' insert: external web links or [[picture|Insert picture]] links. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/howtos/Insert picture.tid b/editions/tw5.com/tiddlers/howtos/Insert picture.tid index a9c07f56e..7a0b46e48 100644 --- a/editions/tw5.com/tiddlers/howtos/Insert picture.tid +++ b/editions/tw5.com/tiddlers/howtos/Insert picture.tid @@ -6,4 +6,4 @@ title: Insert picture This will give you a dialog to search for and pick existing image tiddlers in the wiki. When you pick a tiddler it will be inserted as a WikiText image link where the cursor is in the text field. -Pressing {{$:/core/images/picture}} will give you `[img[$:/favicon.ico]]` \ No newline at end of file +Pressing <<.icon $:/core/images/picture>> will give you `[img[$:/favicon.ico]]` \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/howtos/KeyboardShortcuts.tid b/editions/tw5.com/tiddlers/howtos/KeyboardShortcuts.tid index f8deba7f7..9ecece61d 100644 --- a/editions/tw5.com/tiddlers/howtos/KeyboardShortcuts.tid +++ b/editions/tw5.com/tiddlers/howtos/KeyboardShortcuts.tid @@ -24,7 +24,7 @@ Keyboard shortcuts are available for common editing operations within the Text E * Creating a new journal (defaults to alt-J ) * Creating a new image (defaults to alt-I ) -The current shortcuts can be inspected and customised in the "Keyboard Shortcuts" tab of the [[Control Panel|$:/ControlPanel]] {{$:/core/images/options-button}}. +The current shortcuts can be inspected and customised in the "Keyboard Shortcuts" tab of the [[Control Panel|$:/ControlPanel]] <<.icon $:/core/images/options-button>>. !! Special Keys diff --git a/editions/tw5.com/tiddlers/howtos/More actions.tid b/editions/tw5.com/tiddlers/howtos/More actions.tid index 102c87711..edb3fb7d1 100644 --- a/editions/tw5.com/tiddlers/howtos/More actions.tid +++ b/editions/tw5.com/tiddlers/howtos/More actions.tid @@ -3,4 +3,4 @@ modified: 20160817110101356 tags: [[Editor toolbar]] title: More actions -Pressing {{$:/core/images/down-arrow}} Gives you a dropdown menu with more editing options. \ No newline at end of file +Pressing <<.icon $:/core/images/down-arrow>> Gives you a dropdown menu with more editing options. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/howtos/Setting a page background image.tid b/editions/tw5.com/tiddlers/howtos/Setting a page background image.tid index 47c8c5b6e..d80e9acf4 100644 --- a/editions/tw5.com/tiddlers/howtos/Setting a page background image.tid +++ b/editions/tw5.com/tiddlers/howtos/Setting a page background image.tid @@ -6,7 +6,7 @@ type: text/vnd.tiddlywiki # Import your image as a tiddler (see [[Images in WikiText]]) #* You can also use an [[external image|ExternalImages]] -# Open the [[control panel|$:/ControlPanel]] {{$:/core/images/options-button}} and switch to the ''Appearance''/''Theme Tweaks'' tab +# Open the [[control panel|$:/ControlPanel]] <<.icon $:/core/images/options-button>> and switch to the ''Appearance''/''Theme Tweaks'' tab # Select your image from the dropdown labelled "Page background image" # Set "Page background image attachment" to "Fixed to window" to have the background stay stationary and the content to scroll over the top of it, or "Scroll with tiddlers" to have it move (note that the iPhone/iPad [[doesn't support the fixed setting|http://stackoverflow.com/a/20444219]] for performance reasons) # Set "Page background image size" as follows: diff --git a/editions/tw5.com/tiddlers/howtos/Tagging.tid b/editions/tw5.com/tiddlers/howtos/Tagging.tid index 46b42e3e8..a023c3222 100644 --- a/editions/tw5.com/tiddlers/howtos/Tagging.tid +++ b/editions/tw5.com/tiddlers/howtos/Tagging.tid @@ -26,10 +26,10 @@ There are two more things you can do with tags: ! Set a tag's colour and icon -You can use the {{$:/core/images/tag-button}} [[tag manager|$:/TagManager]], found on the ''Tags'' tab under ''More'' in the sidebar, to change the colour of a tag's pill or add an icon to the pill. +You can use the <<.icon $:/core/images/tag-button>> [[tag manager|$:/TagManager]], found on the ''Tags'' tab under ''More'' in the sidebar, to change the colour of a tag's pill or add an icon to the pill. * To change the colour, click the button in the ''Colour'' column to select from a colour picker. Alternatively, click the icon in the ''Info'' column, then type a [[CSS]] colour value in the ''Colour'' field -* To change the icon, click the {{$:/core/images/down-arrow}} button in the ''Icon'' column and choose from the list of available icons +* To change the icon, click the <<.icon $:/core/images/down-arrow>> button in the ''Icon'' column and choose from the list of available icons ! Change the order in which tags are listed diff --git a/editions/tw5.com/tiddlers/howtos/Upgrading.tid b/editions/tw5.com/tiddlers/howtos/Upgrading.tid index 45ba13fee..c872ea37e 100644 --- a/editions/tw5.com/tiddlers/howtos/Upgrading.tid +++ b/editions/tw5.com/tiddlers/howtos/Upgrading.tid @@ -27,7 +27,7 @@ This process will work on most desktop browsers. Note that none of your personal #* If the file is encrypted you will be prompted for the password # Review the list of tiddlers that will be upgraded # Click ''Upgrade'' -# Save changes to save the new version ({{$:/core/images/save-button}}) +# Save changes to save the new version (<<.icon $:/core/images/save-button>>) This will download a file called ''upgrade.html'' to your computer. This file is the upgrade of your old file. You may need to open the location where ''upgrade.html'' was downloaded, rename ''upgrade.html'' with the name of the old file you are upgrading, and replace the old file by moving the new file in its place. diff --git a/editions/tw5.com/tiddlers/howtos/Using Excise.tid b/editions/tw5.com/tiddlers/howtos/Using Excise.tid index f0c13125d..ef3be9a96 100644 --- a/editions/tw5.com/tiddlers/howtos/Using Excise.tid +++ b/editions/tw5.com/tiddlers/howtos/Using Excise.tid @@ -6,11 +6,11 @@ type: text/vnd.tiddlywiki ! Excise text -From the EditorToolbar you can export selected text to a new tiddler and insert a [[link|Linking in WikiText]] [[Transclusion]] or [[macro|Macros]] in its place. Click ''Excise text'' ({{$:/core/images/excise}}), input name of the new tiddler, and choose excise method. +From the EditorToolbar you can export selected text to a new tiddler and insert a [[link|Linking in WikiText]] [[Transclusion]] or [[macro|Macros]] in its place. Click ''Excise text'' (<<.icon $:/core/images/excise>>), input name of the new tiddler, and choose excise method. !! How to excise text # Highlight the relevant piece of text -#Click ''Excise text'' ({{$:/core/images/excise}}) +#Click ''Excise text'' (<<.icon $:/core/images/excise>>) # Give the new tiddler a title. # Chosse if the new tiddler will be tagged with the title of the current tiddler''*''. # Choose replacing method. [[link|Linking in WikiText]] [[Transclusion]] or [[macro|Macros]]. diff --git a/editions/tw5.com/tiddlers/howtos/Using Stamp.tid b/editions/tw5.com/tiddlers/howtos/Using Stamp.tid index 07de4d7a0..ce639e087 100644 --- a/editions/tw5.com/tiddlers/howtos/Using Stamp.tid +++ b/editions/tw5.com/tiddlers/howtos/Using Stamp.tid @@ -5,24 +5,24 @@ title: Using Stamp type: text/vnd.tiddlywiki ! Insert snippets -You can insert preconfigured snippets of text to use stamp from toolbar. Click ''stamp'' ({{$:/core/images/stamp}}) and just select a snippet. +You can insert preconfigured snippets of text to use stamp from toolbar. Click ''stamp'' (<<.icon $:/core/images/stamp>>) and just select a snippet. ! Create a snippet -# Click ''stamp'' ({{$:/core/images/stamp}}) +# Click ''stamp'' (<<.icon $:/core/images/stamp>>) # Create a snippet tiddler through the "//Add your own//" menu entry # Type some text as snippet for the tiddler, add a caption for the name as shown in the menu -# Click the {{$:/core/images/done-button}} ''ok'' button +# Click the <<.icon $:/core/images/done-button>> ''ok'' button -<<.tip """''Tip:'' You can also create a snippet tiddler using the ''new tiddler'' {{$:/core/images/new-button}} button in the sidebar, and add tag ''~$:/tags/TextEditor/Snippet''""">> +<<.tip """''Tip:'' You can also create a snippet tiddler using the ''new tiddler'' <<.icon $:/core/images/new-button>> button in the sidebar, and add tag ''~$:/tags/TextEditor/Snippet''""">> !!<<.from-version "5.1.20">> Adding a prefix and/or suffix to a selection -# Click ''stamp'' ({{$:/core/images/stamp}}) +# Click ''stamp'' (<<.icon $:/core/images/stamp>>) # Create a snippet tiddler through the "//Add your own//" menu entry # Add a caption for the name as shown in the menu # Create a tiddler with the same title but add the suffix `/prefix` # Insert the prefix in its text field # Create a tiddler with the same title but add the suffix `/suffix` # Insert the suffix in its text field -# Click the {{$:/core/images/done-button}} ''ok'' button +# Click the <<.icon $:/core/images/done-button>> ''ok'' button diff --git a/editions/tw5.com/tiddlers/howtos/Using Stylesheets.tid b/editions/tw5.com/tiddlers/howtos/Using Stylesheets.tid index d9cf73041..2a8429c2b 100644 --- a/editions/tw5.com/tiddlers/howtos/Using Stylesheets.tid +++ b/editions/tw5.com/tiddlers/howtos/Using Stylesheets.tid @@ -18,7 +18,7 @@ The first steps to changing the appearance of ~TiddlyWiki are to choose and appl * One of the available themes: {{$:/core/ui/Buttons/theme}} * Modify the colour palette: {{$:/core/ui/Buttons/palette}} -* Experiment with the <$button actions=<> >{{$:/core/images/options-button}} ControlPanel +* Experiment with the <$button actions=<> ><<.icon $:/core/images/options-button>> ControlPanel ! Work with Stylesheets diff --git a/editions/tw5.com/tiddlers/mechanisms/AlertMechanism.tid b/editions/tw5.com/tiddlers/mechanisms/AlertMechanism.tid index ff54d1d0d..a8c22dbbf 100644 --- a/editions/tw5.com/tiddlers/mechanisms/AlertMechanism.tid +++ b/editions/tw5.com/tiddlers/mechanisms/AlertMechanism.tid @@ -4,7 +4,7 @@ tags: Mechanisms Features title: AlertMechanism type: text/vnd.tiddlywiki -Alerts are displayed as yellow boxes overlaying the main TiddlyWiki window. Each one corresponds to a tiddler with the tag [[$:/tags/Alert]]. Clicking the {{$:/core/images/delete-button}} delete icon on an alert deletes the corresponding tiddler. +Alerts are displayed as yellow boxes overlaying the main TiddlyWiki window. Each one corresponds to a tiddler with the tag [[$:/tags/Alert]]. Clicking the <<.icon $:/core/images/delete-button>> delete icon on an alert deletes the corresponding tiddler. Here's a demo <$fieldmangler tiddler="SampleAlert"><$set name="currentTiddler" value="SampleAlert"><$button message="tm-add-tag" param="$:/tags/Alert">alert. diff --git a/editions/tw5.com/tiddlers/nodejs/Installing TiddlyWiki on Node.js.tid b/editions/tw5.com/tiddlers/nodejs/Installing TiddlyWiki on Node.js.tid index 47eb9c603..145725966 100644 --- a/editions/tw5.com/tiddlers/nodejs/Installing TiddlyWiki on Node.js.tid +++ b/editions/tw5.com/tiddlers/nodejs/Installing TiddlyWiki on Node.js.tid @@ -24,7 +24,7 @@ type: text/vnd.tiddlywiki ## Visit http://127.0.0.1:8080/ in your browser ## Try editing and creating tiddlers # Optionally, make an offline copy: -#* click the {{$:/core/images/save-button}} ''save changes'' button in the sidebar, ''OR'' +#* click the <<.icon $:/core/images/save-button>> ''save changes'' button in the sidebar, ''OR'' #* `tiddlywiki mynewwiki --build index` The `-g` flag causes TiddlyWiki to be installed globally. Without it, TiddlyWiki will only be available in the directory where you installed it. diff --git a/editions/tw5.com/tiddlers/plugins/Installing a plugin from the plugin library.tid b/editions/tw5.com/tiddlers/plugins/Installing a plugin from the plugin library.tid index d4e2fef3b..18fe09d76 100644 --- a/editions/tw5.com/tiddlers/plugins/Installing a plugin from the plugin library.tid +++ b/editions/tw5.com/tiddlers/plugins/Installing a plugin from the plugin library.tid @@ -10,14 +10,14 @@ Follow these instructions when using TiddlyWiki as a standalone HTML file: # Create a backup of your current TiddlyWiki HTML file ([[just in case|The First Rule of Using TiddlyWiki]]) # Open your TiddlyWiki in a browser -# Open the [[control panel|$:/ControlPanel]] {{$:/core/images/options-button}}, click on the ''Plugins'' tab and then the {{$:/core/images/download-button}} ''Get more plugins'' button -# Click {{$:/core/images/chevron-right}} ''open plugin library'' to open the official plugin library +# Open the [[control panel|$:/ControlPanel]] <<.icon $:/core/images/options-button>>, click on the ''Plugins'' tab and then the <<.icon $:/core/images/download-button>> ''Get more plugins'' button +# Click <<.icon $:/core/images/chevron-right>> ''open plugin library'' to open the official plugin library # When the library listing is loaded: ## Use the tab to select between ''plugins'', ''themes'' and ''languages'' ## Use the ''search'' box to search the plugin details # Click the ''install'' button to install a plugin -# Save your TiddlyWiki {{$:/core/images/save-button}} -# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completes installation of the plugin {{$:/core/images/refresh-button}} +# Save your TiddlyWiki <<.icon $:/core/images/save-button>> +# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completes installation of the plugin <<.icon $:/core/images/refresh-button>> #* <<.from-version "5.1.22">> It is no longer necessary to refresh TiddlyWiki when deleting plugins that support dynamic loading. See PluginMechanism for more details # The plugin should now be available for use diff --git a/editions/tw5.com/tiddlers/plugins/Manually installing a plugin.tid b/editions/tw5.com/tiddlers/plugins/Manually installing a plugin.tid index 426615b3c..5d58cad3a 100644 --- a/editions/tw5.com/tiddlers/plugins/Manually installing a plugin.tid +++ b/editions/tw5.com/tiddlers/plugins/Manually installing a plugin.tid @@ -8,7 +8,7 @@ type: text/vnd.tiddlywiki # Open your TiddlyWiki in a browser # In another browser window, find a link to the plugin, e.g. [[$:/plugins/tiddlywiki/example]]. You will typically find these links on the home page of the plugin (for example, https://tiddlywiki.com/plugins/tiddlywiki/katex/) # Drag the link [[$:/plugins/tiddlywiki/example]] to the browser window containing your TiddlyWiki -# Save your TiddlyWiki ({{$:/core/images/save-button}}) -# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completes installation of the plugin {{$:/core/images/refresh-button}} +# Save your TiddlyWiki (<<.icon $:/core/images/save-button>>) +# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completes installation of the plugin <<.icon $:/core/images/refresh-button>> #* <<.from-version "5.1.22">> It is no longer necessary to refresh TiddlyWiki when deleting plugins that support dynamic loading. See PluginMechanism for more details # The plugin should now be available for use \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/plugins/Uninstalling a plugin.tid b/editions/tw5.com/tiddlers/plugins/Uninstalling a plugin.tid index 096183bfb..81bf95739 100644 --- a/editions/tw5.com/tiddlers/plugins/Uninstalling a plugin.tid +++ b/editions/tw5.com/tiddlers/plugins/Uninstalling a plugin.tid @@ -11,9 +11,9 @@ Follow these instructions when using TiddlyWiki as a standalone HTML file: # Create a backup of your current TiddlyWiki HTML file ([[just in case|The First Rule of Using TiddlyWiki]]) # Open the [[control panel|$:/ControlPanel]] and go to the ''Plugins'' tab # Click on the plugin you want to delete to open it as a standalone tiddler -# Click the {{$:/core/images/down-arrow}} ''more'' button and {{$:/core/images/delete-button}} ''delete'' the tiddler -# Save your TiddlyWiki {{$:/core/images/save-button}} -# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completely removes the plugin {{$:/core/images/refresh-button}} +# Click the <<.icon $:/core/images/down-arrow>> ''more'' button and <<.icon $:/core/images/delete-button>> ''delete'' the tiddler +# Save your TiddlyWiki <<.icon $:/core/images/save-button>> +# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completely removes the plugin <<.icon $:/core/images/refresh-button>> #* <<.from-version "5.1.22">> It is no longer necessary to refresh TiddlyWiki when deleting plugins that support dynamic loading. See PluginMechanism for more details # The plugin should no longer be active or available diff --git a/editions/tw5.com/tiddlers/saving/Emergency Tiddler Export.tid b/editions/tw5.com/tiddlers/saving/Emergency Tiddler Export.tid index 060fa14c9..15d5478b6 100644 --- a/editions/tw5.com/tiddlers/saving/Emergency Tiddler Export.tid +++ b/editions/tw5.com/tiddlers/saving/Emergency Tiddler Export.tid @@ -21,7 +21,7 @@ This method is useful if, for any reason, you should find your current TiddlyWik ``` * Check the list of tiddlers. * Adjust the number "25" in the filter to make sure you found all your recently modified tiddlers -* Press the bucket with the up arrow [] which appears on the right +* Press the bucket with the up arrow [] which appears on the right * A dialogue window will ask for a location to download a file called tiddler.json on your local drive, or depending on browser configuration, just alert you that such a file will be downloaded. Press save. * The `tiddlers.json` file can be imported (tools in sidebar) or drag and drop the file on the top line of the story river of another TW . ** You can (de)select specific tiddlers. diff --git a/editions/tw5.com/tiddlers/saving/Encryption.tid b/editions/tw5.com/tiddlers/saving/Encryption.tid index 65c9abcfc..9b9ba4ee6 100644 --- a/editions/tw5.com/tiddlers/saving/Encryption.tid +++ b/editions/tw5.com/tiddlers/saving/Encryption.tid @@ -7,12 +7,12 @@ type: text/vnd.tiddlywiki When used as a single HTML file, TiddlyWiki5 allows content to be encrypted using the [[Stanford JavaScript Crypto Library]]. # Switch to the ''Tools'' tab in the sidebar and look for the button with a padlock icon -# If the button is labelled {{$:/core/images/unlocked-padlock}} ''set password'' then the current wiki is not encrypted. Clicking the button will prompt for a password that will be used to encrypt subsequent saves -# If the button is labelled {{$:/core/images/locked-padlock}} ''clear password'' then the current wiki is already encrypted. Clicking the button will remove the password so that subsequent saves will be unencrypted +# If the button is labelled <<.icon $:/core/images/unlocked-padlock>> ''set password'' then the current wiki is not encrypted. Clicking the button will prompt for a password that will be used to encrypt subsequent saves +# If the button is labelled <<.icon $:/core/images/locked-padlock>> ''clear password'' then the current wiki is already encrypted. Clicking the button will remove the password so that subsequent saves will be unencrypted # Optionally, open the saved file in a text editor and verify that your data is encrypted # Open the file in your browser. You will be prompted for a password before the content is displayed Note that TiddlyWiki has two other unrelated features concerned with passwords/encryption: -* The ability to set a password when saving to TiddlySpot. This is done in the "Saving" tab of ''control panel'' {{$:/core/images/options-button}}. +* The ability to set a password when saving to TiddlySpot. This is done in the "Saving" tab of ''control panel'' <<.icon $:/core/images/options-button>>. * The ability to use standard HTTP basic authentication with the [[Node.js|TiddlyWiki on Node.js]] server configuration. This is done on the command line with the ServerCommand. Combined with SSL, this gives the same level of transit encryption as you'd get with online services like Google or Dropbox, but there is no encryption of data on disk diff --git a/editions/tw5.com/tiddlers/saving/Saving on Android.tid b/editions/tw5.com/tiddlers/saving/Saving on Android.tid index 6be8d5508..8c6be8ba4 100644 --- a/editions/tw5.com/tiddlers/saving/Saving on Android.tid +++ b/editions/tw5.com/tiddlers/saving/Saving on Android.tid @@ -18,9 +18,9 @@ Instructions for use: # Open AndTidWiki #* Don't use ''Menu''/''new ~TiddlyWiki'' menu option (it only supports the older TiddlyWikiClassic) # Open the file by touching its filename -# Try creating a new tiddler using the ''new tiddler'' {{$:/core/images/new-button}} button in the sidebar. Type some content for the tiddler, and click the {{$:/core/images/done-button}} ''ok'' button +# Try creating a new tiddler using the ''new tiddler'' <<.icon $:/core/images/new-button>> button in the sidebar. Type some content for the tiddler, and click the <<.icon $:/core/images/done-button>> ''ok'' button #* The wiki will be saved, and a confirmation message should appear at the top right of the window -''Note:'' You can save your changes by clicking the {{$:/core/images/save-button}} ''save changes'' button in the sidebar even if you have not clicked the {{$:/core/images/done-button}} ''ok'' button to complete editing a tiddler +''Note:'' You can save your changes by clicking the <<.icon $:/core/images/save-button>> ''save changes'' button in the sidebar even if you have not clicked the <<.icon $:/core/images/done-button>> ''ok'' button to complete editing a tiddler //Note that AndTidWiki is published independently of TiddlyWiki// \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/saving/Saving on TiddlySpot.tid b/editions/tw5.com/tiddlers/saving/Saving on TiddlySpot.tid index af1ce8957..9b4b47813 100644 --- a/editions/tw5.com/tiddlers/saving/Saving on TiddlySpot.tid +++ b/editions/tw5.com/tiddlers/saving/Saving on TiddlySpot.tid @@ -22,8 +22,8 @@ Alternatively, you can upload an existing ~TiddlyWiki5 document from your local # Sign up for a new wiki at http://tiddlyspot.com/, and remember the wiki name and password # Open your locally stored TiddlyWiki document in your browser -# Fill in the TiddlySpot wikiname and password in ''Saving'' tab of the ''control panel'' {{$:/core/images/options-button}} -# Click the {{$:/core/images/save-button}} ''save changes'' button. You should get a confirmation notification at the top right saying ''Saved wiki''. Saving can take several seconds if you're on a slow connection or working with a large wiki. +# Fill in the TiddlySpot wikiname and password in ''Saving'' tab of the ''control panel'' <<.icon $:/core/images/options-button>> +# Click the <<.icon $:/core/images/save-button>> ''save changes'' button. You should get a confirmation notification at the top right saying ''Saved wiki''. Saving can take several seconds if you're on a slow connection or working with a large wiki. # Navigate to your TiddlySpot URL at http://{wikiname}.tiddlyspot.com/ Note that your password is sent unencrypted when using TiddlySpot. From http://faq.tiddlyspot.com/: diff --git a/editions/tw5.com/tiddlers/saving/Saving on a PHP Server.tid b/editions/tw5.com/tiddlers/saving/Saving on a PHP Server.tid index e6e78fbfb..7f0cec25d 100644 --- a/editions/tw5.com/tiddlers/saving/Saving on a PHP Server.tid +++ b/editions/tw5.com/tiddlers/saving/Saving on a PHP Server.tid @@ -20,7 +20,7 @@ The built-in `TiddlySpot `saver can also be used to save changes to a simple PHP # Save the file # Using FTP or your web interface, upload ''store.php'' to your server. Make sure that the filename is correct #* If you've uploaded the file correctly you should be able to view it in your browser (eg, http://example.com/store.php) -# In TiddlyWiki, go to the ''Saving'' tab of the ''control panel'' {{$:/core/images/options-button}} and enter the following information: +# In TiddlyWiki, go to the ''Saving'' tab of the ''control panel'' <<.icon $:/core/images/options-button>> and enter the following information: #* Your username as the wiki name #* Your password #* The URL of the ''store.php'' file (//''not'' the URL of the wiki, this must the full URL to the ''store.php'' file//) diff --git a/editions/tw5.com/tiddlers/saving/Saving on iPad_iPhone.tid b/editions/tw5.com/tiddlers/saving/Saving on iPad_iPhone.tid index 194e28eea..b04e81929 100644 --- a/editions/tw5.com/tiddlers/saving/Saving on iPad_iPhone.tid +++ b/editions/tw5.com/tiddlers/saving/Saving on iPad_iPhone.tid @@ -21,9 +21,9 @@ Instructions for use: # Swipe any file item from the right to see a list of additional "actions" possible for that file # Touch any listed file item or folder to open it - wikis will open in Quine's custom browser # When you have an open TiddlyWiki5: -# Try creating a new tiddler using the ''new tiddler'' {{$:/core/images/new-button}} button in the sidebar -# Type some content for the tiddler, and click the {{$:/core/images/done-button}} ''ok'' button -# Save your changes by clicking the {{$:/core/images/save-button}} ''save changes'' button in the sidebar +# Try creating a new tiddler using the ''new tiddler'' <<.icon $:/core/images/new-button>> button in the sidebar +# Type some content for the tiddler, and click the <<.icon $:/core/images/done-button>> ''ok'' button +# Save your changes by clicking the <<.icon $:/core/images/save-button>> ''save changes'' button in the sidebar #* A confirmation message should appear at the top right of the window # Touch "Done" when done editing a wiki diff --git a/editions/tw5.com/tiddlers/saving/Saving with TiddlyFox on Android.tid b/editions/tw5.com/tiddlers/saving/Saving with TiddlyFox on Android.tid index 6b2d3d384..1780fd2bb 100644 --- a/editions/tw5.com/tiddlers/saving/Saving with TiddlyFox on Android.tid +++ b/editions/tw5.com/tiddlers/saving/Saving with TiddlyFox on Android.tid @@ -18,7 +18,7 @@ type: text/vnd.tiddlywiki # When the file has downloaded, click on it within the notification tray or the download manager application # Choose to open the file in Firefox (rather than the default Android viewer) # Click ''OK'' in response to the prompt from TiddlyFox that asks whether to enable saving for this file -# Try creating a new tiddler using the ''new tiddler'' {{$:/core/images/new-button}} button in the sidebar. Type some content for the tiddler, and click the {{$:/core/images/done-button}} ''ok'' button -# Save your changes by clicking the {{$:/core/images/save-button}} ''save changes'' button in the sidebar +# Try creating a new tiddler using the ''new tiddler'' <<.icon $:/core/images/new-button>> button in the sidebar. Type some content for the tiddler, and click the <<.icon $:/core/images/done-button>> ''ok'' button +# Save your changes by clicking the <<.icon $:/core/images/save-button>> ''save changes'' button in the sidebar #* Look for the yellow notification ''Saved wiki'' at the top right of the window # Refresh the browser window to verify that your changes have been saved correctly diff --git a/editions/tw5.com/tiddlers/saving/Saving with TiddlyFox.tid b/editions/tw5.com/tiddlers/saving/Saving with TiddlyFox.tid index 90a627c31..092eb29fd 100644 --- a/editions/tw5.com/tiddlers/saving/Saving with TiddlyFox.tid +++ b/editions/tw5.com/tiddlers/saving/Saving with TiddlyFox.tid @@ -22,7 +22,7 @@ If you're using [[Firefox for Android]], see the instructions for [[Saving with #* If you are using TiddlyFox v1.x.x, you will need to click ''OK'' in response to the prompt from TiddlyFox that asks whether to enable saving for this file #* If you are using TiddlyFox v2.x.x you will need to click on the icon of a kitten standing on a blue globe to activate saving. There is no prompt in v2.0.1. #** For TiddlyFox v2.0.1, you can not be using Private Browsing mode nor can you be using "Never Remember History". -# Try creating a new tiddler using the ''new tiddler'' {{$:/core/images/new-button}} button in the sidebar. Type some content for the tiddler, and click the {{$:/core/images/done-button}} ''ok'' button -# Save your changes by clicking the {{$:/core/images/save-button}} ''save changes'' button in the sidebar +# Try creating a new tiddler using the ''new tiddler'' <<.icon $:/core/images/new-button>> button in the sidebar. Type some content for the tiddler, and click the <<.icon $:/core/images/done-button>> ''ok'' button +# Save your changes by clicking the <<.icon $:/core/images/save-button>> ''save changes'' button in the sidebar #* Look for the yellow notification ''Saved wiki'' at the top right of the window # Refresh the browser window to verify that your changes have been saved correctly diff --git a/editions/tw5.com/tiddlers/saving/Saving with TiddlyIE.tid b/editions/tw5.com/tiddlers/saving/Saving with TiddlyIE.tid index 3106e6daf..d4e821128 100644 --- a/editions/tw5.com/tiddlers/saving/Saving with TiddlyIE.tid +++ b/editions/tw5.com/tiddlers/saving/Saving with TiddlyIE.tid @@ -17,6 +17,6 @@ type: text/vnd.tiddlywiki # Locate the file you just downloaded #* You may rename it, but be sure to keep the `.html` or `.htm` extension # Open the file in Internet Explorer -# Try creating a new tiddler using the ''new tiddler'' {{$:/core/images/new-button}} button in the sidebar. Type some content for the tiddler, and click the {{$:/core/images/done-button}} ''ok'' button -# Save your changes by clicking the {{$:/core/images/save-button}} ''save changes'' button in the sidebar. Internet Explorer will ask for your consent to save the file locally by presenting a file ''Save As'' dialog. +# Try creating a new tiddler using the ''new tiddler'' <<.icon $:/core/images/new-button>> button in the sidebar. Type some content for the tiddler, and click the <<.icon $:/core/images/done-button>> ''ok'' button +# Save your changes by clicking the <<.icon $:/core/images/save-button>> ''save changes'' button in the sidebar. Internet Explorer will ask for your consent to save the file locally by presenting a file ''Save As'' dialog. # Refresh the browser window to verify that your changes have been saved correctly diff --git a/editions/tw5.com/tiddlers/saving/Saving with the HTML5 fallback saver.tid b/editions/tw5.com/tiddlers/saving/Saving with the HTML5 fallback saver.tid index dae52cdf1..92774cd68 100644 --- a/editions/tw5.com/tiddlers/saving/Saving with the HTML5 fallback saver.tid +++ b/editions/tw5.com/tiddlers/saving/Saving with the HTML5 fallback saver.tid @@ -17,8 +17,8 @@ This method of saving changes is clunky because it requires manual intervention # Locate the file you just downloaded #* You may rename it, but be sure to keep the `.html` or `.htm` extension # Open the file in your browser -# Try creating a new tiddler using the ''new tiddler'' {{$:/core/images/new-button}} button in the sidebar. Type some content for the tiddler, and click the {{$:/core/images/done-button}} ''ok'' button -# Save your changes by clicking the {{$:/core/images/save-button}} ''save changes'' button in the sidebar +# Try creating a new tiddler using the ''new tiddler'' <<.icon $:/core/images/new-button>> button in the sidebar. Type some content for the tiddler, and click the <<.icon $:/core/images/done-button>> ''ok'' button +# Save your changes by clicking the <<.icon $:/core/images/save-button>> ''save changes'' button in the sidebar # Your browser will download a new copy of the wiki incorporating your changes # Locate the newly downloaded file and open it in your browser # Verify that your changes have been saved correctly diff --git a/editions/tw5.com/tiddlers/system/doc-macros.tid b/editions/tw5.com/tiddlers/system/doc-macros.tid index f1c846775..26262d8f9 100644 --- a/editions/tw5.com/tiddlers/system/doc-macros.tid +++ b/editions/tw5.com/tiddlers/system/doc-macros.tid @@ -63,6 +63,8 @@ type: text/vnd.tiddlywiki \define .button(_) {{$:/core/ui/Buttons/$_$!!caption}} +\define .icon(_) {{$_$}} + \define .tip(_)
    {{$:/core/images/tip}}
    $_$
    \define .warning(_)
    {{$:/core/images/warning}}
    $_$
    diff --git a/editions/tw5.com/tiddlers/system/doc-styles.tid b/editions/tw5.com/tiddlers/system/doc-styles.tid index 101fbe2f6..94e89d5f7 100644 --- a/editions/tw5.com/tiddlers/system/doc-styles.tid +++ b/editions/tw5.com/tiddlers/system/doc-styles.tid @@ -145,6 +145,12 @@ tr.doc-table-subheading { margin-top: 2em; } +.doc-icon svg { + width: 1em; + height: 1em; + vertical-align: middle; +} + .doc-icon-block { border-left: 2px solid <>; margin-left: 3em; diff --git a/editions/tw5.com/tiddlers/wikitext/Block Quotes in WikiText.tid b/editions/tw5.com/tiddlers/wikitext/Block Quotes in WikiText.tid index bdc60b0ed..181779fe9 100644 --- a/editions/tw5.com/tiddlers/wikitext/Block Quotes in WikiText.tid +++ b/editions/tw5.com/tiddlers/wikitext/Block Quotes in WikiText.tid @@ -9,7 +9,7 @@ There are two ways to produce HTML block quotes in TiddlyWiki5, one for content ! Multi-line Block Quotes -The syntax for multi-line block quotes ({{$:/core/images/quote}}) is: +The syntax for multi-line block quotes (<<.icon $:/core/images/quote>>) is: <``` to mark code blocks ({{$:/core/images/mono-block}}): +You can use triple backticks ``` to mark code blocks (<<.icon $:/core/images/mono-block>>):
     ```
    diff --git a/editions/tw5.com/tiddlers/wikitext/Formatting in WikiText.tid b/editions/tw5.com/tiddlers/wikitext/Formatting in WikiText.tid
    index b0b500dc6..293e55e95 100644
    --- a/editions/tw5.com/tiddlers/wikitext/Formatting in WikiText.tid	
    +++ b/editions/tw5.com/tiddlers/wikitext/Formatting in WikiText.tid	
    @@ -7,13 +7,13 @@ type: text/vnd.tiddlywiki
     
     Available character formatting includes:
     
    -* `backticks` for `code` ({{$:/core/images/mono-line}})
    +* `backticks` for `code` (<<.icon $:/core/images/mono-line>>)
     ** Alternatively, ``double backticks allows `embedded` backticks``
    -* `''bold''` for ''bold text'' ({{$:/core/images/bold}})
    -* `//italic//` for //italic text// ({{$:/core/images/italic}})
    -* `__underscore__` for __underscored text__ ({{$:/core/images/underline}})
    -* `^^superscript^^` for ^^superscripted^^ text ({{$:/core/images/superscript}})
    -* `,,subscript,,` for ,,subscripted,, text ({{$:/core/images/subscript}})
    -* `~~strikethrough~~` for ~~strikethrough~~ text ({{$:/core/images/strikethrough}})
    +* `''bold''` for ''bold text'' (<<.icon $:/core/images/bold>>)
    +* `//italic//` for //italic text// (<<.icon $:/core/images/italic>>)
    +* `__underscore__` for __underscored text__ (<<.icon $:/core/images/underline>>)
    +* `^^superscript^^` for ^^superscripted^^ text (<<.icon $:/core/images/superscript>>)
    +* `,,subscript,,` for ,,subscripted,, text (<<.icon $:/core/images/subscript>>)
    +* `~~strikethrough~~` for ~~strikethrough~~ text (<<.icon $:/core/images/strikethrough>>)
     
     See also: [[Code Blocks in WikiText]]
    diff --git a/editions/tw5.com/tiddlers/wikitext/Images in WikiText.tid b/editions/tw5.com/tiddlers/wikitext/Images in WikiText.tid
    index 1bb31e7ad..3e6272d93 100644
    --- a/editions/tw5.com/tiddlers/wikitext/Images in WikiText.tid	
    +++ b/editions/tw5.com/tiddlers/wikitext/Images in WikiText.tid	
    @@ -14,7 +14,7 @@ Images can be included in WikiText with the following syntax:
     [img[https://tiddlywiki.com/favicon.ico]]
     ```
     
    -You can also insert images from the editor toolbar. Click ''picture'' ({{$:/core/images/picture}}) and select a picture file.
    +You can also insert images from the editor toolbar. Click ''picture'' (<<.icon $:/core/images/picture>>) and select a picture file.
     
     If the image source is the title of an image tiddler then that tiddler is directly displayed. Otherwise it is interpreted as a URL and an HTML `` tag is generated with the `src` attribute containing the URL.
     
    diff --git a/editions/tw5.com/tiddlers/wikitext/Linking in WikiText.tid b/editions/tw5.com/tiddlers/wikitext/Linking in WikiText.tid
    index 88ae367a5..037daa821 100644
    --- a/editions/tw5.com/tiddlers/wikitext/Linking in WikiText.tid	
    +++ b/editions/tw5.com/tiddlers/wikitext/Linking in WikiText.tid	
    @@ -21,7 +21,7 @@ To link to a tiddler and specify the text of the link:
     [[Displayed Link Title|Tiddler Title]]
     ```
     
    -You can also create a link from the editor toolbar. Click ''link'' ({{$:/core/images/link}}), and search and select a tiddler.
    +You can also create a link from the editor toolbar. Click ''link'' (<<.icon $:/core/images/link>>), and search and select a tiddler.
     
     ! ~CamelCase Links
     
    diff --git a/editions/tw5.com/tiddlers/wikitext/Lists in WikiText.tid b/editions/tw5.com/tiddlers/wikitext/Lists in WikiText.tid
    index 2cb46c5d5..feca125ee 100644
    --- a/editions/tw5.com/tiddlers/wikitext/Lists in WikiText.tid	
    +++ b/editions/tw5.com/tiddlers/wikitext/Lists in WikiText.tid	
    @@ -7,7 +7,7 @@ type: text/vnd.tiddlywiki
     
     ! Bulleted Lists
     
    -You can create bulleted (unordered) lists with `*` characters ({{$:/core/images/list-bullet}}):
    +You can create bulleted (unordered) lists with `*` characters (<<.icon $:/core/images/list-bullet>>):
     
     <>):
     
     # First item
     # Second item
    diff --git a/editions/tw5.com/tiddlers/workingwithtw/Creating and editing tiddlers.tid b/editions/tw5.com/tiddlers/workingwithtw/Creating and editing tiddlers.tid
    index 9f2d54715..2850030c0 100644
    --- a/editions/tw5.com/tiddlers/workingwithtw/Creating and editing tiddlers.tid	
    +++ b/editions/tw5.com/tiddlers/workingwithtw/Creating and editing tiddlers.tid	
    @@ -6,7 +6,7 @@ type: text/vnd.tiddlywiki
     
     ! Creating tiddlers
     
    -You create a tiddler either by clicking the {{$:/core/images/new-button}} button in the sidebar, or by clicking on a link to a missing tiddler. Links to missing tiddlers are shown in [[blue italics]].
    +You create a tiddler either by clicking the <<.icon $:/core/images/new-button>> button in the sidebar, or by clicking on a link to a missing tiddler. Links to missing tiddlers are shown in [[blue italics]].
     
     See also:
     
    @@ -14,7 +14,7 @@ See also:
     
     ! Editing tiddlers
     
    -To edit an existing tiddler, click the {{$:/core/images/edit-button}} button at the top right of the tiddler.
    +To edit an existing tiddler, click the <<.icon $:/core/images/edit-button>> button at the top right of the tiddler.
     
     !! Draft mode
     
    @@ -22,7 +22,7 @@ When you create a new tiddler or edit an existing one, the tiddler will go into
     
     *''The title field'' - Use this to change the title of the tiddler
     *''The tag selector'' - Use this to add or remove tags. As you type a tag name in the box, a dropdown list will show you any existing tags that match. You can pick from this list or create a completely new tag. Then click the ''add'' button or hit the Enter key to add the tag to the tiddler. Each tag is shown as a coloured pill. Click the "×" on a pill to remove that tag
    -*''The text area'' - Use this to edit the main content of the tiddler. Click the ''preview'' button ({{$:/core/images/preview-closed}} / {{$:/core/images/preview-open}}) to see what your changes will look like
    +*''The text area'' - Use this to edit the main content of the tiddler. Click the ''preview'' button (<<.icon $:/core/images/preview-closed>> / <<.icon $:/core/images/preview-open>>) to see what your changes will look like
     *''The type selector'' - Use this when a tiddler needs to be displayed in a special way, such as an image. See ContentType for a list of the options. The default is `text/vnd.tiddlywiki`, which means the tiddler contains WikiText
     *''The field selector'' - Use this to add or remove fields on the tiddler. For example, if you are editing a tiddler that's being used to tag other tiddlers, you can add a [[''list'' field|ListField]] to change the order in which those tiddlers will be listed
     
    @@ -30,6 +30,6 @@ When you create a new tiddler or edit an existing one, the tiddler will go into
     
     When you have finished editing, click a button at the top right of the tiddler:
     
    -*The ''ok'' button ({{$:/core/images/done-button}}) stores your changes to this one tiddler and leaves draft mode. If your wiki is configured to [[AutoSave]], your changes will be permanently saved. Otherwise they will only be stored temporarily in your web browser, and you will lose them if you close your ~TiddlyWiki page without first clicking the master ''save changes'' button ({{$:/core/images/save-button}}) in the sidebar.
    -*The ''cancel'' button ({{$:/core/images/cancel-button}}) discards your changes (after asking you to confirm) and leaves draft mode.
    -*The ''delete'' button ({{$:/core/images/delete-button}}) deletes the entire tiddler (after asking you to confirm).
    +*The ''ok'' button (<<.icon $:/core/images/done-button>>) stores your changes to this one tiddler and leaves draft mode. If your wiki is configured to [[AutoSave]], your changes will be permanently saved. Otherwise they will only be stored temporarily in your web browser, and you will lose them if you close your ~TiddlyWiki page without first clicking the master ''save changes'' button (<<.icon $:/core/images/save-button>>) in the sidebar.
    +*The ''cancel'' button (<<.icon $:/core/images/cancel-button>>) discards your changes (after asking you to confirm) and leaves draft mode.
    +*The ''delete'' button (<<.icon $:/core/images/delete-button>>) deletes the entire tiddler (after asking you to confirm).
    diff --git a/editions/tw5.com/tiddlers/workingwithtw/Creating journal tiddlers.tid b/editions/tw5.com/tiddlers/workingwithtw/Creating journal tiddlers.tid
    index 44860f418..eb41edd52 100644
    --- a/editions/tw5.com/tiddlers/workingwithtw/Creating journal tiddlers.tid	
    +++ b/editions/tw5.com/tiddlers/workingwithtw/Creating journal tiddlers.tid	
    @@ -14,19 +14,19 @@ For example, you might use a journal tiddler called ''10th October 2014'' to rec
     
     ! Creating a journal tiddler
     
    -The easiest way to create a journal tiddler is to use the ''new journal'' button {{$:/core/images/new-journal-button}} in the ''Tools'' tab of the sidebar. If you find yourself often using the button, click the checkbox next to it to make the button available just above the search box.
    +The easiest way to create a journal tiddler is to use the ''new journal'' button <<.icon $:/core/images/new-journal-button>> in the ''Tools'' tab of the sidebar. If you find yourself often using the button, click the checkbox next to it to make the button available just above the search box.
     
     The ''new journal'' button creates a journal entry as a blank tiddler with the tag ''Journal'' and a title derived from today's date. If a journal tiddler with that title already exists, then this is opened for editing.
     
     ! Creating a tagged journal tiddler
     
    -A common sequence of actions is to create (or reopen) today's journal entry and tag it with the title of another tiddler. This can be done with the ''new journal here'' button {{$:/core/images/new-journal-button}} in the other tiddler's toolbar. You can find this button in the ''Tools'' tab of the tiddler's InfoPanel.
    +A common sequence of actions is to create (or reopen) today's journal entry and tag it with the title of another tiddler. This can be done with the ''new journal here'' button <<.icon $:/core/images/new-journal-button>> in the other tiddler's toolbar. You can find this button in the ''Tools'' tab of the tiddler's InfoPanel.
     
     For example, you might be reviewing a tiddler called ''Oxford Street'' and realise that it's relevant for planning your shopping trip. Click the ''new journal here'' button on the ''Oxford Street'' tiddler to bring up a journal entry tagged with ''Oxford Street''.
     
     ! Customising journal tiddlers
     
    -To configure how new journal entries are created, visit the ''Basics'' tab under ''Info'' in the [[control panel|$:/ControlPanel]] {{$:/core/images/options-button}}:
    +To configure how new journal entries are created, visit the ''Basics'' tab under ''Info'' in the [[control panel|$:/ControlPanel]] <<.icon $:/core/images/options-button>>:
     
     * "Title of new journal tiddlers" specifies how these tiddlers should be named, as a [[date format string|DateFormat]]. The default setting of `DDth MMM YYYY` causes new entries to have titles of the form "10th October 2014"
     * "Tags for new journal tiddlers" [specifies|Title List] tags that will automatically appear on new journal entries. For example: `Journal [[Summer vacation]]`
    diff --git a/editions/tw5.com/tiddlers/workingwithtw/Navigating between open tiddlers.tid b/editions/tw5.com/tiddlers/workingwithtw/Navigating between open tiddlers.tid
    index 3f01e6c77..4473530ba 100644
    --- a/editions/tw5.com/tiddlers/workingwithtw/Navigating between open tiddlers.tid	
    +++ b/editions/tw5.com/tiddlers/workingwithtw/Navigating between open tiddlers.tid	
    @@ -8,7 +8,7 @@ In the default "classic" storyview mode, open tiddlers are displayed in a vertic
     
     * The best approach is to ''use the Open tab'' in the sidebar to click on the open tiddler to which you wish to navigate.
     
    -** The ''Open'' tab contains a list of all the open tiddlers. You can click on any tiddler in the list to jump to it, or click the "×" next to a tiddler link to close it. There is also a handy {{$:/core/images/close-all-button}} ''close all'' button at the bottom of the list of open tiddlers.
    +** The ''Open'' tab contains a list of all the open tiddlers. You can click on any tiddler in the list to jump to it, or click the "×" next to a tiddler link to close it. There is also a handy <<.icon $:/core/images/close-all-button>> ''close all'' button at the bottom of the list of open tiddlers.
     
     * Another way is to simply ''scroll the page up and down'' using the story river scrollbar to the right.
     
    diff --git a/editions/tw5.com/tiddlers/workingwithtw/Performance.tid b/editions/tw5.com/tiddlers/workingwithtw/Performance.tid
    index d4d660132..4a98ceea8 100644
    --- a/editions/tw5.com/tiddlers/workingwithtw/Performance.tid
    +++ b/editions/tw5.com/tiddlers/workingwithtw/Performance.tid
    @@ -9,7 +9,7 @@ TiddlyWiki ships with defaults that are designed to get the best out of modern d
     * ''Avoid the "Recent" tab''. It is computationally slow to generate and update in response to tiddler changes.
     * ''Use the "Vanilla" theme''. The default "Snow White" theme includes visual effects like shadows, transparency and blurring that can be slow to render on older devices
     * ''Avoid large tiddlers''. Large bitmaps can significantly slow TiddlyWiki's performance. For example, an image taken with a modern smartphone will often be 5MB or more. Use ExternalImages whenever possible
    -* ''Don't have too many tiddlers open at once''. Every tiddler you have open will require processing to keep it up to date as the store changes (for example, while you type into a draft tiddler). It is particularly easy when using zoomin story view to end up with dozens of tiddlers listed in the ''Open'' tab in the sidebar. Get into the habit of periodically closing all open tiddlers with the {{$:/core/images/close-all-button}} ''close all'' button
    +* ''Don't have too many tiddlers open at once''. Every tiddler you have open will require processing to keep it up to date as the store changes (for example, while you type into a draft tiddler). It is particularly easy when using zoomin story view to end up with dozens of tiddlers listed in the ''Open'' tab in the sidebar. Get into the habit of periodically closing all open tiddlers with the <<.icon $:/core/images/close-all-button>> ''close all'' button
     * ''Use the built-in performance instrumentation''.  Studying the [[performance instrumentation|Performance Instrumentation]] results can help highlight performance problems
     * Take advantage of indexed filter operators. The following constructions at the start of a filter run will be optimised to run many times faster than otherwise:
     ** `[all[tiddlers]tag[x]...`
    diff --git a/editions/tw5.com/tiddlers/workingwithtw/Sharing your tiddlers with others.tid b/editions/tw5.com/tiddlers/workingwithtw/Sharing your tiddlers with others.tid
    index 643b1cb14..a88275448 100644
    --- a/editions/tw5.com/tiddlers/workingwithtw/Sharing your tiddlers with others.tid	
    +++ b/editions/tw5.com/tiddlers/workingwithtw/Sharing your tiddlers with others.tid	
    @@ -9,8 +9,8 @@ There are a number of ways that you can share [[tiddlers|Tiddlers]] or your whol
     *You can attach a ~TiddlyWiki to an e-mail
     *You can publish your ~TiddlyWiki online and grab a link to send or message to others:
     **A link to the web address of the whole ~TiddlyWiki file
    -**A [[permalink|PermaLinks]] ({{$:/core/images/permalink-button}}) to a specific tiddler
    -**A [[permaview|PermaViews]] ({{$:/core/images/permaview-button}}) link of all the currently open tiddlers
    +**A [[permalink|PermaLinks]] (<<.icon $:/core/images/permalink-button>>) to a specific tiddler
    +**A [[permaview|PermaViews]] (<<.icon $:/core/images/permaview-button>>) link of all the currently open tiddlers
     * You can [[share a Dropbox link to your TiddlyWiki|Sharing a TiddlyWiki on Dropbox]]
    -* You can [[export tiddlers|How to export tiddlers]] ({{$:/core/images/export-button}}) in a variety of formats including text, static HTML and comma separated values (ie spreadsheet compatible)
    +* You can [[export tiddlers|How to export tiddlers]] (<<.icon $:/core/images/export-button>>) in a variety of formats including text, static HTML and comma separated values (ie spreadsheet compatible)
     *You can also share tiddlers merely by making your ~TiddlyWiki accessible to others, for example by publishing it online, so that they can [[import tiddlers|Importing Tiddlers]] from it
    
    From 89728d8a9a9fd9b888deb78f420dd5758ee63909 Mon Sep 17 00:00:00 2001
    From: Simon Huber 
    Date: Sun, 13 Oct 2019 17:53:40 +0200
    Subject: [PATCH 34/53] Make tag-picker add-tag button more consistent II
     (#4313)
    
    * Update tag-picker.tid
    
    * Update tags.tid
    
    * Update tag-picker.tid
    ---
     core/ui/EditTemplate/tags.tid   | 12 ++----------
     core/wiki/macros/tag-picker.tid |  8 +++-----
     2 files changed, 5 insertions(+), 15 deletions(-)
    
    diff --git a/core/ui/EditTemplate/tags.tid b/core/ui/EditTemplate/tags.tid
    index d368ce491..665516b7b 100644
    --- a/core/ui/EditTemplate/tags.tid
    +++ b/core/ui/EditTemplate/tags.tid
    @@ -25,21 +25,13 @@ color:$(foregroundColor)$;
     <$macrocall $name="tag-body-inner" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} icon="""$icon$"""/>
     \end
     
    -\define tag-picker-actions()
    -<$action-listops
    -	$tiddler=<>
    -	$field="tags"
    -	$subfilter="[] [all[current]tags[]]"
    -/>
    -\end
    -
     
    <$fieldmangler> <$list filter="[all[current]tags[]sort[title]]" storyview="pop"> <$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}} icon={{!!icon}}/> - <$set name="tabIndex" value={{$:/config/EditTabIndex}}> -<$macrocall $name="tag-picker" actions=<>/> +<$macrocall $name="tag-picker"/> +
    diff --git a/core/wiki/macros/tag-picker.tid b/core/wiki/macros/tag-picker.tid index 8d58748f2..2d36b2eb3 100644 --- a/core/wiki/macros/tag-picker.tid +++ b/core/wiki/macros/tag-picker.tid @@ -8,14 +8,13 @@ tags: $:/tags/Macro \define tag-button() <$button class="tc-btn-invisible" tag="a" tooltip={{$:/language/EditTemplate/Tags/Add/Button/Hint}}> -$(actions)$ +<$action-sendmessage $message="tm-add-tag" $param=<>/> <$action-deletetiddler $tiddler="$:/temp/NewTagName"/> <$macrocall $name="tag-pill" tag=<>/> \end -\define tag-picker(actions) -<$set name="actions" value="""$actions$"""> +\define tag-picker()
    <$keyboard key="ENTER" actions=<>> @@ -24,7 +23,7 @@ $(actions)$ <$button popup=<> class="tc-btn-invisible" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}} <$set name="tag" value={{$:/temp/NewTagName}}> <$button set="$:/temp/NewTagName" setTo="" class=""> -$actions$ +<> <$action-deletetiddler $tiddler="$:/temp/NewTagName"/> {{$:/language/EditTemplate/Tags/Add/Button}} @@ -46,5 +45,4 @@ $actions$
    - \end From daa24a52bdc832ca09e0b9c1335301c8c35c75d1 Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Sun, 13 Oct 2019 17:53:52 +0200 Subject: [PATCH 35/53] Add default new-tiddler and new-journal tags mechanism and... (#4314) * Update Basics.tid * Update ControlPanel.multids * Update NewJournal.multids * Create NewJournalTags.tid * Update new-tiddler.tid * Update new-image.tid * Update new-journal.tid * Update new-here.tid * Update new-journal-here.tid --- core/language/en-GB/ControlPanel.multids | 1 + core/language/en-GB/NewJournal.multids | 1 - core/language/en-GB/NewJournalTags.tid | 2 ++ core/ui/Actions/new-image.tid | 2 +- core/ui/Actions/new-journal.tid | 2 +- core/ui/Actions/new-tiddler.tid | 2 +- core/ui/ControlPanel/Basics.tid | 3 ++- core/ui/ViewToolbar/new-here.tid | 4 ++-- core/ui/ViewToolbar/new-journal-here.tid | 4 ++-- 9 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 core/language/en-GB/NewJournalTags.tid diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids index 3b086e851..802d9284b 100644 --- a/core/language/en-GB/ControlPanel.multids +++ b/core/language/en-GB/ControlPanel.multids @@ -15,6 +15,7 @@ Basics/NewJournal/Title/Prompt: Title of new journal tiddlers Basics/NewJournal/Text/Prompt: Text for new journal tiddlers Basics/NewJournal/Tags/Prompt: Tags for new journal tiddlers Basics/NewTiddler/Title/Prompt: Title of new tiddlers +Basics/NewTiddler/Tags/Prompt: Tags for new tiddlers Basics/OverriddenShadowTiddlers/Prompt: Number of overridden shadow tiddlers: Basics/ShadowTiddlers/Prompt: Number of shadow tiddlers: Basics/Subtitle/Prompt: Subtitle: diff --git a/core/language/en-GB/NewJournal.multids b/core/language/en-GB/NewJournal.multids index b7a3f5e62..f5c939068 100644 --- a/core/language/en-GB/NewJournal.multids +++ b/core/language/en-GB/NewJournal.multids @@ -2,4 +2,3 @@ title: $:/config/NewJournal/ Title: DDth MMM YYYY Text: -Tags: Journal diff --git a/core/language/en-GB/NewJournalTags.tid b/core/language/en-GB/NewJournalTags.tid new file mode 100644 index 000000000..0534cba33 --- /dev/null +++ b/core/language/en-GB/NewJournalTags.tid @@ -0,0 +1,2 @@ +title: $:/config/NewJournal/Tags +tags: Journal diff --git a/core/ui/Actions/new-image.tid b/core/ui/Actions/new-image.tid index 372933e90..1e46ebcdb 100644 --- a/core/ui/Actions/new-image.tid +++ b/core/ui/Actions/new-image.tid @@ -6,5 +6,5 @@ description: create a new image tiddler image/$(imageType)$ \end <$vars imageType={{$:/config/NewImageType}}> -<$action-sendmessage $message="tm-new-tiddler" type=<>/> +<$action-sendmessage $message="tm-new-tiddler" type=<> tags={{$:/config/NewTiddler/Tags!!tags}}/> diff --git a/core/ui/Actions/new-journal.tid b/core/ui/Actions/new-journal.tid index 4c5082f78..9f3453926 100644 --- a/core/ui/Actions/new-journal.tid +++ b/core/ui/Actions/new-journal.tid @@ -2,7 +2,7 @@ title: $:/core/ui/Actions/new-journal tags: $:/tags/Actions description: create a new journal tiddler -<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} journalTags={{$:/config/NewJournal/Tags}} journalText={{$:/config/NewJournal/Text}}> +<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} journalTags={{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}> <$wikify name="journalTitle" text="""<$macrocall $name="now" format=<>/>"""> <$reveal type="nomatch" state=<> text=""> <$action-sendmessage $message="tm-new-tiddler" title=<> tags=<> text={{{ [get[]] }}}/> diff --git a/core/ui/Actions/new-tiddler.tid b/core/ui/Actions/new-tiddler.tid index 272b61007..e176f0ab3 100644 --- a/core/ui/Actions/new-tiddler.tid +++ b/core/ui/Actions/new-tiddler.tid @@ -2,4 +2,4 @@ title: $:/core/ui/Actions/new-tiddler tags: $:/tags/Actions description: create a new empty tiddler -<$action-sendmessage $message="tm-new-tiddler"/> +<$action-sendmessage $message="tm-new-tiddler" tags={{$:/config/NewTiddler/Tags!!tags}}/> diff --git a/core/ui/ControlPanel/Basics.tid b/core/ui/ControlPanel/Basics.tid index 4a4379e82..b364c05bb 100644 --- a/core/ui/ControlPanel/Basics.tid +++ b/core/ui/ControlPanel/Basics.tid @@ -22,8 +22,9 @@ caption: {{$:/language/ControlPanel/Basics/Caption}} |<$link to="$:/DefaultTiddlers"><> |<>
    <$edit tag="textarea" tiddler="$:/DefaultTiddlers" class="tc-edit-texteditor"/>
    //<>// | |<$link to="$:/language/DefaultNewTiddlerTitle"><> |<$edit-text tiddler="$:/language/DefaultNewTiddlerTitle" default="" tag="input"/> | |<$link to="$:/config/NewJournal/Title"><> |<$edit-text tiddler="$:/config/NewJournal/Title" default="" tag="input"/> | +|<$link to="$:/config/NewTiddler/Tags"><> |{{$:/config/NewTiddler/Tags||$:/core/ui/EditTemplate/tags}} | |<$link to="$:/config/NewJournal/Text"><> |<$edit tiddler="$:/config/NewJournal/Text" tag="textarea" class="tc-edit-texteditor" default=""/> | -|<$link to="$:/config/NewJournal/Tags"><> |<$edit-text tiddler="$:/config/NewJournal/Tags" default="" tag="input"/> | +|<$link to="$:/config/NewJournal/Tags"><> |{{$:/config/NewJournal/Tags||$:/core/ui/EditTemplate/tags}} | |<> |{{$:/snippets/minifocusswitcher}} | |<> |{{$:/snippets/minilanguageswitcher}} | |<> |<> | diff --git a/core/ui/ViewToolbar/new-here.tid b/core/ui/ViewToolbar/new-here.tid index 7b3f96c32..d11750e70 100644 --- a/core/ui/ViewToolbar/new-here.tid +++ b/core/ui/ViewToolbar/new-here.tid @@ -5,7 +5,7 @@ description: {{$:/language/Buttons/NewHere/Hint}} \whitespace trim \define newHereActions() -<$set name="tags" filter="[]"> +<$set name="tags" filter="[] [{$:/config/NewTiddler/Tags!!tags}]"> <$action-sendmessage $message="tm-new-tiddler" tags=<>/> \end @@ -21,4 +21,4 @@ description: {{$:/language/Buttons/NewHere/Hint}} \end -<> \ No newline at end of file +<> diff --git a/core/ui/ViewToolbar/new-journal-here.tid b/core/ui/ViewToolbar/new-journal-here.tid index e41fd4063..b540185ca 100644 --- a/core/ui/ViewToolbar/new-journal-here.tid +++ b/core/ui/ViewToolbar/new-journal-here.tid @@ -23,9 +23,9 @@ description: {{$:/language/Buttons/NewJournalHere/Hint}} \end <$set name="journalTitleTemplate" value={{$:/config/NewJournal/Title}}> -<$set name="journalTags" value={{$:/config/NewJournal/Tags}}> +<$set name="journalTags" value={{$:/config/NewJournal/Tags!!tags}}> <$set name="currentTiddlerTag" value=<>> <> - \ No newline at end of file + From 4d3916b0633d14c4d1dc3c5a0c89c87549d87b04 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Mon, 14 Oct 2019 10:23:12 +0200 Subject: [PATCH 36/53] Update normalze.css from 3.0.0 to 8.0.1 (#4208) --- themes/tiddlywiki/vanilla/reset.tid | 490 ++++++++++++---------------- 1 file changed, 208 insertions(+), 282 deletions(-) diff --git a/themes/tiddlywiki/vanilla/reset.tid b/themes/tiddlywiki/vanilla/reset.tid index 4d9cb666a..11ccd7244 100644 --- a/themes/tiddlywiki/vanilla/reset.tid +++ b/themes/tiddlywiki/vanilla/reset.tid @@ -1,134 +1,43 @@ title: $:/themes/tiddlywiki/vanilla/reset type: text/plain -/*! normalize.css v3.0.0 | MIT License | git.io/normalize */ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ /** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS text size adjust after orientation change, without disabling - * user zoom. + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. */ html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ + line-height: 1.15; /* 1 */ -webkit-text-size-adjust: 100%; /* 2 */ } +/* Sections + ========================================================================== */ + /** - * Remove default margin. + * Remove the margin in all browsers. */ body { margin: 0; } -/* HTML5 display definitions - ========================================================================== */ - /** - * Correct `block` display not defined in IE 8/9. + * Render the `main` element consistently in IE. */ -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -nav, -section, -summary { +main { display: block; } /** - * 1. Correct `inline-block` display not defined in IE 8/9. - * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. - */ - -audio, -canvas, -progress, -video { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ -} - -/** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Address `[hidden]` styling not present in IE 8/9. - * Hide the `template` element in IE, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} - -/* Links - ========================================================================== */ - -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background: transparent; -} - -/** - * Improve readability when focused and also mouse hovered in all browsers. - */ - -a:active, -a:hover { - outline: 0; -} - -/* Text-level semantics - ========================================================================== */ - -/** - * Address styling not present in IE 8/9, Safari 5, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -/** - * Address styling not present in Safari 5 and Chrome. - */ - -dfn { - font-style: italic; -} - -/** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari 5, and Chrome. + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. */ h1 { @@ -136,17 +45,75 @@ h1 { margin: 0.67em 0; } +/* Grouping content + ========================================================================== */ + /** - * Address styling not present in IE 8/9. + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. */ -mark { - background: #ff0; - color: #000; +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ } /** - * Address inconsistent and variable font size in all browsers. + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. */ small { @@ -154,7 +121,8 @@ small { } /** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. */ sub, @@ -165,87 +133,31 @@ sup { vertical-align: baseline; } -sup { - top: -0.5em; -} - sub { bottom: -0.25em; } +sup { + top: -0.5em; +} + /* Embedded content ========================================================================== */ /** - * Remove border when inside `a` element in IE 8/9. + * Remove the border on images inside links in IE 10. */ img { - border: 0; -} - -/** - * Correct overflow displayed oddly in IE 9. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* Grouping content - ========================================================================== */ - -/** - * Address margin not present in IE 8/9 and Safari 5. - */ - -figure { - margin: 1em 40px; -} - -/** - * Address differences between Firefox and other browsers. - */ - -hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; -} - -/** - * Contain overflow in all browsers. - */ - -pre { - overflow: auto; -} - -/** - * Address odd `em`-unit font size rendering in all browsers. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; + border-style: none; } /* Forms ========================================================================== */ /** - * Known limitation: by default, Chrome and Safari on OS X allow very limited - * styling of `select`, unless a `border` property is set. - */ - -/** - * 1. Correct color not being inherited. - * Known issue: affects color of disabled elements. - * 2. Correct font properties not being inherited. - * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. */ button, @@ -253,146 +165,100 @@ input, optgroup, select, textarea { - color: inherit; /* 1 */ - font: inherit; /* 2 */ - margin: 0; /* 3 */ + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ } /** - * Address `overflow` set to `hidden` in IE 8/9/10. + * Show the overflow in IE. + * 1. Show the overflow in Edge. */ -button { +button, +input { /* 1 */ overflow: visible; } /** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Firefox, IE 8+, and Opera - * Correct `select` style inheritance in Firefox. + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. */ button, -select { +select { /* 1 */ text-transform: none; } /** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. + * Correct the inability to style clickable types in iOS and Safari. */ button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ +[type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; } /** - * Re-set default cursor for disabled elements. - */ - -button[disabled], -html input[disabled] { - cursor: default; -} - -/** - * Remove inner padding and border in Firefox 4+. + * Remove the inner border and padding in Firefox. */ button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; padding: 0; } /** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. + * Restore the focus styles unset by the previous rule. */ -input { - line-height: normal; +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; } /** - * It's recommended that you don't attempt to style these elements. - * Firefox's implementation doesn't respect box-sizing, padding, or width. - * - * 1. Address box sizing set to `content-box` in IE 8/9/10. - * 2. Remove excess padding in IE 8/9/10. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Fix the cursor style for Chrome's increment/decrement buttons. For certain - * `font-size` values of the `input`, it causes the cursor style of the - * decrement button to change from `default` to `text`. - */ - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome - * (include `-moz` to future-proof). - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; /* 2 */ - box-sizing: content-box; -} - -/** - * Remove inner padding and search cancel button in Safari and Chrome on OS X. - * Safari (but not Chrome) clips the cancel button when the search input has - * padding (and `textfield` appearance). - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Define consistent border, margin, and padding. + * Correct the padding in Firefox. */ fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; + padding: 0.35em 0.75em 0.625em; } /** - * 1. Correct `color` not being inherited in IE 8/9. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. */ legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ } /** - * Remove default vertical scrollbar in IE 8/9. + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. */ textarea { @@ -400,27 +266,87 @@ textarea { } /** - * Don't inherit the `font-weight` (applied by a rule above). - * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. */ -optgroup { - font-weight: bold; +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ } -/* Tables +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc ========================================================================== */ /** - * Remove most spacing between table cells. + * Add the correct display in IE 10+. */ -table { - border-collapse: collapse; - border-spacing: 0; +template { + display: none; } -td, -th { - padding: 0; +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; } From 03e98d1d62526d81e189fe0343a05cc6ba5782c3 Mon Sep 17 00:00:00 2001 From: Bram Chen Date: Mon, 14 Oct 2019 16:33:44 +0800 Subject: [PATCH 37/53] Update chinese translations (#4317) * Add chinese translations for default new-tiddler and new-journal tags mechanism * Add chinese translations for tooltips of add-tag button and add-field button --- languages/zh-Hans/ControlPanel.multids | 2 ++ languages/zh-Hans/EditTemplate.multids | 2 ++ languages/zh-Hans/NewJournal.multids | 1 - languages/zh-Hans/NewJournalTags.tid | 2 ++ languages/zh-Hant/ControlPanel.multids | 2 ++ languages/zh-Hant/EditTemplate.multids | 2 ++ languages/zh-Hant/NewJournal.multids | 1 - languages/zh-Hant/NewJournalTags.tid | 2 ++ 8 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 languages/zh-Hans/NewJournalTags.tid create mode 100644 languages/zh-Hant/NewJournalTags.tid diff --git a/languages/zh-Hans/ControlPanel.multids b/languages/zh-Hans/ControlPanel.multids index a46206f13..69772295c 100644 --- a/languages/zh-Hans/ControlPanel.multids +++ b/languages/zh-Hans/ControlPanel.multids @@ -5,6 +5,7 @@ Advanced/Hint: 关于此 TiddlyWiki 的内部信息 Appearance/Caption: 视觉外观 Appearance/Hint: 定制您的 TiddlyWiki 外观。 Basics/AnimDuration/Prompt: 动画持续时间: +Basics/AutoFocus/Prompt: 默认自动停留的栏位: Basics/Caption: 基本 Basics/DefaultTiddlers/BottomHint: 标题含空白时请使用 [[双中括弧]],或者您可用 <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">保留开启中的条目顺序 Basics/DefaultTiddlers/Prompt: 首页: @@ -13,6 +14,7 @@ Basics/Language/Prompt: 您好!当前的语言: Basics/NewJournal/Tags/Prompt: 新日志条目的标签 Basics/NewJournal/Text/Prompt: 新日志条目的内容 Basics/NewJournal/Title/Prompt: 新日志条目的名称 +Basics/NewTiddler/Tags/Prompt: 新条目的标签 Basics/NewTiddler/Title/Prompt: 新条目的名称 Basics/OverriddenShadowTiddlers/Prompt: 被覆写的默认条目数量: Basics/ShadowTiddlers/Prompt: 默认条目数量: diff --git a/languages/zh-Hans/EditTemplate.multids b/languages/zh-Hans/EditTemplate.multids index 6d966e248..7d84f78de 100644 --- a/languages/zh-Hans/EditTemplate.multids +++ b/languages/zh-Hans/EditTemplate.multids @@ -8,6 +8,7 @@ Field/Remove/Hint: 删除字段 Field/Dropdown/Caption: 字段列表 Field/Dropdown/Hint: 显示字段列表 Fields/Add/Button: 添加 +Fields/Add/Button/Hint: 添加字段 Fields/Add/Dropdown/System: 系统字段 Fields/Add/Dropdown/User: 使用者字段 Fields/Add/Name/Placeholder: 字段名称 @@ -16,6 +17,7 @@ Fields/Add/Value/Placeholder: 字段内容 Shadow/Warning: 这是一个默认条目。您做的任何更改将会覆盖来自 <> 插件的默认版本。 Shadow/OverriddenWarning: 这是一个修改过的默认条目。删除此条目可以还原为 <> 插件中的默认版本。 Tags/Add/Button: 添加 +Tags/Add/Button/Hint: 添加标签 Tags/Add/Placeholder: 标签名称 Tags/Dropdown/Caption: 标签清单 Tags/Dropdown/Hint: 显示标签清单 diff --git a/languages/zh-Hans/NewJournal.multids b/languages/zh-Hans/NewJournal.multids index fadcc911a..6b6373f1e 100644 --- a/languages/zh-Hans/NewJournal.multids +++ b/languages/zh-Hans/NewJournal.multids @@ -2,4 +2,3 @@ title: $:/config/NewJournal/ Title: YYYY年0MM月0DD日 Text: -Tags: 日志 diff --git a/languages/zh-Hans/NewJournalTags.tid b/languages/zh-Hans/NewJournalTags.tid new file mode 100644 index 000000000..989d4870b --- /dev/null +++ b/languages/zh-Hans/NewJournalTags.tid @@ -0,0 +1,2 @@ +title: $:/config/NewJournal/Tags +tags: 日志 diff --git a/languages/zh-Hant/ControlPanel.multids b/languages/zh-Hant/ControlPanel.multids index e27bb6ac7..c22cfee06 100644 --- a/languages/zh-Hant/ControlPanel.multids +++ b/languages/zh-Hant/ControlPanel.multids @@ -5,6 +5,7 @@ Advanced/Hint: 關於此 TiddlyWiki 的內部資訊 Appearance/Caption: 視覺外觀 Appearance/Hint: 自訂您的 TiddlyWiki 外觀。 Basics/AnimDuration/Prompt: 動畫持續時間: +Basics/AutoFocus/Prompt: 預設自動停留的欄位: Basics/Caption: 基本 Basics/DefaultTiddlers/BottomHint: 標題含空白時請使用 [[雙中括弧]],或者您可用 <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">保留開啟中的條目順序 Basics/DefaultTiddlers/Prompt: 首頁: @@ -13,6 +14,7 @@ Basics/Language/Prompt: 您好!當前的語言: Basics/NewJournal/Tags/Prompt: 新日誌條目的標籤 Basics/NewJournal/Text/Prompt: 新日誌條目的內容 Basics/NewJournal/Title/Prompt: 新日誌條目的名稱 +Basics/NewTiddler/Tags/Prompt: 新條目的標籤 Basics/NewTiddler/Title/Prompt: 新條目的名稱 Basics/OverriddenShadowTiddlers/Prompt: 被覆寫的預設條目數量: Basics/ShadowTiddlers/Prompt: 預設條目數量: diff --git a/languages/zh-Hant/EditTemplate.multids b/languages/zh-Hant/EditTemplate.multids index 5b828c5e5..000b45988 100644 --- a/languages/zh-Hant/EditTemplate.multids +++ b/languages/zh-Hant/EditTemplate.multids @@ -8,6 +8,7 @@ Field/Remove/Hint: 刪除欄位 Field/Dropdown/Caption: 欄位列表 Field/Dropdown/Hint: 顯示欄位列表 Fields/Add/Button: 新增 +Fields/Add/Button/Hint: 新增欄位 Fields/Add/Dropdown/System: 系統欄位 Fields/Add/Dropdown/User: 使用者欄位 Fields/Add/Name/Placeholder: 欄位名稱 @@ -16,6 +17,7 @@ Fields/Add/Value/Placeholder: 欄位內容 Shadow/Warning: 這是一個預設條目。您做的任何更改將會覆蓋來自 <> 插件的預設版本。 Shadow/OverriddenWarning: 這是一個修改過的預設條目。刪除此條目可以還原為 <> 插件中的預設版本。 Tags/Add/Button: 新增 +Tags/Add/Button/Hint: 新增標籤 Tags/Add/Placeholder: 標籤名稱 Tags/Dropdown/Caption: 標籤清單 Tags/Dropdown/Hint: 顯示標籤清單 diff --git a/languages/zh-Hant/NewJournal.multids b/languages/zh-Hant/NewJournal.multids index 18086683f..6b6373f1e 100644 --- a/languages/zh-Hant/NewJournal.multids +++ b/languages/zh-Hant/NewJournal.multids @@ -2,4 +2,3 @@ title: $:/config/NewJournal/ Title: YYYY年0MM月0DD日 Text: -Tags: 日誌 diff --git a/languages/zh-Hant/NewJournalTags.tid b/languages/zh-Hant/NewJournalTags.tid new file mode 100644 index 000000000..e7205fab4 --- /dev/null +++ b/languages/zh-Hant/NewJournalTags.tid @@ -0,0 +1,2 @@ +title: $:/config/NewJournal/Tags +tags: 日誌 From 6089c4de2921df0f76f605f1830fb2c04548f73c Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 14 Oct 2019 10:42:14 +0100 Subject: [PATCH 38/53] Extend refresh throttling to tiddlers having a "throttle.refresh" field See discussion here: https://groups.google.com/d/msgid/tiddlywiki/7738644f-b53f-4fb0-b0df-16243fe51795%40googlegroups.com --- core/language/en-GB/Fields.multids | 1 + core/modules/startup/render.js | 14 ++-- .../tiddlers/concepts/TiddlerFields.tid | 67 ++++++++++--------- .../Hidden Setting_ Typin Refresh Delay.tid | 6 +- .../tiddlers/mechanisms/RefreshMechanism.tid | 13 ++++ .../tiddlers/mechanisms/RefreshThrottling.tid | 16 +++++ .../mechanisms/WikificationMechanism.tid | 28 ++++++++ .../{ => plugins}/Plugin Dependencies.tid | 0 .../tiddlers/{ => plugins}/Plugin Types.tid | 0 .../tiddlers/workingwithtw/Performance.tid | 8 ++- 10 files changed, 110 insertions(+), 43 deletions(-) create mode 100644 editions/tw5.com/tiddlers/mechanisms/RefreshMechanism.tid create mode 100644 editions/tw5.com/tiddlers/mechanisms/RefreshThrottling.tid create mode 100644 editions/tw5.com/tiddlers/mechanisms/WikificationMechanism.tid rename editions/tw5.com/tiddlers/{ => plugins}/Plugin Dependencies.tid (100%) rename editions/tw5.com/tiddlers/{ => plugins}/Plugin Types.tid (100%) diff --git a/core/language/en-GB/Fields.multids b/core/language/en-GB/Fields.multids index 12b46293a..f39ea69d7 100644 --- a/core/language/en-GB/Fields.multids +++ b/core/language/en-GB/Fields.multids @@ -31,6 +31,7 @@ source: The source URL associated with a tiddler subtitle: The subtitle text for a wizard tags: A list of tags associated with a tiddler text: The body text of a tiddler +throttle.refresh: If present, throttles refreshes of this tiddler title: The unique name of a tiddler toc-link: Suppresses the tiddler's link in a Table of Contents tree if set to: ''no'' type: The content type of a tiddler diff --git a/core/modules/startup/render.js b/core/modules/startup/render.js index fe99ed21a..05ba9844d 100644 --- a/core/modules/startup/render.js +++ b/core/modules/startup/render.js @@ -25,7 +25,7 @@ var PAGE_TEMPLATE_TITLE = "$:/core/ui/PageTemplate"; // Time (in ms) that we defer refreshing changes to draft tiddlers var DRAFT_TIDDLER_TIMEOUT_TITLE = "$:/config/Drafts/TypingTimeout"; -var DRAFT_TIDDLER_TIMEOUT = 400; +var THROTTLE_REFRESH_TIMEOUT = 400; exports.startup = function() { // Set up the title @@ -78,12 +78,12 @@ exports.startup = function() { } // Add the change event handler $tw.wiki.addEventListener("change",$tw.perf.report("mainRefresh",function(changes) { - // Check if only drafts have changed - var onlyDraftsHaveChanged = true; + // Check if only tiddlers that are throttled have changed + var onlyThrottledTiddlersHaveChanged = true; for(var title in changes) { var tiddler = $tw.wiki.getTiddler(title); - if(!tiddler || !tiddler.hasField("draft.of")) { - onlyDraftsHaveChanged = false; + if(!tiddler || !(tiddler.hasField("draft.of") || tiddler.hasField("throttle.refresh"))) { + onlyThrottledTiddlersHaveChanged = false; } } // Defer the change if only drafts have changed @@ -91,10 +91,10 @@ exports.startup = function() { clearTimeout(timerId); } timerId = null; - if(onlyDraftsHaveChanged) { + if(onlyThrottledTiddlersHaveChanged) { var timeout = parseInt($tw.wiki.getTiddlerText(DRAFT_TIDDLER_TIMEOUT_TITLE,""),10); if(isNaN(timeout)) { - timeout = DRAFT_TIDDLER_TIMEOUT; + timeout = THROTTLE_REFRESH_TIMEOUT; } timerId = setTimeout(refresh,timeout); $tw.utils.extend(deferredChanges,changes); diff --git a/editions/tw5.com/tiddlers/concepts/TiddlerFields.tid b/editions/tw5.com/tiddlers/concepts/TiddlerFields.tid index 3d2dd5a84..0a0c07c7e 100644 --- a/editions/tw5.com/tiddlers/concepts/TiddlerFields.tid +++ b/editions/tw5.com/tiddlers/concepts/TiddlerFields.tid @@ -1,5 +1,5 @@ created: 20130825213300000 -modified: 20180104000000000 +modified: 20191013093910961 tags: Concepts title: TiddlerFields type: text/vnd.tiddlywiki @@ -9,43 +9,44 @@ type: text/vnd.tiddlywiki The standard fields are: -|!Field Name |!Reference |!Description | -|`title` |TitleField |<> | -|`text` |TextField |<> | -|`modified` |ModifiedField |<> | -|`modifier` |ModifierField |<> | -|`created` |CreatedField |<> | -|`creator` |CreatorField |<> | -|`tags` |TagsField |<> | -|`type` |TypeField |<> | -|`list` |ListField |<> | -|`caption` |CaptionField |<> | +|!Field Name |!Description | +|`title` |<> | +|`text` |<> | +|`modified` |<> | +|`modifier` |<> | +|`created` |<> | +|`creator` |<> | +|`tags` |<> | +|`type` |<> | +|`list` |<> -- see ListField | +|`caption` |<> | Other fields used by the core are: -|!Field Name |!Reference |!Description | -|`class` |ClassField |<> | -|`color` |ColorField |<> | -|`description` |DescriptionField |<> | -|`draft.of` |DraftOfField |<> | -|`draft.title` |DraftTitleField |<> | -|`footer` |FooterField |<> | -|`hide-body`|HideBodyField|<>| -|`icon` |IconField |<> | -|`library` |LibraryField |<> | -|`list-after` |ListAfterField |<> | -|`list-before` |ListBeforeField |<> | -|`name` |NameField |<> | -|`plugin-priority` |PluginPriorityField |<> | -|`plugin-type` |PluginTypeField |<> | -|`source` |SourceField |<> | -|`subtitle` |SubtitleField |<> | -|`toc-link`|TocLink|<>| +|!Field Name |!Description | +|`class` |<> | +|`color` |<> | +|`description` |<> | +|`draft.of` |<> | +|`draft.title` |<> | +|`footer` |<> | +|`hide-body`|<>| +|`icon` |<> | +|`library` |<> | +|`list-after` |<> | +|`list-before` |<> | +|`name` |<> | +|`plugin-priority` |<> | +|`plugin-type` |<> | +|`source` |<> | +|`subtitle` |<> | +|`throttle.refresh` |<> | +|`toc-link`|<>| The TiddlyWebAdaptor uses a few more fields: -|!Field Name |!Reference |!Description | -|`bag` |BagField |<> | -|`revision` |RevisionField |<> | +|!Field Name |!Description | +|`bag` |<> | +|`revision` |<> | Details of the fields used in this ~TiddlyWiki are shown in the [[control panel|$:/ControlPanel]] {{$:/core/ui/Buttons/control-panel}} under the <<.controlpanel-tab Info>> tab >> <<.info-tab Advanced>> sub-tab >> Tiddler Fields diff --git a/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting_ Typin Refresh Delay.tid b/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting_ Typin Refresh Delay.tid index 711104529..d47faf476 100644 --- a/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting_ Typin Refresh Delay.tid +++ b/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting_ Typin Refresh Delay.tid @@ -1,10 +1,12 @@ created: 20150619162409306 -modified: 20150619162511957 +modified: 20191014091803518 tags: [[Hidden Settings]] title: Hidden Setting: Typing Refresh Delay type: text/vnd.tiddlywiki -TiddlyWiki defers processing changes to draft tiddlers until a timeout has elapsed. The default value of 400ms gives a good balance of responsiveness in most cases but isn't always optimal on lower powered mobile devices. +TiddlyWiki defers processing changes to draft tiddlers until a timeout has elapsed (this is called throttling). The mechanism can be extended to other tiddlers by adding a `throttle.refresh` field. See RefreshThrottling for details. + +The default value of 400ms gives a good balance of responsiveness in most cases but isn't always optimal on lower powered mobile devices. The timeout can now be changed by changing this value (in milliseconds): diff --git a/editions/tw5.com/tiddlers/mechanisms/RefreshMechanism.tid b/editions/tw5.com/tiddlers/mechanisms/RefreshMechanism.tid new file mode 100644 index 000000000..e50d333b5 --- /dev/null +++ b/editions/tw5.com/tiddlers/mechanisms/RefreshMechanism.tid @@ -0,0 +1,13 @@ +created: 20191012152414236 +modified: 20191014091753894 +tags: Mechanisms +title: RefreshMechanism +type: text/vnd.tiddlywiki + +The refresh mechanism is the part of the WikificationMechanism concerned with updating a rendering when there are changes in the tiddler store. + +The refresh mechanism is notified of changes to the tiddler store asynchronously. This is done so that multiple consecutive changes can be coalesced into a single change notification. Thus, a series of action widgets modifying several different tiddlers will only trigger a single refresh cycle. + +When changes occur, the rendering is updated by calling the "refresh" method of the root widget. The refresh method determines whether the widget needs to be updated to reflect the incoming changes, and then recursively calls into the refresh methods of each child widget + +The refresh cycle is inherently fairly slow because it involves visiting every node in the render tree. To maintain performance there is a RefreshThrottling mechanism that enables refresh processing to be deferred when rapid changes occur to the same tiddler. diff --git a/editions/tw5.com/tiddlers/mechanisms/RefreshThrottling.tid b/editions/tw5.com/tiddlers/mechanisms/RefreshThrottling.tid new file mode 100644 index 000000000..3453bf2b4 --- /dev/null +++ b/editions/tw5.com/tiddlers/mechanisms/RefreshThrottling.tid @@ -0,0 +1,16 @@ +created: 20191013095916159 +modified: 20191014093837558 +tags: RefreshMechanism +title: RefreshThrottling +type: text/vnd.tiddlywiki + +The RefreshMechanism allows the refresh cycle to be throttled (or deferred) when rapid changes occur to the same tiddler. It is used to maintain responsiveness while editing a draft tiddler, but can also be used on other tiddlers. + +The rules governing refresh throttling are: + +* When a change notification occurs, throttling will only take place if all of the modified tiddlers meet at least one of these criteria: +** Has the field `draft.of` +** Has the field `throttle.refresh` +* If the refresh cycle is to be throttled, a timer is set for the internal specified in [[$:/config/Drafts/TypingTimeout|Hidden Setting: Typing Refresh Delay]] (cancelling any preciously set timer) +** When the timer fires, the refresh cycle is triggered, passing the aggregated titles of all the deferred refresh cycles + diff --git a/editions/tw5.com/tiddlers/mechanisms/WikificationMechanism.tid b/editions/tw5.com/tiddlers/mechanisms/WikificationMechanism.tid new file mode 100644 index 000000000..1683748cf --- /dev/null +++ b/editions/tw5.com/tiddlers/mechanisms/WikificationMechanism.tid @@ -0,0 +1,28 @@ +created: 20191012080221911 +modified: 20191013094002890 +tags: Mechanisms +title: WikificationMechanism +type: text/vnd.tiddlywiki + +"Wikification" is a general term for the dynamic process of converting tiddlers containing WikiText into the HTML DOM representation needed by the browser, and updating that representation if the underlying tiddlers change. + +It is composed of several distinct steps: + +* ParserMechanism: reading the text of tiddlers and scanning for wikitext constructions, outputting a tree representation of the resulting structure. It is an expensive process so parse trees are cached, and only need to be updated if the corresponding tiddler is changed +* WidgetMechanism: starting with a specified root tiddler, recursively instantiate a widget for each parse tree node making a rendering tree. Widgets can optionally also create DOM nodes +* RefreshMechanism: handling changes to the tiddler store by selectively and efficiently updating a rendering tree + +This mechanism is used in the browser to build TiddlyWiki's main interactive page. At startup, the tiddler $:/core/ui/PageTemplate is parsed and rendered to the DOM, recursively pulling in other tiddlers to build the entire user interface. Any user interactions -- following a link, clicking a button, or typing in a text box -- trigger a change in the tiddler store which then automatically propagates through the widget tree. For example, if the user clicks a link to navigate to a new tiddler, the following steps take place: + +# Clicking the link triggers the action of the LinkWidget which by default is to add the target tiddler to the list field of the tiddler $:/StoryList +# The modification to the tiddler store asynchronously triggers the refresh cycle. The asynchronous triggering ensures that the refresh cycle is only run once even if multiple tiddlers were modified in succession +# The refresh cycle recursively visits each node of the render tree giving them the chance to update themselves in the light of the accumulated changes to the tiddler store. In this case, the ListWidget of the main story river notices that a single tiddler needs to be added to the river, and renders that newly displayed tiddler without disturbing the other tiddlers + +The performance of the entire wikification process is critical. If the refresh cycle takes more than about 400ms then the user will notice a delay between their actions and the effects. See [[Performance]] for some discussion of how to optimise performance. + +The rendering process is also aggressively reused in other parts of TiddlyWiki, both in the browser and on the server: + +* Generating TiddlyWiki's standalone HTML representation +* Creating static HTML renderings of tiddlers +* Dynamically rendering CSS stylesheet tiddlers + diff --git a/editions/tw5.com/tiddlers/Plugin Dependencies.tid b/editions/tw5.com/tiddlers/plugins/Plugin Dependencies.tid similarity index 100% rename from editions/tw5.com/tiddlers/Plugin Dependencies.tid rename to editions/tw5.com/tiddlers/plugins/Plugin Dependencies.tid diff --git a/editions/tw5.com/tiddlers/Plugin Types.tid b/editions/tw5.com/tiddlers/plugins/Plugin Types.tid similarity index 100% rename from editions/tw5.com/tiddlers/Plugin Types.tid rename to editions/tw5.com/tiddlers/plugins/Plugin Types.tid diff --git a/editions/tw5.com/tiddlers/workingwithtw/Performance.tid b/editions/tw5.com/tiddlers/workingwithtw/Performance.tid index 4a98ceea8..83ee7de91 100644 --- a/editions/tw5.com/tiddlers/workingwithtw/Performance.tid +++ b/editions/tw5.com/tiddlers/workingwithtw/Performance.tid @@ -1,15 +1,20 @@ created: 20150330155120127 -modified: 20190609154450433 +modified: 20191014091943444 tags: [[Working with TiddlyWiki]] title: Performance type: text/vnd.tiddlywiki TiddlyWiki ships with defaults that are designed to get the best out of modern devices from smartphones to desktop computers. If you need to work on older, less powerful devices, or work with large amounts of content, there are a few steps you can take to improve performance. +!! Usage + * ''Avoid the "Recent" tab''. It is computationally slow to generate and update in response to tiddler changes. * ''Use the "Vanilla" theme''. The default "Snow White" theme includes visual effects like shadows, transparency and blurring that can be slow to render on older devices * ''Avoid large tiddlers''. Large bitmaps can significantly slow TiddlyWiki's performance. For example, an image taken with a modern smartphone will often be 5MB or more. Use ExternalImages whenever possible * ''Don't have too many tiddlers open at once''. Every tiddler you have open will require processing to keep it up to date as the store changes (for example, while you type into a draft tiddler). It is particularly easy when using zoomin story view to end up with dozens of tiddlers listed in the ''Open'' tab in the sidebar. Get into the habit of periodically closing all open tiddlers with the <<.icon $:/core/images/close-all-button>> ''close all'' button + +!! WikiText + * ''Use the built-in performance instrumentation''. Studying the [[performance instrumentation|Performance Instrumentation]] results can help highlight performance problems * Take advantage of indexed filter operators. The following constructions at the start of a filter run will be optimised to run many times faster than otherwise: ** `[all[tiddlers]tag[x]...` @@ -22,4 +27,5 @@ TiddlyWiki ships with defaults that are designed to get the best out of modern d ** `[all[shadows+tiddlers]field:y[x]...` ** Note that the field indexer currently defaults to indexing field values of less than 128 characters; longer values can still be searched for, but no index will be constructed ** Also note that the “field” operator is also used when the operator name is a fieldname, so, for example, `[all[shadows+tiddlers]caption[x]...` is optimised. +* Use the [[throttling|RefreshThrottling]] feature of the RefreshMechanism judiciously From 73bb27fd7753f980c27daf7a460401c27b910db7 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 14 Oct 2019 13:19:08 +0100 Subject: [PATCH 39/53] Tweak autofocus text in control panel Also made the trailing punctuation more consistent --- core/language/en-GB/ControlPanel.multids | 26 ++++++++++++------------ core/ui/ControlPanel/Basics.tid | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids index 802d9284b..99a526b9f 100644 --- a/core/language/en-GB/ControlPanel.multids +++ b/core/language/en-GB/ControlPanel.multids @@ -4,27 +4,27 @@ Advanced/Caption: Advanced Advanced/Hint: Internal information about this TiddlyWiki Appearance/Caption: Appearance Appearance/Hint: Ways to customise the appearance of your TiddlyWiki. -Basics/AnimDuration/Prompt: Animation duration: -Basics/AutoFocus/Prompt: Default ~AutoFocus field: +Basics/AnimDuration/Prompt: Animation duration +Basics/AutoFocus/Prompt: Default focus field for new tiddlers Basics/Caption: Basics Basics/DefaultTiddlers/BottomHint: Use [[double square brackets]] for titles with spaces. Or you can choose to <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">retain story ordering -Basics/DefaultTiddlers/Prompt: Default tiddlers: -Basics/DefaultTiddlers/TopHint: Choose which tiddlers are displayed at startup: +Basics/DefaultTiddlers/Prompt: Default tiddlers +Basics/DefaultTiddlers/TopHint: Choose which tiddlers are displayed at startup Basics/Language/Prompt: Hello! Current language: Basics/NewJournal/Title/Prompt: Title of new journal tiddlers Basics/NewJournal/Text/Prompt: Text for new journal tiddlers Basics/NewJournal/Tags/Prompt: Tags for new journal tiddlers Basics/NewTiddler/Title/Prompt: Title of new tiddlers Basics/NewTiddler/Tags/Prompt: Tags for new tiddlers -Basics/OverriddenShadowTiddlers/Prompt: Number of overridden shadow tiddlers: -Basics/ShadowTiddlers/Prompt: Number of shadow tiddlers: -Basics/Subtitle/Prompt: Subtitle: -Basics/SystemTiddlers/Prompt: Number of system tiddlers: -Basics/Tags/Prompt: Number of tags: -Basics/Tiddlers/Prompt: Number of tiddlers: -Basics/Title/Prompt: Title of this ~TiddlyWiki: -Basics/Username/Prompt: Username for signing edits: -Basics/Version/Prompt: ~TiddlyWiki version: +Basics/OverriddenShadowTiddlers/Prompt: Number of overridden shadow tiddlers +Basics/ShadowTiddlers/Prompt: Number of shadow tiddlers +Basics/Subtitle/Prompt: Subtitle +Basics/SystemTiddlers/Prompt: Number of system tiddlers +Basics/Tags/Prompt: Number of tags +Basics/Tiddlers/Prompt: Number of tiddlers +Basics/Title/Prompt: Title of this ~TiddlyWiki +Basics/Username/Prompt: Username for signing edits +Basics/Version/Prompt: ~TiddlyWiki version EditorTypes/Caption: Editor Types EditorTypes/Editor/Caption: Editor EditorTypes/Hint: These tiddlers determine which editor is used to edit specific tiddler types. diff --git a/core/ui/ControlPanel/Basics.tid b/core/ui/ControlPanel/Basics.tid index b364c05bb..0e90ca427 100644 --- a/core/ui/ControlPanel/Basics.tid +++ b/core/ui/ControlPanel/Basics.tid @@ -25,7 +25,7 @@ caption: {{$:/language/ControlPanel/Basics/Caption}} |<$link to="$:/config/NewTiddler/Tags"><> |{{$:/config/NewTiddler/Tags||$:/core/ui/EditTemplate/tags}} | |<$link to="$:/config/NewJournal/Text"><> |<$edit tiddler="$:/config/NewJournal/Text" tag="textarea" class="tc-edit-texteditor" default=""/> | |<$link to="$:/config/NewJournal/Tags"><> |{{$:/config/NewJournal/Tags||$:/core/ui/EditTemplate/tags}} | -|<> |{{$:/snippets/minifocusswitcher}} | +|<$link to="$:/config/AutoFocus"><> |{{$:/snippets/minifocusswitcher}} | |<> |{{$:/snippets/minilanguageswitcher}} | |<> |<> | |<> |<> | From ac66d863aab3dfc2f9f760e6bda64e9b6bee4ced Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 14 Oct 2019 13:19:27 +0100 Subject: [PATCH 40/53] Simplify GitHub fork ribbon plugin metadata --- plugins/tiddlywiki/github-fork-ribbon/plugin.info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/tiddlywiki/github-fork-ribbon/plugin.info b/plugins/tiddlywiki/github-fork-ribbon/plugin.info index fdef00d7e..0e8df69d5 100644 --- a/plugins/tiddlywiki/github-fork-ribbon/plugin.info +++ b/plugins/tiddlywiki/github-fork-ribbon/plugin.info @@ -2,6 +2,6 @@ "title": "$:/plugins/tiddlywiki/github-fork-ribbon", "name": "GitHub Fork Ribbon", "description": "GitHub-inspired corner ribbon", - "author": "Simon Whitaker, adapted for TiddlyWiki by JeremyRuston", + "author": "Simon Whitaker", "list": "readme usage" } From 00974be82d85be51ba62307f64f22db38bb577ab Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 14 Oct 2019 13:19:40 +0100 Subject: [PATCH 41/53] Update release note --- editions/prerelease/tiddlers/Release 5.1.22.tid | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/editions/prerelease/tiddlers/Release 5.1.22.tid b/editions/prerelease/tiddlers/Release 5.1.22.tid index e7b47d2c7..b1d91e7fa 100644 --- a/editions/prerelease/tiddlers/Release 5.1.22.tid +++ b/editions/prerelease/tiddlers/Release 5.1.22.tid @@ -21,17 +21,31 @@ The [[plugin listing|$:/core/ui/ControlPanel/Plugins]] and the [[plugin chooser| * Improved Dutch translation +! Usability Improvements + +* [[Added|https://github.com/Jermolene/TiddlyWiki5/pull/4238]] support for specifying the field that should receive focus when editing or creating a tiddler +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4293]] ([[and here|https://github.com/Jermolene/TiddlyWiki5/pull/4296]]) spacing for page control buttons +* [[Improved|https://github.com/Jermolene/TiddlyWiki5/commit/9395d7567179c436d0e8ac26fc976d717eae7f50]] display of icons in documentation +* [[Added|https://github.com/Jermolene/TiddlyWiki5/pull/4314]] support in control panel for specifying the tags for new tiddlers and journals + ! Hackability Improvements +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/6089c4de2921df0f76f605f1830fb2c04548f73c]] support for RefreshThrottling via the `throttle.refresh` field * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/1150c87edb7478af6cc943eb0ef52fdf3051c121]] (and [[here|https://github.com/Jermolene/TiddlyWiki5/commit/8c894612914e21cf941a1daa953538c28ce91d8e]]) new `[is[binary]]` operand for the [[is Operator]] * [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/68163684a2e57108e160295e445c194268b873c5]] usage of `publishFilter` in save templates -- see SavingMechanism +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/89716bb81d68b9c68d3c0fd2f2de96afad1b086a]] CSS class identifying the tiddler body editor +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/e9211b0eee8e0b081f9f1597bde6673bf4c55d5c]] CSS classes to identify sidebar tabsets +* [[Updated|https://github.com/Jermolene/TiddlyWiki5/pull/4208]] normalize.css from v3.0.0 to v8.0.1 ! Bug Fixes +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/issues/4291]] bug with deletes failing when lazy loading used under Node.js * [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/4243]] problem with the [[GitLab saver|Saving to a Git service]] * [[Fixed|https://github.com/Jermolene/TiddlyWiki5/issues/4237]] bug with permaview button when placed above the search box * [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/a054d100e73db95071299e92c4321c2aa8e42382]] usage of ''count'' parameter of [[WidgetMessage: tm-edit-text-operation]] * [[Fixed|https://github.com/Jermolene/TiddlyWiki5/issues/4284]] bug with toc-selective-expandable macro still showing disclosure arrow despite excluding tiddlers +* [[Removed|https://github.com/Jermolene/TiddlyWiki5/commit/81f1e6af4e5920c6ff41e7f08171bfddc1b26dfc]] erroneous word break setting for vertical tabs +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/d30eacc6520971c95bdabf24f4c4122534d9414a]] problem with programmatically deselecting entries from the SelectWidget in multiple selection mode ! Contributors From 7af24d217a0f32f3da30edd692a919f846354a6f Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Mon, 14 Oct 2019 14:57:28 +0200 Subject: [PATCH 42/53] Make tags in controlpanel animate (#4320) --- core/ui/ControlPanel/Basics.tid | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/ui/ControlPanel/Basics.tid b/core/ui/ControlPanel/Basics.tid index 0e90ca427..77256ba88 100644 --- a/core/ui/ControlPanel/Basics.tid +++ b/core/ui/ControlPanel/Basics.tid @@ -22,9 +22,9 @@ caption: {{$:/language/ControlPanel/Basics/Caption}} |<$link to="$:/DefaultTiddlers"><> |<>
    <$edit tag="textarea" tiddler="$:/DefaultTiddlers" class="tc-edit-texteditor"/>
    //<>// | |<$link to="$:/language/DefaultNewTiddlerTitle"><> |<$edit-text tiddler="$:/language/DefaultNewTiddlerTitle" default="" tag="input"/> | |<$link to="$:/config/NewJournal/Title"><> |<$edit-text tiddler="$:/config/NewJournal/Title" default="" tag="input"/> | -|<$link to="$:/config/NewTiddler/Tags"><> |{{$:/config/NewTiddler/Tags||$:/core/ui/EditTemplate/tags}} | |<$link to="$:/config/NewJournal/Text"><> |<$edit tiddler="$:/config/NewJournal/Text" tag="textarea" class="tc-edit-texteditor" default=""/> | -|<$link to="$:/config/NewJournal/Tags"><> |{{$:/config/NewJournal/Tags||$:/core/ui/EditTemplate/tags}} | +|<$link to="$:/config/NewTiddler/Tags"><> |<$list filter="[[$:/config/NewTiddler/Tags]]" template="$:/core/ui/EditTemplate/tags"/> | +|<$link to="$:/config/NewJournal/Tags"><> |<$list filter="[[$:/config/NewJournal/Tags]]" template="$:/core/ui/EditTemplate/tags"/> | |<$link to="$:/config/AutoFocus"><> |{{$:/snippets/minifocusswitcher}} | |<> |{{$:/snippets/minilanguageswitcher}} | |<> |<> | From 45def4def441554a06c3e17742adc29a17d2a13c Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Mon, 14 Oct 2019 14:57:45 +0200 Subject: [PATCH 43/53] Fix focus in fields editTemplate (#4321) the focus was set to the wrong field --- core/ui/EditTemplate/fields.tid | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/ui/EditTemplate/fields.tid b/core/ui/EditTemplate/fields.tid index 6923fac17..f65454a17 100644 --- a/core/ui/EditTemplate/fields.tid +++ b/core/ui/EditTemplate/fields.tid @@ -40,7 +40,7 @@ $value={{$:/temp/newfieldvalue}}/> <$text text=<>/>: -<$edit-text tiddler=<> field=<> placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} tabindex={{$:/config/EditTabIndex}} focus={{{ [{$:/config/AutoFocus}match[fields]then[true]] ~[[false]] }}}/> +<$edit-text tiddler=<> field=<> placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} tabindex={{$:/config/EditTabIndex}}/> <$button class="tc-btn-invisible" tooltip={{$:/language/EditTemplate/Field/Remove/Hint}} aria-label={{$:/language/EditTemplate/Field/Remove/Caption}}> @@ -61,7 +61,7 @@ $value={{$:/temp/newfieldvalue}}/> < -<$edit-text tiddler="$:/temp/newfieldname" tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Name/Placeholder}} focusPopup=<> class="tc-edit-texteditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}}/> +<$edit-text tiddler="$:/temp/newfieldname" tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Name/Placeholder}} focusPopup=<> class="tc-edit-texteditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}} focus={{{ [{$:/config/AutoFocus}match[fields]then[true]] ~[[false]] }}}/>   <$button popup=<> class="tc-btn-invisible tc-btn-dropdown" tooltip={{$:/language/EditTemplate/Field/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Field/Dropdown/Caption}}>{{$:/core/images/down-arrow}}  <$reveal state=<> type="nomatch" text="" default=""> From 3c365a2567ebfe12d78b0aed77a40969cd38563e Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Mon, 14 Oct 2019 15:31:57 +0200 Subject: [PATCH 44/53] EditTemplate optimizations (#4104) #4093 and #4100 are bundled in this PR * qualified state-tiddlers for the tags input and fieldname + fieldvalue inputs * newTagName, newFieldNameTiddler and newFieldValueTiddler variables defined in EditTemplate (all qualified through `qualify` macro) * save-tiddler-actions macro in the EditTemplate (reused by the save-tiddler button) * enter (configurable) in the fieldvalue field adds the field and sets focus to the next fieldname input Edit: * storyview="pop" for fields list --- core/language/en-GB/EditTemplate.multids | 2 +- core/ui/EditTemplate.tid | 18 +++++------ core/ui/EditTemplate/fields.tid | 33 +++++++++++++++----- core/ui/EditToolbar/save.tid | 10 +++--- core/wiki/config/ShortcutInfo.multids | 1 + core/wiki/config/shortcuts/shortcuts.multids | 1 + core/wiki/macros/tag-picker.tid | 22 +++++++------ 7 files changed, 53 insertions(+), 34 deletions(-) diff --git a/core/language/en-GB/EditTemplate.multids b/core/language/en-GB/EditTemplate.multids index 90ee4975f..31f18765a 100644 --- a/core/language/en-GB/EditTemplate.multids +++ b/core/language/en-GB/EditTemplate.multids @@ -8,7 +8,7 @@ Field/Remove/Hint: Remove field Field/Dropdown/Caption: field list Field/Dropdown/Hint: Show field list Fields/Add/Button: add -Fields/Add/Button/Hint: add field +Fields/Add/Button/Hint: Add the new field to the tiddler Fields/Add/Name/Placeholder: field name Fields/Add/Prompt: Add a new field: Fields/Add/Value/Placeholder: field value diff --git a/core/ui/EditTemplate.tid b/core/ui/EditTemplate.tid index 273f06c0e..f3e82fa8f 100644 --- a/core/ui/EditTemplate.tid +++ b/core/ui/EditTemplate.tid @@ -1,11 +1,11 @@ title: $:/core/ui/EditTemplate -\define actions() -<$action-sendmessage $message="tm-add-tag" $param={{$:/temp/NewTagName}}/> -<$action-deletetiddler $tiddler="$:/temp/NewTagName"/> -<$action-sendmessage $message="tm-add-field" $name={{$:/temp/newfieldname}} $value={{$:/temp/newfieldvalue}}/> -<$action-deletetiddler $tiddler="$:/temp/newfieldname"/> -<$action-deletetiddler $tiddler="$:/temp/newfieldvalue"/> +\define save-tiddler-actions() +<$action-sendmessage $message="tm-add-tag" $param={{{ [get[text]] }}}/> +<$action-deletetiddler $tiddler=<>/> +<$action-sendmessage $message="tm-add-field" $name={{{ [get[text]] }}} $value={{{ [get[text]] }}}/> +<$action-deletetiddler $tiddler=<>/> +<$action-deletetiddler $tiddler=<>/> <$action-sendmessage $message="tm-save-tiddler"/> \end \define frame-classes() @@ -13,9 +13,9 @@ tc-tiddler-frame tc-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerCl \end
    > data-tiddler-title=<>> <$fieldmangler> -<$set name="storyTiddler" value=<>> +<$vars storyTiddler=<> newTagNameTiddler=<> newFieldNameTiddler=<> newFieldValueTiddler=<>> <$keyboard key="((cancel-edit-tiddler))" message="tm-cancel-tiddler"> -<$keyboard key="((save-tiddler))" actions=<>> +<$keyboard key="((save-tiddler))" actions=<>> <$list filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" variable="listItem"> <$set name="tv-config-toolbar-class" filter="[] [encodeuricomponent[]addprefix[tc-btn-]]"> <$transclude tiddler=<>/> @@ -23,6 +23,6 @@ tc-tiddler-frame tc-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerCl - +
    diff --git a/core/ui/EditTemplate/fields.tid b/core/ui/EditTemplate/fields.tid index f65454a17..5368404a3 100644 --- a/core/ui/EditTemplate/fields.tid +++ b/core/ui/EditTemplate/fields.tid @@ -10,15 +10,26 @@ $:/config/EditTemplateFields/Visibility/$(currentField)$ [[hide]] -[title{$(config-title)$}] \end +\define current-tiddler-new-field-selector() +[data-tiddler-title="$(currentTiddlerCSSescaped)$"] .tc-edit-field-add-name input +\end + +\define new-field-actions() +<$action-sendmessage $message="tm-add-field" $name={{{ [get[text]] }}} $value={{{ [get[text]] }}}/> +<$action-deletetiddler $tiddler=<>/> +<$action-deletetiddler $tiddler=<>/> +<$action-sendmessage $message="tm-focus-selector" $param=<>/> +\end + \define new-field() -<$vars name={{$:/temp/newfieldname}}> +<$vars name={{{ [get[text]] }}}> <$reveal type="nomatch" text="" default=<>> <$button tooltip=<>> <$action-sendmessage $message="tm-add-field" $name=<> -$value={{$:/temp/newfieldvalue}}/> -<$action-deletetiddler $tiddler="$:/temp/newfieldname"/> -<$action-deletetiddler $tiddler="$:/temp/newfieldvalue"/> +$value={{{ [get[text]] }}}/> +<$action-deletetiddler $tiddler=<>/> +<$action-deletetiddler $tiddler=<>/> <> @@ -67,11 +78,12 @@ $value={{$:/temp/newfieldvalue}}/> <$reveal state=<> type="nomatch" text="" default="">
    <$set name="tv-show-missing-links" value="yes"> -<$linkcatcher to="$:/temp/newfieldname"> +<$linkcatcher to=<>>
    <>
    -<$list filter="[!is[shadow]!is[system]fields[]search:title{$:/temp/newfieldname}sort[]] -created -creator -draft.of -draft.title -modified -modifier -tags -text -title -type" variable="currentField"> +<$set name="newFieldName" value={{{ [get[text]] }}}> +<$list filter="[!is[shadow]!is[system]fields[]search:titlesort[]] -created -creator -draft.of -draft.title -modified -modifier -tags -text -title -type" variable="currentField"> <$link to=<>> <$text text=<>/> @@ -79,17 +91,22 @@ $value={{$:/temp/newfieldvalue}}/>
    <>
    -<$list filter="[fields[]search:title{$:/temp/newfieldname}sort[]] -[!is[shadow]!is[system]fields[]]" variable="currentField"> +<$list filter="[fields[]search:titlesort[]] -[!is[shadow]!is[system]fields[]]" variable="currentField"> <$link to=<>> <$text text=<>/> +
    -<$edit-text tiddler="$:/temp/newfieldvalue" tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} class="tc-edit-texteditor" tabindex={{$:/config/EditTabIndex}}/> +<$set name="currentTiddlerCSSescaped" value={{{ [escapecss[]] }}}> +<$keyboard key="((add-field))" actions=<>> +<$edit-text tiddler=<> tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} class="tc-edit-texteditor" tabindex={{$:/config/EditTabIndex}}/> + +   <$macrocall $name="new-field"/> diff --git a/core/ui/EditToolbar/save.tid b/core/ui/EditToolbar/save.tid index 8c5a81b01..cd69d7686 100644 --- a/core/ui/EditToolbar/save.tid +++ b/core/ui/EditToolbar/save.tid @@ -3,13 +3,9 @@ tags: $:/tags/EditToolbar caption: {{$:/core/images/done-button}} {{$:/language/Buttons/Save/Caption}} description: {{$:/language/Buttons/Save/Hint}} +\define save-tiddler-button() <$fieldmangler><$button tooltip={{$:/language/Buttons/Save/Hint}} aria-label={{$:/language/Buttons/Save/Caption}} class=<>> -<$action-sendmessage $message="tm-add-tag" $param={{$:/temp/NewTagName}}/> -<$action-deletetiddler $tiddler="$:/temp/NewTagName"/> -<$action-sendmessage $message="tm-add-field" $name={{$:/temp/newfieldname}} $value={{$:/temp/newfieldvalue}}/> -<$action-deletetiddler $tiddler="$:/temp/newfieldname"/> -<$action-deletetiddler $tiddler="$:/temp/newfieldvalue"/> -<$action-sendmessage $message="tm-save-tiddler"/> +<> <$list filter="[match[yes]]"> {{$:/core/images/done-button}} @@ -17,3 +13,5 @@ description: {{$:/language/Buttons/Save/Hint}} <$text text={{$:/language/Buttons/Save/Caption}}/> +\end +<> diff --git a/core/wiki/config/ShortcutInfo.multids b/core/wiki/config/ShortcutInfo.multids index 2c67ec29e..e1dd4e179 100644 --- a/core/wiki/config/ShortcutInfo.multids +++ b/core/wiki/config/ShortcutInfo.multids @@ -1,5 +1,6 @@ title: $:/config/ShortcutInfo/ +add-field: {{$:/language/EditTemplate/Fields/Add/Button/Hint}} advanced-search: {{$:/language/Buttons/AdvancedSearch/Hint}} bold: {{$:/language/Buttons/Bold/Hint}} cancel-edit-tiddler: {{$:/language/Buttons/Cancel/Hint}} diff --git a/core/wiki/config/shortcuts/shortcuts.multids b/core/wiki/config/shortcuts/shortcuts.multids index 1d192df9a..1fbb9576b 100644 --- a/core/wiki/config/shortcuts/shortcuts.multids +++ b/core/wiki/config/shortcuts/shortcuts.multids @@ -1,5 +1,6 @@ title: $:/config/shortcuts/ +add-field: enter advanced-search: ctrl-shift-A cancel-edit-tiddler: escape excise: ctrl-E diff --git a/core/wiki/macros/tag-picker.tid b/core/wiki/macros/tag-picker.tid index 2d36b2eb3..ce7738df0 100644 --- a/core/wiki/macros/tag-picker.tid +++ b/core/wiki/macros/tag-picker.tid @@ -2,14 +2,14 @@ title: $:/core/macros/tag-picker tags: $:/tags/Macro \define add-tag-actions() -<$action-sendmessage $message="tm-add-tag" $param={{$:/temp/NewTagName}}/> -<$action-deletetiddler $tiddler="$:/temp/NewTagName"/> +<$action-sendmessage $message="tm-add-tag" $param={{{ [get[text]] }}}/> +<$action-deletetiddler $tiddler=<>/> \end \define tag-button() <$button class="tc-btn-invisible" tag="a" tooltip={{$:/language/EditTemplate/Tags/Add/Button/Hint}}> <$action-sendmessage $message="tm-add-tag" $param=<>/> -<$action-deletetiddler $tiddler="$:/temp/NewTagName"/> +<$action-deletetiddler $tiddler=<>/> <$macrocall $name="tag-pill" tag=<>/> \end @@ -18,13 +18,13 @@ tags: $:/tags/Macro
    <$keyboard key="ENTER" actions=<>> -<$edit-text tiddler="$:/temp/NewTagName" tag="input" default="" placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} focusPopup=<> class="tc-edit-texteditor tc-popup-handle" tabindex=<> focus={{{ [{$:/config/AutoFocus}match[tags]then[true]] ~[[false]] }}}/> +<$edit-text tiddler=<> tag="input" default="" placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} focusPopup=<> class="tc-edit-texteditor tc-popup-handle" tabindex=<> focus={{{ [{$:/config/AutoFocus}match[tags]then[true]] ~[[false]] }}}/> <$button popup=<> class="tc-btn-invisible" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}} -<$set name="tag" value={{$:/temp/NewTagName}}> +<$set name="tag" value={{{ [get[text]] }}}> <$button set="$:/temp/NewTagName" setTo="" class=""> <> -<$action-deletetiddler $tiddler="$:/temp/NewTagName"/> +<$action-deletetiddler $tiddler=<>/> {{$:/language/EditTemplate/Tags/Add/Button}} @@ -33,15 +33,17 @@ tags: $:/tags/Macro
    <$reveal state=<> type="nomatch" text="" default="">
    -<$list filter="[{$:/temp/NewTagName}minlength{$:/config/Tags/MinLength}limit[1]]" emptyMessage="""
    {{$:/language/Search/Search/TooShort}}
    """ variable="listItem"> -<$list filter="[tags[]!is[system]search:title{$:/temp/NewTagName}sort[]]" variable="tag"> +<$set name="newTagName" value={{{ [get[text]] }}}> +<$list filter="[minlength{$:/config/Tags/MinLength}limit[1]]" emptyMessage="""
    {{$:/language/Search/Search/TooShort}}
    """ variable="listItem"> +<$list filter="[tags[]!is[system]search:titlesort[]]" variable="tag"> <>
    -<$list filter="[{$:/temp/NewTagName}minlength{$:/config/Tags/MinLength}limit[1]]" emptyMessage="""
    {{$:/language/Search/Search/TooShort}}
    """ variable="listItem"> -<$list filter="[tags[]is[system]search:title{$:/temp/NewTagName}sort[]]" variable="tag"> +<$list filter="[minlength{$:/config/Tags/MinLength}limit[1]]" emptyMessage="""
    {{$:/language/Search/Search/TooShort}}
    """ variable="listItem"> +<$list filter="[tags[]is[system]search:titlesort[]]" variable="tag"> <> +
    From 1cf2d0799d7027d58f4bdca857bc342dd778a330 Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Mon, 14 Oct 2019 15:54:47 +0200 Subject: [PATCH 45/53] Fix field-name input (#4322) --- core/ui/EditTemplate/fields.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/ui/EditTemplate/fields.tid b/core/ui/EditTemplate/fields.tid index 5368404a3..3a6613cb4 100644 --- a/core/ui/EditTemplate/fields.tid +++ b/core/ui/EditTemplate/fields.tid @@ -72,7 +72,7 @@ $value={{{ [get[text]] }}}/> < -<$edit-text tiddler="$:/temp/newfieldname" tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Name/Placeholder}} focusPopup=<> class="tc-edit-texteditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}} focus={{{ [{$:/config/AutoFocus}match[fields]then[true]] ~[[false]] }}}/> +<$edit-text tiddler=<> tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Name/Placeholder}} focusPopup=<> class="tc-edit-texteditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}} focus={{{ [{$:/config/AutoFocus}match[fields]then[true]] ~[[false]] }}}/>   <$button popup=<> class="tc-btn-invisible tc-btn-dropdown" tooltip={{$:/language/EditTemplate/Field/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Field/Dropdown/Caption}}>{{$:/core/images/down-arrow}}  <$reveal state=<> type="nomatch" text="" default=""> From 1bf8821bd84ac66de4c1623a63103cb6f0b73efb Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 17 Oct 2019 15:04:00 +0100 Subject: [PATCH 46/53] System icon: remove extraneous closing tag --- core/images/new-here-button.tid | 1 - 1 file changed, 1 deletion(-) diff --git a/core/images/new-here-button.tid b/core/images/new-here-button.tid index ce8fd31bd..333265220 100755 --- a/core/images/new-here-button.tid +++ b/core/images/new-here-button.tid @@ -10,5 +10,4 @@ tags: $:/tags/Image - \ No newline at end of file From 05a3e1ad36c2fb383dd4975a578f95e8a6c3f325 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 17 Oct 2019 18:07:13 +0100 Subject: [PATCH 47/53] Add language attribute to HTML tag --- core/templates/external-js/tiddlywiki5-external-js.html.tid | 2 +- core/templates/tiddlywiki5.html.tid | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/templates/external-js/tiddlywiki5-external-js.html.tid b/core/templates/external-js/tiddlywiki5-external-js.html.tid index f4747e308..31e583c6c 100644 --- a/core/templates/external-js/tiddlywiki5-external-js.html.tid +++ b/core/templates/external-js/tiddlywiki5-external-js.html.tid @@ -2,7 +2,7 @@ title: $:/core/templates/tiddlywiki5-external-js.html \rules only filteredtranscludeinline transcludeinline -{{$:/core/templates/MOTW.html}} +{{$:/core/templates/MOTW.html}} diff --git a/core/templates/tiddlywiki5.html.tid b/core/templates/tiddlywiki5.html.tid index 377e4fef5..ef5a7e1ea 100644 --- a/core/templates/tiddlywiki5.html.tid +++ b/core/templates/tiddlywiki5.html.tid @@ -2,7 +2,7 @@ title: $:/core/templates/tiddlywiki5.html <$set name="saveTiddlerAndShadowsFilter" filter="[subfilter] [subfilterplugintiddlers[]]"> ` -`{{$:/core/templates/MOTW.html}}` +`{{$:/core/templates/MOTW.html}}` From 6ca1e906591d4c6f63ad56d9d4931a012a346b17 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Fri, 18 Oct 2019 12:01:10 +0200 Subject: [PATCH 48/53] Fix #4327 table formatting problem introduced with normalize css 8.0.1 (#4328) --- themes/tiddlywiki/vanilla/base.tid | 3 +++ 1 file changed, 3 insertions(+) diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 4fb297615..5d96d1cc9 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -237,6 +237,9 @@ table { caption-side: bottom; margin-top: 1em; margin-bottom: 1em; + /* next 2 elements needed, since normalize 8.0.1 */ + border-collapse: collapse; + border-spacing: 0; } table th, table td { From 588af44d4c2da1ae7596f180de5c0a511ff398be Mon Sep 17 00:00:00 2001 From: donmor Date: Sat, 19 Oct 2019 18:44:18 +0800 Subject: [PATCH 49/53] Scale embedded videos and audios to fit their container (#3943) * Update videoparser.js * Update audioparser.js * Update videoparser.js * Update audioparser.js --- core/modules/parsers/audioparser.js | 3 ++- core/modules/parsers/videoparser.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/modules/parsers/audioparser.js b/core/modules/parsers/audioparser.js index a34a49398..95380bf80 100644 --- a/core/modules/parsers/audioparser.js +++ b/core/modules/parsers/audioparser.js @@ -17,7 +17,8 @@ var AudioParser = function(type,text,options) { type: "element", tag: "audio", attributes: { - controls: {type: "string", value: "controls"} + controls: {type: "string", value: "controls"}, + style: {type: "string", value: "width: 100%; object-fit: contain"} } }, src; diff --git a/core/modules/parsers/videoparser.js b/core/modules/parsers/videoparser.js index c0ab2d603..cbc56381f 100644 --- a/core/modules/parsers/videoparser.js +++ b/core/modules/parsers/videoparser.js @@ -17,7 +17,8 @@ var VideoParser = function(type,text,options) { type: "element", tag: "video", attributes: { - controls: {type: "string", value: "controls"} + controls: {type: "string", value: "controls"}, + style: {type: "string", value: "width: 100%; object-fit: contain"} } }, src; From 46c90af308015242fa0314d85f1524727e2aa7e5 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sun, 20 Oct 2019 10:45:27 +0100 Subject: [PATCH 50/53] 2nd attempt to fix overflowing content in vertical tabs Previously we'd tried to fix it with word-break: break-word, but that broke other things (see 81f1e6af4e5920c6ff41e7f08171bfddc1b26dfc). This overflow: auto approach appears to be best practice. --- themes/tiddlywiki/vanilla/base.tid | 1 + 1 file changed, 1 insertion(+) diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 5d96d1cc9..d747f7073 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -1816,6 +1816,7 @@ html body.tc-body.tc-single-tiddler-window { border-left: 1px solid <>; -webkit-flex: 1 0 70%; flex: 1 0 70%; + overflow: auto; } .tc-sidebar-lists .tc-tab-buttons { From 423a942a8f0dd5c25138bcb3a2a622fab0d490cb Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Sun, 20 Oct 2019 18:00:08 +0200 Subject: [PATCH 51/53] Fix newTagNameTiddler being undefined in ControlPanel (#4326) * fix newTagNameTiddler being undefined in ControlPanel * Update Basics.tid * prevent newTagNameTiddler being undefined * Update Basics.tid * Update tag-picker.tid * Update tag-picker.tid --- core/wiki/macros/tag-picker.tid | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/wiki/macros/tag-picker.tid b/core/wiki/macros/tag-picker.tid index ce7738df0..67194a147 100644 --- a/core/wiki/macros/tag-picker.tid +++ b/core/wiki/macros/tag-picker.tid @@ -14,7 +14,7 @@ tags: $:/tags/Macro \end -\define tag-picker() +\define tag-picker-inner()
    <$keyboard key="ENTER" actions=<>> @@ -48,3 +48,10 @@ tags: $:/tags/Macro
    \end +\define tag-picker() +<$list filter="[match[]]" emptyMessage=<>> +<$set name="newTagNameTiddler" value=<>> +<> + + +\end From 793d84bcb1bc52ee77c49090268dd242017cdaa9 Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Sun, 20 Oct 2019 19:08:19 +0200 Subject: [PATCH 52/53] Fix typos in tag-picker (#4336) ... sorry @Jermolene --- core/wiki/macros/tag-picker.tid | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/wiki/macros/tag-picker.tid b/core/wiki/macros/tag-picker.tid index 67194a147..ac125f068 100644 --- a/core/wiki/macros/tag-picker.tid +++ b/core/wiki/macros/tag-picker.tid @@ -49,9 +49,9 @@ tags: $:/tags/Macro
    \end \define tag-picker() -<$list filter="[match[]]" emptyMessage=<>> +<$list filter="[match[]]" emptyMessage=<>> <$set name="newTagNameTiddler" value=<>> -<> +<> \end From e114fed3f9e12fb7c25b1369d7d132a47a0b8db8 Mon Sep 17 00:00:00 2001 From: Nils-Hero Lindemann Date: Sun, 20 Oct 2019 19:22:22 +0200 Subject: [PATCH 53/53] Replace div with span in colour picker (#4333) --- core/wiki/macros/colour-picker.tid | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/wiki/macros/colour-picker.tid b/core/wiki/macros/colour-picker.tid index af74577e3..04f0c4b6f 100644 --- a/core/wiki/macros/colour-picker.tid +++ b/core/wiki/macros/colour-picker.tid @@ -15,7 +15,7 @@ $(colour-picker-update-recent)$ $actions$ -
    + \end @@ -44,7 +44,7 @@ $actions$ --- -<$edit-text tiddler="$:/config/ColourPicker/New" tag="input" default="" placeholder=""/> +<$edit-text tiddler="$:/config/ColourPicker/New" tag="input" default="" placeholder=""/> <$edit-text tiddler="$:/config/ColourPicker/New" type="color" tag="input"/> <$set name="colour-picker-value" value={{$:/config/ColourPicker/New}}> <$macrocall $name="colour-picker-inner" actions="""$actions$"""/>