From e9fb63affc53fabe158408d3a269af959034797b Mon Sep 17 00:00:00 2001 From: Galen Huntington Date: Tue, 21 Jan 2025 06:43:36 -0800 Subject: [PATCH 01/37] Sign CLA. (#8899) --- licenses/cla-individual.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/licenses/cla-individual.md b/licenses/cla-individual.md index 6f16cad99..e6c177766 100644 --- a/licenses/cla-individual.md +++ b/licenses/cla-individual.md @@ -605,3 +605,5 @@ Thomas E Tuoti, @well-noted, 2024/12/16 @opn, 2025/01/04 J. Ryan Stinnett, @jryans, 2025/01/04 + +Galen Huntington, @galenhuntington, 2025/01/19 From 9aed6a52488e4081e4e092aa4c5de940538d9d1e Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 23 Jan 2025 18:05:56 +0000 Subject: [PATCH 02/37] Update CI due to deprecation of actions/upload-artifact@v3 See https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/ --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75c3bb8d3..ed16d707d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "${{ env.NODE_VERSION }}" - run: "./bin/ci-test.sh" - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: playwright-report @@ -30,8 +30,8 @@ jobs: TW5_BUILD_MAIN_EDITION: "./editions/prerelease" TW5_BUILD_OUTPUT: "./output/prerelease" steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "${{ env.NODE_VERSION }}" - run: "./bin/ci-pre-build.sh" @@ -62,8 +62,8 @@ jobs: TW5_BUILD_OUTPUT: "./output" TW5_BUILD_ARCHIVE: "./output" steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "${{ env.NODE_VERSION }}" - run: "./bin/ci-pre-build.sh" From b04af8bf7ae04dc371d9c29d4c69bea2b23a9557 Mon Sep 17 00:00:00 2001 From: Galen Huntington Date: Thu, 23 Jan 2025 10:18:02 -0800 Subject: [PATCH 03/37] Bug fix: TTF extension was wrong. update font types, add OTF type. (#8898) * Bug fix: TTF extension was wrong. * Update font MIME types throughout; add font/otf. --- boot/boot.js | 7 ++++--- plugins/tiddlywiki/katex/files/tiddlywiki.files | 4 ++-- themes/tiddlywiki/starlight/arvo.woff.meta | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index ab403aa5a..7570dade5 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -2467,9 +2467,10 @@ $tw.boot.initStartup = function(options) { $tw.utils.registerFileType("image/vnd.microsoft.icon","base64",".ico",{flags:["image"]}); $tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]}); $tw.utils.registerFileType("application/wasm","base64",".wasm"); - $tw.utils.registerFileType("application/font-woff","base64",".woff"); - $tw.utils.registerFileType("application/x-font-ttf","base64",".woff"); - $tw.utils.registerFileType("application/font-woff2","base64",".woff2"); + $tw.utils.registerFileType("font/woff","base64",".woff"); + $tw.utils.registerFileType("font/woff2","base64",".woff2"); + $tw.utils.registerFileType("font/ttf","base64",".ttf"); + $tw.utils.registerFileType("font/otf","base64",".otf"); $tw.utils.registerFileType("audio/ogg","base64",".ogg"); $tw.utils.registerFileType("audio/mp4","base64",[".mp4",".m4a"]); $tw.utils.registerFileType("video/ogg","base64",[".ogm",".ogv",".ogg"]); diff --git a/plugins/tiddlywiki/katex/files/tiddlywiki.files b/plugins/tiddlywiki/katex/files/tiddlywiki.files index 6dd868a10..506a0f448 100644 --- a/plugins/tiddlywiki/katex/files/tiddlywiki.files +++ b/plugins/tiddlywiki/katex/files/tiddlywiki.files @@ -6,7 +6,7 @@ "isTiddlerFile": false, "fields": { "title": {"source": "filename", "prefix": "$:/plugins/tiddlywiki/katex/fonts/"}, - "type": "application/font-woff" + "type": "font/woff" } } ], @@ -37,4 +37,4 @@ "suffix": "})(require);\n" } ] -} \ No newline at end of file +} diff --git a/themes/tiddlywiki/starlight/arvo.woff.meta b/themes/tiddlywiki/starlight/arvo.woff.meta index 19b089408..97732f909 100644 --- a/themes/tiddlywiki/starlight/arvo.woff.meta +++ b/themes/tiddlywiki/starlight/arvo.woff.meta @@ -1,2 +1,2 @@ title: $:/themes/tiddlywiki/starlight/arvo.woff -type: application/font-woff +type: font/woff From 903d0fb8e12c5ef361dc816da3fa9d464de91e6a Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 23 Jan 2025 21:47:22 +0000 Subject: [PATCH 04/37] Update CI due to deprecation of actions/upload-artifact@v3 See https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/ --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75c3bb8d3..ed16d707d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "${{ env.NODE_VERSION }}" - run: "./bin/ci-test.sh" - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: playwright-report @@ -30,8 +30,8 @@ jobs: TW5_BUILD_MAIN_EDITION: "./editions/prerelease" TW5_BUILD_OUTPUT: "./output/prerelease" steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "${{ env.NODE_VERSION }}" - run: "./bin/ci-pre-build.sh" @@ -62,8 +62,8 @@ jobs: TW5_BUILD_OUTPUT: "./output" TW5_BUILD_ARCHIVE: "./output" steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "${{ env.NODE_VERSION }}" - run: "./bin/ci-pre-build.sh" From 0219af604bd3450d68a1ca96250c28db24b117bb Mon Sep 17 00:00:00 2001 From: Rhys-T <108157737+Rhys-T@users.noreply.github.com> Date: Thu, 23 Jan 2025 16:48:45 -0500 Subject: [PATCH 05/37] Sign the CLA (#8904) --- licenses/cla-individual.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/licenses/cla-individual.md b/licenses/cla-individual.md index e6c177766..f827a3f2b 100644 --- a/licenses/cla-individual.md +++ b/licenses/cla-individual.md @@ -607,3 +607,5 @@ Thomas E Tuoti, @well-noted, 2024/12/16 J. Ryan Stinnett, @jryans, 2025/01/04 Galen Huntington, @galenhuntington, 2025/01/19 + +@Rhys-T, 2025/01/23 From 94b325f41f778238fbbd550873723571801f43a4 Mon Sep 17 00:00:00 2001 From: Rhys-T <108157737+Rhys-T@users.noreply.github.com> Date: Sat, 25 Jan 2025 05:59:51 -0500 Subject: [PATCH 06/37] Fix: Don't set dirty flag when shadow tiddler changes (#8903) Adds `shadow` and `normal` flags to each entry in `changedTiddlers`, indicating whether the corresponding version of the tiddler has changed. Makes the saver handler ignore any changes that aren't flagged `normal`. Fixes #8902. --- core/modules/saver-handler.js | 6 ++++-- core/modules/startup/plugins.js | 2 +- core/modules/wiki.js | 5 ++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/core/modules/saver-handler.js b/core/modules/saver-handler.js index 23056bcc2..612613140 100644 --- a/core/modules/saver-handler.js +++ b/core/modules/saver-handler.js @@ -46,8 +46,10 @@ function SaverHandler(options) { // Filter the changes so that we only count changes to tiddlers that we care about var filteredChanges = self.filterFn.call(self.wiki,function(iterator) { $tw.utils.each(changes,function(change,title) { - var tiddler = self.wiki.getTiddler(title); - iterator(tiddler,title); + if(change.normal) { + var tiddler = self.wiki.getTiddler(title); + iterator(tiddler,title); + } }); }); // Adjust the number of changes diff --git a/core/modules/startup/plugins.js b/core/modules/startup/plugins.js index fc8ba9589..af354c38e 100644 --- a/core/modules/startup/plugins.js +++ b/core/modules/startup/plugins.js @@ -75,7 +75,7 @@ exports.startup = function() { $tw.wiki.unpackPluginTiddlers(); // Queue change events for the changed shadow tiddlers $tw.utils.each(Object.keys(changedShadowTiddlers),function(title) { - $tw.wiki.enqueueTiddlerEvent(title,changedShadowTiddlers[title]); + $tw.wiki.enqueueTiddlerEvent(title,changedShadowTiddlers[title], true); }); } } diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 620f4eccf..928a2e847 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -141,12 +141,15 @@ This method should be called after the changes it describes have been made to th title: Title of tiddler isDeleted: defaults to false (meaning the tiddler has been created or modified), true if the tiddler has been deleted + isShadow: defaults to false (meaning the change applies to the normal tiddler), + true if the tiddler being changed is a shadow tiddler */ -exports.enqueueTiddlerEvent = function(title,isDeleted) { +exports.enqueueTiddlerEvent = function(title,isDeleted,isShadow) { // Record the touch in the list of changed tiddlers this.changedTiddlers = this.changedTiddlers || Object.create(null); this.changedTiddlers[title] = this.changedTiddlers[title] || Object.create(null); this.changedTiddlers[title][isDeleted ? "deleted" : "modified"] = true; + this.changedTiddlers[title][isShadow ? "shadow" : "normal"] = true; // Increment the change count this.changeCount = this.changeCount || Object.create(null); if($tw.utils.hop(this.changeCount,title)) { From f02c9ebba3a95117baa8e55220ab79e18d84edef Mon Sep 17 00:00:00 2001 From: Saq Imtiaz Date: Sun, 26 Jan 2025 13:25:01 +0100 Subject: [PATCH 07/37] feat: support for avif images (#8911) --- boot/boot.js | 1 + core/modules/parsers/imageparser.js | 1 + 2 files changed, 2 insertions(+) diff --git a/boot/boot.js b/boot/boot.js index 7570dade5..2efa58b1d 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -2463,6 +2463,7 @@ $tw.boot.initStartup = function(options) { $tw.utils.registerFileType("image/webp","base64",".webp",{flags:["image"]}); $tw.utils.registerFileType("image/heic","base64",".heic",{flags:["image"]}); $tw.utils.registerFileType("image/heif","base64",".heif",{flags:["image"]}); + $tw.utils.registerFileType("image/avif","base64",".avif",{flags:["image"]}); $tw.utils.registerFileType("image/svg+xml","utf8",".svg",{flags:["image"]}); $tw.utils.registerFileType("image/vnd.microsoft.icon","base64",".ico",{flags:["image"]}); $tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]}); diff --git a/core/modules/parsers/imageparser.js b/core/modules/parsers/imageparser.js index a964a4ba8..d594803b2 100644 --- a/core/modules/parsers/imageparser.js +++ b/core/modules/parsers/imageparser.js @@ -40,6 +40,7 @@ exports["image/gif"] = ImageParser; exports["image/webp"] = ImageParser; exports["image/heic"] = ImageParser; exports["image/heif"] = ImageParser; +exports["image/avif"] = ImageParser; exports["image/x-icon"] = ImageParser; exports["image/vnd.microsoft.icon"] = ImageParser; From 42c22acba629030e3a016cd4a758a3cb17ac453a Mon Sep 17 00:00:00 2001 From: Saq Imtiaz Date: Mon, 27 Jan 2025 12:00:07 +0100 Subject: [PATCH 08/37] Cleans up cruft from edit widget (#8897) * chore: cleanup cruft from edit widget * chore: cleanup cruft from edit widget * chore: cleanup cruft from edit widget --- core/modules/widgets/edit.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/core/modules/widgets/edit.js b/core/modules/widgets/edit.js index eb7758e90..e4433e1da 100644 --- a/core/modules/widgets/edit.js +++ b/core/modules/widgets/edit.js @@ -43,15 +43,6 @@ EditWidget.prototype.execute = function() { // Get our parameters this.editTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler")); this.editField = this.getAttribute("field","text"); - this.editIndex = this.getAttribute("index"); - this.editClass = this.getAttribute("class"); - this.editPlaceholder = this.getAttribute("placeholder"); - this.editTabIndex = this.getAttribute("tabindex"); - this.editFocus = this.getAttribute("focus",""); - this.editCancelPopups = this.getAttribute("cancelPopups",""); - this.editInputActions = this.getAttribute("inputActions"); - this.editRefreshTitle = this.getAttribute("refreshTitle"); - this.editAutoComplete = this.getAttribute("autocomplete"); // Choose the appropriate edit widget this.editorType = this.getEditorType(); // Make the child widgets @@ -89,8 +80,8 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of */ EditWidget.prototype.refresh = function(changedTiddlers) { var changedAttributes = this.computeAttributes(); - // Refresh if an attribute has changed, or the type associated with the target tiddler has changed - if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || (this.getEditorType() !== this.editorType)) { + // Refresh if the editor type has changed + if(changedAttributes.tiddler || changedAttributes.field || (this.getEditorType() !== this.editorType)) { this.refreshSelf(); return true; } else { From b1843837ea2eecd26a8691d42517f447611bb31c Mon Sep 17 00:00:00 2001 From: Saq Imtiaz Date: Mon, 27 Jan 2025 12:00:26 +0100 Subject: [PATCH 09/37] Fixes unnecessary refresh in Genesis widget (#8895) * fix: handle attributes correctly in genesis widget * fix: handle attributes correctly in genesis widget --- core/modules/widgets/genesis.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/core/modules/widgets/genesis.js b/core/modules/widgets/genesis.js index 299be1e48..a527553ad 100644 --- a/core/modules/widgets/genesis.js +++ b/core/modules/widgets/genesis.js @@ -23,15 +23,21 @@ Inherit from the base widget class */ GenesisWidget.prototype = new Widget(); +GenesisWidget.prototype.computeAttributes = function(options) { + options = options || Object.create(null); + options.filterFn = function(name) { + // Only compute our own attributes which start with a single dollar + return name.charAt(0) === "$" && name.charAt(1) !== "$"; + } + return Widget.prototype.computeAttributes.call(this,options); +}; + /* Render this widget into the DOM */ GenesisWidget.prototype.render = function(parent,nextSibling) { this.parentDomNode = parent; - this.computeAttributes({filterFn: function(name) { - // Only compute our own attributes which start with a single dollar - return name.charAt(0) === "$" && name.charAt(1) !== "$"; - }}); + this.computeAttributes(); this.execute(); this.renderChildren(parent,nextSibling); }; From 67e8670c73a944c4c9dab8bb101704878c6ff4cc Mon Sep 17 00:00:00 2001 From: Leilei332 Date: Tue, 28 Jan 2025 00:45:26 +0800 Subject: [PATCH 10/37] Extend copy to clipborad function to support customized mime types (#8912) * Extend copy to clipborad function to support customized mime types * Remove function default parameter syntax * Add plainText option * Use plainText name * Set "text/plain" data only when it exists * Docs update * Docs update --- core/modules/startup/rootwidget.js | 5 +++-- core/modules/utils/dom/dom.js | 15 +++++++++++---- core/wiki/macros/copy-to-clipboard.tid | 18 ++++++++++-------- .../macros/copy-to-clipboard Macro.tid | 6 +++++- .../copy-to-clipboard Macro (Examples).tid | 10 ++++++++-- .../WidgetMessage_ tm-copy-to-clipboard.tid | 4 +++- 6 files changed, 40 insertions(+), 18 deletions(-) diff --git a/core/modules/startup/rootwidget.js b/core/modules/startup/rootwidget.js index d96d569c3..8496b48df 100644 --- a/core/modules/startup/rootwidget.js +++ b/core/modules/startup/rootwidget.js @@ -77,8 +77,9 @@ exports.startup = function() { $tw.rootWidget.addEventListener("tm-copy-to-clipboard",function(event) { $tw.utils.copyToClipboard(event.param,{ successNotification: event.paramObject && event.paramObject.successNotification, - failureNotification: event.paramObject && event.paramObject.failureNotification - }); + failureNotification: event.paramObject && event.paramObject.failureNotification, + plainText: event.paramObject && event.paramObject.plainText + },event.paramObject.type); }); // Install the tm-focus-selector message $tw.rootWidget.addEventListener("tm-focus-selector",function(event) { diff --git a/core/modules/utils/dom/dom.js b/core/modules/utils/dom/dom.js index 0b71e128c..5f33bbeea 100644 --- a/core/modules/utils/dom/dom.js +++ b/core/modules/utils/dom/dom.js @@ -268,9 +268,10 @@ exports.copyStyles = function(srcDomNode,dstDomNode) { /* Copy plain text to the clipboard on browsers that support it */ -exports.copyToClipboard = function(text,options) { - options = options || {}; - text = text || ""; +exports.copyToClipboard = function(text,options,type) { + var text = text || ""; + var options = options || {}; + var type = type || "text/plain"; var textArea = document.createElement("textarea"); textArea.style.position = "fixed"; textArea.style.top = 0; @@ -283,10 +284,16 @@ exports.copyToClipboard = function(text,options) { textArea.style.outline = "none"; textArea.style.boxShadow = "none"; textArea.style.background = "transparent"; - textArea.value = text; document.body.appendChild(textArea); textArea.select(); textArea.setSelectionRange(0,text.length); + textArea.addEventListener("copy",function(event) { + event.preventDefault(); + if (options.plainText) { + event.clipboardData.setData("text/plain",options.plainText); + } + event.clipboardData.setData(type,text); + }); var succeeded = false; try { succeeded = document.execCommand("copy"); diff --git a/core/wiki/macros/copy-to-clipboard.tid b/core/wiki/macros/copy-to-clipboard.tid index d05d014e2..f299cf955 100644 --- a/core/wiki/macros/copy-to-clipboard.tid +++ b/core/wiki/macros/copy-to-clipboard.tid @@ -3,9 +3,11 @@ tags: $:/tags/Macro \whitespace trim -\procedure copy-to-clipboard(src,class:"tc-btn-invisible",style) -<$button message="tm-copy-to-clipboard" - param=<> +\procedure copy-to-clipboard(src,class:"tc-btn-invisible",style,type:"text/plain",plain) +\procedure copy-to-clipboard-actions() +<$action-sendmessage $message="tm-copy-to-clipboard" $param=<> type=<> plainText=<>/> +\end copy-to-clipboard-actions +<$button actions=<> class=<> style=< - diff --git a/editions/translators/tiddlers/Extracting Translations.tid b/editions/translators/tiddlers/Extracting Translations.tid index 3fe559e10..c29d7a40e 100644 --- a/editions/translators/tiddlers/Extracting Translations.tid +++ b/editions/translators/tiddlers/Extracting Translations.tid @@ -12,7 +12,6 @@ Use this procedure if the language being submitted is not already present in the # Create the new language folder `languages/xx-XX` # Copy the language files into the language folder # Create a `plugin.info` file for the translation -# Create an appropriate flag image in `icon.tid` # Add the new language to tw5.com # Submit a pull request diff --git a/editions/tw5.com/tiddlers/images/external/tiddlywiki.files b/editions/tw5.com/tiddlers/images/external/tiddlywiki.files deleted file mode 100644 index 340199e41..000000000 --- a/editions/tw5.com/tiddlers/images/external/tiddlywiki.files +++ /dev/null @@ -1,202 +0,0 @@ -{ - "tiddlers": [ - { - "file": "../../../../../languages/ca-ES/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: ca-ES", - "language": "ca-ES", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/cs-CZ/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: cs-CZ", - "language": "cs-CZ", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/da-DK/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: da-DK", - "language": "da-DK", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/de-AT/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: de-AT", - "language": "de-AT", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/de-DE/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: de-DE", - "language": "de-DE", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/el-GR/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: el-GR", - "language": "el-GR", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/en-US/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: en-US", - "language": "en-US", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/es-ES/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: es-ES", - "language": "es-ES", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/fr-FR/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: fr-FR", - "language": "fr-FR", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/hi-IN/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: hi-IN", - "language": "hi-IN", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/ia-IA/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: ia-IA", - "language": "ia-IA", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/it-IT/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: it-IT", - "language": "it-IT", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/ja-JP/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: ja-JP", - "language": "ja-JP", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/ko-KR/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: ko-KR", - "language": "ko-KR", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/nl-NL/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: nl-NL", - "language": "nl-NL", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/pa-IN/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: pa-IN", - "language": "pa-IN", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/pt-PT/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: pt-PT", - "language": "pt-PT", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/ru-RU/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: ru-RU", - "language": "ru-RU", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/sk-SK/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: sk-SK", - "language": "sk-SK", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/sv-SE/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: sv-SE", - "language": "sv-SE", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/zh-Hans/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: zh-Hans", - "language": "zh-Hans", - "tags": "Language Icon" - } - }, - { - "file": "../../../../../languages/zh-Hant/icon.tid", - "isTiddlerFile": true, - "fields": { - "title": "Language Icon: zh-Hant", - "language": "zh-Hant", - "tags": "Language Icon" - } - } - ] -} diff --git a/editions/tw5.com/tiddlers/languages/LanguageGallery.tid b/editions/tw5.com/tiddlers/languages/LanguageGallery.tid deleted file mode 100644 index cdb972095..000000000 --- a/editions/tw5.com/tiddlers/languages/LanguageGallery.tid +++ /dev/null @@ -1,25 +0,0 @@ -created: 20151231083708980 -modified: 20211117212723856 -tags: Languages -title: LanguageGallery Example -type: text/vnd.tiddlywiki - -Here is an example of using the ListWidget and the TranscludeWidget to show a grid of all of Language Icons which are tiddlers [[tagged|Tagging]] <>and <> - - - diff --git a/languages/ar-PS/icon.tid b/languages/ar-PS/icon.tid deleted file mode 100644 index fecb187cd..000000000 --- a/languages/ar-PS/icon.tid +++ /dev/null @@ -1,7 +0,0 @@ -created: 20200618172251289 -modified: 20200618172321223 -tags: -title: $:/languages/ar-PS/icon -type: image/svg+xml - - diff --git a/languages/ca-ES/icon.tid b/languages/ca-ES/icon.tid deleted file mode 100644 index 264124da3..000000000 --- a/languages/ca-ES/icon.tid +++ /dev/null @@ -1,8 +0,0 @@ -title: $:/languages/ca-ES/icon -type: image/svg+xml - - - - - - \ No newline at end of file diff --git a/languages/cs-CZ/icon.tid b/languages/cs-CZ/icon.tid deleted file mode 100644 index 4246c25db..000000000 --- a/languages/cs-CZ/icon.tid +++ /dev/null @@ -1,9 +0,0 @@ -title: $:/languages/cs-CZ/icon -type: image/svg+xml - - - - - - - diff --git a/languages/da-DK/icon.tid b/languages/da-DK/icon.tid deleted file mode 100644 index 955f38a94..000000000 --- a/languages/da-DK/icon.tid +++ /dev/null @@ -1,9 +0,0 @@ -title: $:/languages/da-DK/icon -type: image/svg+xml - - - - - - - diff --git a/languages/de-AT/icon.tid b/languages/de-AT/icon.tid deleted file mode 100644 index a0b4315b0..000000000 --- a/languages/de-AT/icon.tid +++ /dev/null @@ -1,8 +0,0 @@ -title: $:/languages/de-AT/icon -type: image/svg+xml - - - - - - \ No newline at end of file diff --git a/languages/de-DE/icon.tid b/languages/de-DE/icon.tid deleted file mode 100644 index 4847c1df0..000000000 --- a/languages/de-DE/icon.tid +++ /dev/null @@ -1,12 +0,0 @@ -title: $:/languages/de-DE/icon -type: image/svg+xml - - - - - Flag of Germany - - - - diff --git a/languages/el-GR/icon.tid b/languages/el-GR/icon.tid deleted file mode 100644 index 787a5f6ad..000000000 --- a/languages/el-GR/icon.tid +++ /dev/null @@ -1,8 +0,0 @@ -title: $:/languages/el-GR/icon -type: image/svg+xml - - - Flag of Greece - - - \ No newline at end of file diff --git a/languages/en-PH/icon.tid b/languages/en-PH/icon.tid deleted file mode 100644 index c664ed2f0..000000000 --- a/languages/en-PH/icon.tid +++ /dev/null @@ -1,21 +0,0 @@ -title: $:/languages/en-PH/icon -type: image/svg+xml - - - Flag of the Philippines - - - - - - - - - - - - - - - - diff --git a/languages/en-US/icon.tid b/languages/en-US/icon.tid deleted file mode 100644 index 78681f521..000000000 --- a/languages/en-US/icon.tid +++ /dev/null @@ -1,29 +0,0 @@ -title: $:/languages/en-US/icon -type: image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/languages/es-ES/icon.tid b/languages/es-ES/icon.tid deleted file mode 100644 index 092788da7..000000000 --- a/languages/es-ES/icon.tid +++ /dev/null @@ -1,409 +0,0 @@ -title: $:/languages/es-ES/icon -type: image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/languages/fa-IR/icon.tid b/languages/fa-IR/icon.tid deleted file mode 100644 index 70e605629..000000000 --- a/languages/fa-IR/icon.tid +++ /dev/null @@ -1,14 +0,0 @@ -title: $:/languages/fa-IR/icon -type: image/svg+xml - - - - - - - - \ No newline at end of file diff --git a/languages/fr-FR/icon.tid b/languages/fr-FR/icon.tid deleted file mode 100644 index a7ec4d9d0..000000000 --- a/languages/fr-FR/icon.tid +++ /dev/null @@ -1,5 +0,0 @@ -title: $:/languages/fr-FR/icon -type: image/svg+xml - - - diff --git a/languages/he-IL/icon.tid b/languages/he-IL/icon.tid deleted file mode 100644 index c18b4a158..000000000 --- a/languages/he-IL/icon.tid +++ /dev/null @@ -1,38 +0,0 @@ -title: $:/languages/he-IL/icon -type: image/svg+xml - - - - - Flag of Israel - - - - - - - - - - - - diff --git a/languages/hi-IN/icon.tid b/languages/hi-IN/icon.tid deleted file mode 100644 index 4db8115ff..000000000 --- a/languages/hi-IN/icon.tid +++ /dev/null @@ -1,4 +0,0 @@ -title: $:/languages/hi-IN/icon -type: image/svg+xml - - \ No newline at end of file diff --git a/languages/ia-IA/icon.tid b/languages/ia-IA/icon.tid deleted file mode 100644 index 72eff65ed..000000000 --- a/languages/ia-IA/icon.tid +++ /dev/null @@ -1,13 +0,0 @@ -title: $:/languages/ia-IA/icon -type: image/svg+xml - - - - - Interlingua Logo - Created with Sketch. - - - - - \ No newline at end of file diff --git a/languages/it-IT/icon.tid b/languages/it-IT/icon.tid deleted file mode 100644 index 157744a52..000000000 --- a/languages/it-IT/icon.tid +++ /dev/null @@ -1,32 +0,0 @@ -title: $:/languages/it-IT/icon -type: image/svg+xml - - - - - Bandiera della Repubblica Italiana PMS 20060414 - - - - - \ No newline at end of file diff --git a/languages/ja-JP/icon.tid b/languages/ja-JP/icon.tid deleted file mode 100644 index 56a7d6efb..000000000 --- a/languages/ja-JP/icon.tid +++ /dev/null @@ -1,9 +0,0 @@ -title: $:/languages/ja-JP/icon -type: image/svg+xml - - - - - - - \ No newline at end of file diff --git a/languages/ko-KR/icon.tid b/languages/ko-KR/icon.tid deleted file mode 100644 index 83eda5287..000000000 --- a/languages/ko-KR/icon.tid +++ /dev/null @@ -1,15 +0,0 @@ -title: $:/languages/ko-KR/icon -type: image/svg+xml - - - -Flag of South Korea - - - - - - - - - \ No newline at end of file diff --git a/languages/mk-MK/icon.tid b/languages/mk-MK/icon.tid deleted file mode 100644 index 20525ace9..000000000 --- a/languages/mk-MK/icon.tid +++ /dev/null @@ -1,8 +0,0 @@ -title: $:/languages/mk-MK/icon -type: image/svg+xml - - - - - - diff --git a/languages/nl-NL/icon.tid b/languages/nl-NL/icon.tid deleted file mode 100644 index 9cb61ccea..000000000 --- a/languages/nl-NL/icon.tid +++ /dev/null @@ -1,9 +0,0 @@ -title: $:/languages/nl-NL/icon -type: image/svg+xml - - - - - - - \ No newline at end of file diff --git a/languages/pa-IN/icon.tid b/languages/pa-IN/icon.tid deleted file mode 100644 index 2efc09d0f..000000000 --- a/languages/pa-IN/icon.tid +++ /dev/null @@ -1,4 +0,0 @@ -title: $:/languages/pa-IN/icon -type: image/svg+xml - - \ No newline at end of file diff --git a/languages/pl-PL/icon.tid b/languages/pl-PL/icon.tid deleted file mode 100644 index 0cecbb24a..000000000 --- a/languages/pl-PL/icon.tid +++ /dev/null @@ -1,7 +0,0 @@ -title: $:/languages/pl-PL/icon -type: image/svg+xml - - - - - \ No newline at end of file diff --git a/languages/pt-BR/icon.tid b/languages/pt-BR/icon.tid deleted file mode 100644 index 28daecd9c..000000000 --- a/languages/pt-BR/icon.tid +++ /dev/null @@ -1,54 +0,0 @@ -title: $:/languages/pt-BR/icon -type: image/svg+xml - - -image/svg+xml \ No newline at end of file diff --git a/languages/pt-PT/icon.tid b/languages/pt-PT/icon.tid deleted file mode 100644 index 8c1589513..000000000 --- a/languages/pt-PT/icon.tid +++ /dev/null @@ -1,70 +0,0 @@ -title: $:/languages/pt-PT/icon -type: image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/languages/ru-RU/icon.tid b/languages/ru-RU/icon.tid deleted file mode 100644 index 3ea67a7b2..000000000 --- a/languages/ru-RU/icon.tid +++ /dev/null @@ -1,10 +0,0 @@ -title: $:/languages/ru-RU/icon -type: image/svg+xml - - - - - - - - \ No newline at end of file diff --git a/languages/sk-SK/icon.tid b/languages/sk-SK/icon.tid deleted file mode 100644 index 626942b82..000000000 --- a/languages/sk-SK/icon.tid +++ /dev/null @@ -1,17 +0,0 @@ -title: $:/languages/sk-SK/icon -type: image/svg+xml - - - -Flag of Slovakia - - - - - - - - - - - \ No newline at end of file diff --git a/languages/sl-SI/icon.tid b/languages/sl-SI/icon.tid deleted file mode 100644 index b3b8d0584..000000000 --- a/languages/sl-SI/icon.tid +++ /dev/null @@ -1,28 +0,0 @@ -title: $:/languages/sl-SI/icon -type: image/svg+xml - - - - - Flag of Slovenia - - - - - - - - - - - - - - - - - - - - - diff --git a/languages/sv-SE/icon.tid b/languages/sv-SE/icon.tid deleted file mode 100755 index e8e16a6ae..000000000 --- a/languages/sv-SE/icon.tid +++ /dev/null @@ -1,8 +0,0 @@ -title: $:/languages/sv-SE/icon -type: image/svg+xml - - - - - - \ No newline at end of file diff --git a/languages/zh-CN/icon.tid b/languages/zh-CN/icon.tid deleted file mode 100644 index 29cb7b9f1..000000000 --- a/languages/zh-CN/icon.tid +++ /dev/null @@ -1,18 +0,0 @@ -title: $:/languages/zh-CN/icon -type: image/svg+xml - - - - -Flag of the People's Republic of China - - - - - - - - - - diff --git a/languages/zh-HK/icon.tid b/languages/zh-HK/icon.tid deleted file mode 100644 index 38c8ff096..000000000 --- a/languages/zh-HK/icon.tid +++ /dev/null @@ -1,16 +0,0 @@ -title: $:/languages/zh-HK/icon -type: image/svg+xml - - - - - - - - - - - - - - \ No newline at end of file diff --git a/languages/zh-Hans/icon.tid b/languages/zh-Hans/icon.tid deleted file mode 100644 index ba8400636..000000000 --- a/languages/zh-Hans/icon.tid +++ /dev/null @@ -1,18 +0,0 @@ -title: $:/languages/zh-Hans/icon -type: image/svg+xml - - - - -Flag of the People's Republic of China - - - - - - - - - - diff --git a/languages/zh-Hant/icon.tid b/languages/zh-Hant/icon.tid deleted file mode 100644 index 97c8f6ab4..000000000 --- a/languages/zh-Hant/icon.tid +++ /dev/null @@ -1,14 +0,0 @@ -title: $:/languages/zh-Hant/icon -type: image/svg+xml - - - - - - - - - - - - \ No newline at end of file diff --git a/languages/zh-TW/icon.tid b/languages/zh-TW/icon.tid deleted file mode 100644 index 5db3cae30..000000000 --- a/languages/zh-TW/icon.tid +++ /dev/null @@ -1,14 +0,0 @@ -title: $:/languages/zh-TW/icon -type: image/svg+xml - - - - - - - - - - - - \ No newline at end of file From 0f79f88f5897296de67148ee0bba0416fa8af607 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Mon, 24 Feb 2025 21:49:48 +0100 Subject: [PATCH 36/37] Fix problem toc-selective-expandable (#8959) fix problem toc-selective-expandable --- core/wiki/macros/toc.tid | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/wiki/macros/toc.tid b/core/wiki/macros/toc.tid index 2bbc4f6fc..4238c3a46 100644 --- a/core/wiki/macros/toc.tid +++ b/core/wiki/macros/toc.tid @@ -1,7 +1,6 @@ title: $:/core/macros/toc tags: $:/tags/Macro - \define toc-open-icon() $:/core/images/down-arrow \define toc-closed-icon() $:/core/images/right-arrow @@ -121,7 +120,7 @@ tags: $:/tags/Macro <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item" >
  • >> <$link to={{{ [get[target]else] }}}> - <$list filter="[all[current]tagging[]$sort$limit[1]] -[subfilter<__exclude__>]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}"> + <$list filter="[all[current]tagging[]$sort$] -[subfilter<__exclude__>] +[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"> <$transclude tiddler=<> /> @@ -148,7 +147,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[]$sort$limit[1]] -[subfilter<__exclude__>]" variable="ignore" emptyMessage="""<$button class="tc-btn-invisible">{{$:/core/images/blank}}<>"""> + <$list filter="[all[current]tagging[]$sort$] -[subfilter<__exclude__>] +[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"> <$transclude tiddler=<> /> From 0dda07e3f194f344af7665b6d7fb7fca8970bccb Mon Sep 17 00:00:00 2001 From: Cameron Fischer Date: Thu, 27 Feb 2025 13:02:43 -0500 Subject: [PATCH 37/37] Fix for #5930: missing tiddlers with checkbox indexes (#8964) --- core/modules/widgets/checkbox.js | 2 +- .../tiddlers/tests/test-checkbox-widget.js | 28 +++++++++++++++---- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/core/modules/widgets/checkbox.js b/core/modules/widgets/checkbox.js index bf0a7bb79..9d3a07414 100644 --- a/core/modules/widgets/checkbox.js +++ b/core/modules/widgets/checkbox.js @@ -157,7 +157,7 @@ CheckboxWidget.prototype.getValue = function() { if(this.checkboxTag) { return false; } - if(this.checkboxField) { + if(this.checkboxField || this.checkboxIndex) { if(this.checkboxDefault === this.checkboxChecked) { return true; } diff --git a/editions/test/tiddlers/tests/test-checkbox-widget.js b/editions/test/tiddlers/tests/test-checkbox-widget.js index f42a269a9..936f69338 100644 --- a/editions/test/tiddlers/tests/test-checkbox-widget.js +++ b/editions/test/tiddlers/tests/test-checkbox-widget.js @@ -78,6 +78,13 @@ Tests the checkbox widget thoroughly. startsOutChecked: false, expectedChange: { "TiddlerOne": { expand: "yes" } } }, + { + testName: "field mode default when missing -> true", + tiddlers: [], + widgetText: "<$checkbox tiddler='TiddlerOne' field='expand' default='yes' checked='yes' unchecked='no' />", + startsOutChecked: true, + expectedChange: { "TiddlerOne": { expand: "no" } } + }, { testName: "field mode indeterminate -> true", tiddlers: [{title: "TiddlerOne", text: "Jolly Old World", expand: "some other value"}], @@ -98,19 +105,28 @@ Tests the checkbox widget thoroughly. var indexModeTests = fieldModeTests.map(data => { var newData = {...data}; var newName = data.testName.replace('field mode', 'index mode'); + var tiddlerOneAlreadyExists = false; var newTiddlers = data.tiddlers.map(tiddler => { + if(tiddler.title === "TiddlerOne") { + tiddlerOneAlreadyExists = true; + } return {title: tiddler.title, type: "application/x-tiddler-dictionary", text: `one: a\nexpand: ${tiddler.expand}\ntwo: b`} }); var newWidgetText = data.widgetText.replace("field='expand'", "index='expand'"); var newChange = {}; for (var key of Object.keys(data.expectedChange)) { var oldChange = data.expectedChange[key]; - if (oldChange.expand) { - newChange[key] = { text: `one: a\nexpand: ${oldChange.expand}\ntwo: b` } + var text; + if (!tiddlerOneAlreadyExists) { + // If it wasn't there, the created one will be JSON + text = `{\n "expand": "${oldChange.expand}"\n}`; + } else if (oldChange.expand) { + text = `one: a\nexpand: ${oldChange.expand}\ntwo: b`; } else { // In index tiddlers, the "expand" field gets completely removed, not turned into "expand: (undefined)" - newChange[key] = { text: `one: a\ntwo: b` } + text = `one: a\ntwo: b`; } + newChange[key] = { text: text }; } newData.testName = newName; newData.tiddlers = newTiddlers; @@ -514,7 +530,9 @@ Tests the checkbox widget thoroughly. /* * Checkbox widget tests using the test data above */ - for (var data of checkboxTestData) { + // MAKE SURE TO USE $tw.utils.each HERE!!! + // If you use a forloop, the closure of the tests will all use the last value "data" was assigned to, and thus all run the same test. + $tw.utils.each(checkboxTestData, function(data) { it('checkbox widget test: ' + data.testName, function() { // Setup @@ -553,7 +571,7 @@ Tests the checkbox widget thoroughly. } } }) - } + }); });