diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids index a1b164c5c..7adf4aa04 100644 --- a/core/language/en-GB/ControlPanel.multids +++ b/core/language/en-GB/ControlPanel.multids @@ -96,6 +96,10 @@ Plugins/PluginWillRequireReload: (requires reload) Plugins/Plugins/Caption: Plugins Plugins/Plugins/Hint: Plugins Plugins/Reinstall/Caption: reinstall +Plugins/Stability/Deprecated: DEPRECATED +Plugins/Stability/Experimental: EXPERIMENTAL +Plugins/Stability/Legacy: LEGACY +Plugins/Stability/Stable: STABLE Plugins/Themes/Caption: Themes Plugins/Themes/Hint: Theme plugins Plugins/Update/Caption: update diff --git a/core/language/en-GB/EditTemplate.multids b/core/language/en-GB/EditTemplate.multids index c4bfa5e56..9b61f71ec 100644 --- a/core/language/en-GB/EditTemplate.multids +++ b/core/language/en-GB/EditTemplate.multids @@ -26,6 +26,7 @@ Tags/ClearInput/Caption: clear input Tags/ClearInput/Hint: Clear tag input Tags/Dropdown/Caption: tag list Tags/Dropdown/Hint: Show tag list +Tags/EmptyMessage: (no search result) Title/BadCharacterWarning: Warning: avoid using any of the characters <> in tiddler titles Title/Exists/Prompt: Target tiddler already exists Title/Relink/Prompt: Update ''<$text text=<>/>'' to ''<$text text=<>/>'' in the //tags// and //list// fields of other tiddlers diff --git a/core/language/en-GB/Misc.multids b/core/language/en-GB/Misc.multids index d8c091375..2a771e090 100644 --- a/core/language/en-GB/Misc.multids +++ b/core/language/en-GB/Misc.multids @@ -42,7 +42,7 @@ Error/RetrievingSkinny: Error retrieving skinny tiddler list Error/SavingToTWEdit: Error saving to TWEdit Error/WhileSaving: Error while saving Error/XMLHttpRequest: XMLHttpRequest error code -Error/ZoominTextNode: Story View Error: It appears you tried to interact with a tiddler that displays in a custom container. This is most likely caused by using `$:/tags/StoryTiddlerTemplateFilter` with a template that contains text or whitespace at the start. Please use the pragma `\whitespace trim` and ensure the whole contents of the tiddler is wrapped in a single HTML element. The text that caused this issue: +Error/ZoominTextNode: Błąd Widoku: Wykryto błędną interakcję z tiddlerem, który wyświetlany jest w niestandardowym kontenerze. Jest to najprawdopodobniej spowodowane użyciem `$:/tags/StoryTiddlerTemplateFilter` z motywem, który ma tekst lub białe znaki na początku. Użyj pragmy `\whitespace trim` i upewnij się, że cała treść tiddlera opakowana jest w jeden element HTML. Tekst, który spowodał problem: InternalJavaScriptError/Title: Internal JavaScript Error InternalJavaScriptError/Hint: Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser LayoutSwitcher/Description: Open the layout switcher diff --git a/core/language/en-GB/Search.multids b/core/language/en-GB/Search.multids index 2a57a6416..f5aa478bf 100644 --- a/core/language/en-GB/Search.multids +++ b/core/language/en-GB/Search.multids @@ -6,6 +6,8 @@ Filter/Hint: Search via a [[filter expression|https://tiddlywiki.com/static/Filt Filter/Matches: //<> matches// Matches: //<> matches// Matches/All: All matches: +Matches/NoMatch: //No match// +Matches/NoResult: //No search result// Matches/Title: Title matches: Search: Search Search/TooShort: Search text too short diff --git a/core/modules/editor/operations/text/excise.js b/core/modules/editor/operations/text/excise.js index 8cb3a8486..bb5840c2e 100644 --- a/core/modules/editor/operations/text/excise.js +++ b/core/modules/editor/operations/text/excise.js @@ -12,9 +12,14 @@ Text editor operation to excise the selection to a new tiddler /*global $tw: false */ "use strict"; +function isMarkdown(mediaType) { + return mediaType === 'text/markdown' || mediatype === 'text/x-markdown'; +} + exports["excise"] = function(event,operation) { var editTiddler = this.wiki.getTiddler(this.editTitle), editTiddlerTitle = this.editTitle, + wikiLinks = !isMarkdown(editTiddler.fields.type), excisionBaseTitle = $tw.language.getString("Buttons/Excise/DefaultTitle"); if(editTiddler && editTiddler.fields["draft.of"]) { editTiddlerTitle = editTiddler.fields["draft.of"]; @@ -26,7 +31,8 @@ exports["excise"] = function(event,operation) { { title: excisionTitle, text: operation.selection, - tags: event.paramObject.tagnew === "yes" ? [editTiddlerTitle] : [] + tags: event.paramObject.tagnew === "yes" ? [editTiddlerTitle] : [], + type: editTiddler.fields.type } )); operation.replacement = excisionTitle; @@ -35,7 +41,8 @@ exports["excise"] = function(event,operation) { operation.replacement = "{{" + operation.replacement+ "}}"; break; case "link": - operation.replacement = "[[" + operation.replacement+ "]]"; + operation.replacement = wikiLinks ? "[[" + operation.replacement+ "]]" + : ("[" + operation.replacement + "](<#" + operation.replacement + ">)"); break; case "macro": operation.replacement = "<<" + (event.paramObject.macro || "translink") + " \"\"\"" + operation.replacement + "\"\"\">>"; diff --git a/core/modules/editor/operations/text/wrap-selection.js b/core/modules/editor/operations/text/wrap-selection.js index 6800cbe5b..665d72eb4 100644 --- a/core/modules/editor/operations/text/wrap-selection.js +++ b/core/modules/editor/operations/text/wrap-selection.js @@ -13,37 +13,125 @@ Text editor operation to wrap the selection with the specified prefix and suffix "use strict"; exports["wrap-selection"] = function(event,operation) { - if(operation.selStart === operation.selEnd) { - // No selection; check if we're within the prefix/suffix - if(operation.text.substring(operation.selStart - event.paramObject.prefix.length,operation.selStart + event.paramObject.suffix.length) === event.paramObject.prefix + event.paramObject.suffix) { + var o = operation, + prefix = event.paramObject.prefix, + suffix = event.paramObject.suffix, + trimSelection = event.paramObject.trimSelection || "no", + selLength = o.selEnd - o.selStart; + + // This function detects, if trailing spaces are part of the selection __and__ if the user wants to handle them + // Returns "yes", "start", "end", "no" (default) + // yes .. there are trailing spaces at both ends + // start .. there are trailing spaces at the start + // end .. there are trailing spaces at the end + // no .. no trailing spaces are taken into account + var trailingSpaceAt = function(sel) { + var _start, + _end, + result; + // trimSelection is a user parameter, which this evaluations takes into account + switch(trimSelection) { + case "end": + result = (sel.trimEnd().length !== selLength) ? "end" : "no"; + break; + case "yes": + _start = sel.trimStart().length !== selLength; + _end = sel.trimEnd().length !== selLength; + result = (_start && _end) ? "yes" : (_start) ? "start" : (_end) ? "end" : "no"; + break; + case "start": + result = (sel.trimStart().length !== selLength) ? "start" : "no"; + break; + default: + result = "no"; + break; + } + return result; + } + + function togglePrefixSuffix() { + if(o.text.substring(o.selStart - prefix.length, o.selStart + suffix.length) === prefix + suffix) { // Remove the prefix and suffix - operation.cutStart = operation.selStart - event.paramObject.prefix.length; - operation.cutEnd = operation.selEnd + event.paramObject.suffix.length; - operation.replacement = ""; - operation.newSelStart = operation.cutStart; - operation.newSelEnd = operation.newSelStart; + o.cutStart = o.selStart - prefix.length; + o.cutEnd = o.selEnd + suffix.length; + o.replacement = ""; + o.newSelStart = o.cutStart; + o.newSelEnd = o.newSelStart; } else { // Wrap the cursor instead - operation.cutStart = operation.selStart; - operation.cutEnd = operation.selEnd; - operation.replacement = event.paramObject.prefix + event.paramObject.suffix; - operation.newSelStart = operation.selStart + event.paramObject.prefix.length; - operation.newSelEnd = operation.newSelStart; + o.cutStart = o.selStart; + o.cutEnd = o.selEnd; + o.replacement = prefix + suffix; + o.newSelStart = o.selStart + prefix.length; + o.newSelEnd = o.newSelStart; } - } else if(operation.text.substring(operation.selStart,operation.selStart + event.paramObject.prefix.length) === event.paramObject.prefix && operation.text.substring(operation.selEnd - event.paramObject.suffix.length,operation.selEnd) === event.paramObject.suffix) { + } + + // options: lenPrefix, lenSuffix + function removePrefixSuffix(options) { + options = options || {}; + var _lenPrefix = options.lenPrefix || 0; + var _lenSuffix = options.lenSuffix || 0; + + o.cutStart = o.selStart - _lenPrefix; + o.cutEnd = o.selEnd + _lenSuffix; + o.replacement = (_lenPrefix || _lenSuffix) ? o.selection : o.selection.substring(prefix.length, o.selection.length - suffix.length); + o.newSelStart = o.cutStart; + o.newSelEnd = o.cutStart + o.replacement.length; + } + + function addPrefixSuffix() { + // remove trailing space if requested + switch(trailingSpaceAt(o.selection)) { + case "no": + // has no trailing spaces + o.cutStart = o.selStart; + o.cutEnd = o.selEnd; + o.replacement = prefix + o.selection + suffix; + o.newSelStart = o.selStart; + o.newSelEnd = o.selStart + o.replacement.length; + break; + case "yes": + // handle both ends + o.cutStart = o.selEnd - (o.selection.trimStart().length); + o.cutEnd = o.selection.trimEnd().length + o.selStart; + o.replacement = prefix + o.selection.trim() + suffix; + o.newSelStart = o.cutStart; + o.newSelEnd = o.cutStart + o.replacement.length; + break; + case "start": + // handle leading + o.cutStart = o.selEnd - (o.selection.trimStart().length); + o.cutEnd = o.selEnd; + o.replacement = prefix + o.selection.trimStart() + suffix; + o.newSelStart = o.cutStart; + o.newSelEnd = o.cutStart + o.replacement.length; + break; + case "end": + // handle trailing + o.cutStart = o.selStart; + o.cutEnd = o.selection.trimEnd().length + o.selStart; + o.replacement = prefix + o.selection.trimEnd() + suffix; + o.newSelStart = o.selStart; + o.newSelEnd = o.selStart + o.replacement.length; + break; + } + } + + if(o.selStart === o.selEnd) { + // No selection; Create prefix and suffix. Set cursor in between them: ""|"" + togglePrefixSuffix(); + } else if(o.text.substring(o.selStart, o.selStart + prefix.length) === prefix && + o.text.substring(o.selEnd - suffix.length,o.selEnd) === suffix) { // Prefix and suffix are already present, so remove them - operation.cutStart = operation.selStart; - operation.cutEnd = operation.selEnd; - operation.replacement = operation.selection.substring(event.paramObject.prefix.length,operation.selection.length - event.paramObject.suffix.length); - operation.newSelStart = operation.selStart; - operation.newSelEnd = operation.selStart + operation.replacement.length; + removePrefixSuffix(); + } else if(o.text.substring(o.selStart - prefix.length, o.selStart) === prefix && + o.text.substring(o.selEnd, o.selEnd + suffix.length) === suffix) { + // Prefix and suffix are present BUT not selected -> remove them + removePrefixSuffix({"lenPrefix": prefix.length, "lenSuffix": suffix.length}); } else { // Add the prefix and suffix - operation.cutStart = operation.selStart; - operation.cutEnd = operation.selEnd; - operation.replacement = event.paramObject.prefix + operation.selection + event.paramObject.suffix; - operation.newSelStart = operation.selStart; - operation.newSelEnd = operation.selStart + operation.replacement.length; + addPrefixSuffix(); } }; diff --git a/core/modules/filters/encodings.js b/core/modules/filters/encodings.js index a43a15f76..231e4d119 100644 --- a/core/modules/filters/encodings.js +++ b/core/modules/filters/encodings.js @@ -18,8 +18,8 @@ Export our filter functions exports.decodebase64 = function(source,operator,options) { var results = []; - var binary = operator.suffixes && operator.suffixes.indexOf("binary") !== -1; - var urlsafe = operator.suffixes && operator.suffixes.indexOf("urlsafe") !== -1; + var binary = operator.suffixes && operator.suffixes[0].indexOf("binary") !== -1; + var urlsafe = operator.suffixes && operator.suffixes[0].indexOf("urlsafe") !== -1; source(function(tiddler,title) { results.push($tw.utils.base64Decode(title,binary,urlsafe)); }); @@ -28,8 +28,8 @@ exports.decodebase64 = function(source,operator,options) { exports.encodebase64 = function(source,operator,options) { var results = []; - var binary = operator.suffixes && operator.suffixes.indexOf("binary") !== -1; - var urlsafe = operator.suffixes && operator.suffixes.indexOf("urlsafe") !== -1; + var binary = operator.suffixes && operator.suffixes[0].indexOf("binary") !== -1; + var urlsafe = operator.suffixes && operator.suffixes[0].indexOf("urlsafe") !== -1; source(function(tiddler,title) { results.push($tw.utils.base64Encode(title,binary,urlsafe)); }); diff --git a/core/modules/macros/unusedtitle.js b/core/modules/macros/unusedtitle.js index 952bd0264..8a61c425e 100644 --- a/core/modules/macros/unusedtitle.js +++ b/core/modules/macros/unusedtitle.js @@ -16,20 +16,22 @@ exports.name = "unusedtitle"; exports.params = [ {name: "baseName"}, {name: "separator"}, - {name: "template"} + {name: "template"}, + {name: "startCount"} ]; /* Run the macro */ -exports.run = function(baseName,separator,template) { +exports.run = function(baseName,separator,template,startCount) { separator = separator || " "; + startCount = startCount || 0; if(!baseName) { baseName = $tw.language.getString("DefaultNewTiddlerTitle"); } // $tw.wiki.generateNewTitle = function(baseTitle,options) - // options.prefix must be a string! - return this.wiki.generateNewTitle(baseName, {"prefix": separator, "template": template}); + // options.prefix must be a string! + return this.wiki.generateNewTitle(baseName, {"prefix": separator, "template": template, "startCount": startCount}); }; })(); diff --git a/core/modules/parsers/wikiparser/rules/conditional.js b/core/modules/parsers/wikiparser/rules/conditional.js index 23940fd88..c2d6a43b8 100644 --- a/core/modules/parsers/wikiparser/rules/conditional.js +++ b/core/modules/parsers/wikiparser/rules/conditional.js @@ -6,7 +6,7 @@ module-type: wikirule Conditional shortcut syntax ``` -This is a <% if [{something}] %>Elephant<% elseif [{else}] %>Pelican<% else %>Crocodile<% endif %> +This is a <%if [{something}] %>Elephant<%elseif [{else}] %>Pelican<%else%>Crocodile<%endif%> ``` \*/ @@ -27,7 +27,7 @@ exports.init = function(parser) { }; exports.findNextMatch = function(startPos) { - // Look for the next <% if shortcut + // Look for the next <%if shortcut this.matchRegExp.lastIndex = startPos; this.match = this.matchRegExp.exec(this.parser.source); // If not found then return no match diff --git a/core/modules/savers/put.js b/core/modules/savers/put.js index 87fe5f710..69689e6db 100644 --- a/core/modules/savers/put.js +++ b/core/modules/savers/put.js @@ -20,7 +20,7 @@ Retrieve ETag if available */ var retrieveETag = function(self) { var headers = { - Accept: "*/*;charset=UTF-8" + Accept: "*/*" }; $tw.utils.httpRequest({ url: self.uri(), diff --git a/core/modules/utils/utils.js b/core/modules/utils/utils.js index 878f83fbb..234de0c75 100644 --- a/core/modules/utils/utils.js +++ b/core/modules/utils/utils.js @@ -330,16 +330,18 @@ exports.formatTitleString = function(template,options) { }] ]; while(t.length){ - var matchString = ""; + var matchString = "", + found = false; $tw.utils.each(matches, function(m) { var match = m[0].exec(t); if(match) { + found = true; matchString = m[1].call(null,match); t = t.substr(match[0].length); return false; } }); - if(matchString) { + if(found) { result += matchString; } else { result += t.charAt(0); diff --git a/core/modules/widgets/keyboard.js b/core/modules/widgets/keyboard.js index ce3162f51..9515f5a3b 100644 --- a/core/modules/widgets/keyboard.js +++ b/core/modules/widgets/keyboard.js @@ -96,13 +96,15 @@ KeyboardWidget.prototype.execute = function() { this.param = this.getAttribute("param",""); this.key = this.getAttribute("key",""); this.tag = this.getAttribute("tag",""); - this.keyInfoArray = $tw.keyboardManager.parseKeyDescriptors(this.key); - if(this.key.substr(0,2) === "((" && this.key.substr(-2,2) === "))") { - this.shortcutTiddlers = []; - var name = this.key.substring(2,this.key.length -2); - $tw.utils.each($tw.keyboardManager.lookupNames,function(platformDescriptor) { - self.shortcutTiddlers.push("$:/config/" + platformDescriptor + "/" + name); - }); + if($tw.keyboardManager) { + this.keyInfoArray = $tw.keyboardManager.parseKeyDescriptors(this.key); + if(this.key.substr(0,2) === "((" && this.key.substr(-2,2) === "))") { + this.shortcutTiddlers = []; + var name = this.key.substring(2,this.key.length -2); + $tw.utils.each($tw.keyboardManager.lookupNames,function(platformDescriptor) { + self.shortcutTiddlers.push("$:/config/" + platformDescriptor + "/" + name); + }); + } } // Make child widgets this.makeChildWidgets(); @@ -126,7 +128,7 @@ KeyboardWidget.prototype.refresh = function(changedTiddlers) { this.assignDomNodeClasses(); } // Update the keyInfoArray if one of its shortcut-config-tiddlers has changed - if(this.shortcutTiddlers && $tw.utils.hopArray(changedTiddlers,this.shortcutTiddlers)) { + if(this.shortcutTiddlers && $tw.utils.hopArray(changedTiddlers,this.shortcutTiddlers) && $tw.keyboardManager) { this.keyInfoArray = $tw.keyboardManager.parseKeyDescriptors(this.key); } return this.refreshChildren(changedTiddlers); diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js index efdbba83f..e9bec7682 100755 --- a/core/modules/widgets/navigator.js +++ b/core/modules/widgets/navigator.js @@ -184,7 +184,7 @@ NavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) { // Place a tiddler in edit mode NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) { var editTiddler = $tw.hooks.invokeHook("th-editing-tiddler",event), - win = event.event && event.event.view ? event.event.view : window; + win = event.event && event.event.view ? event.event.view : window; if(!editTiddler) { return false; } @@ -306,7 +306,7 @@ NavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) { var title = event.param || event.tiddlerTitle, tiddler = this.wiki.getTiddler(title), storyList = this.getStoryList(), - win = event.event && event.event.view ? event.event.view : window; + win = event.event && event.event.view ? event.event.view : window; // Replace the original tiddler with the draft if(tiddler) { var draftTitle = (tiddler.fields["draft.title"] || "").trim(), @@ -412,7 +412,8 @@ NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) { event = $tw.hooks.invokeHook("th-new-tiddler", event); // Get the story details var storyList = this.getStoryList(), - templateTiddler, additionalFields, title, draftTitle, existingTiddler; + templateTiddler, additionalFields, title, draftTitle, existingTiddler, + templateHasTags = false; // Get the template tiddler (if any) if(typeof event.param === "string") { // Get the template tiddler @@ -457,8 +458,10 @@ NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) { // Merge tags mergedTags = $tw.utils.pushTop(mergedTags,$tw.utils.parseStringArray(additionalFields.tags)); } + var additionalFieldsHasTags = !!(additionalFields && (additionalFields.tags === "")); if(templateTiddler && templateTiddler.fields.tags) { // Merge tags + templateHasTags = true; mergedTags = $tw.utils.pushTop(mergedTags,templateTiddler.fields.tags); } // Save the draft tiddler @@ -474,7 +477,8 @@ NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) { { title: draftTitle, "draft.of": title, - tags: mergedTags + // If template or additionalFields have "tags" even if empty a tags field will be created. + tags: ((mergedTags.length > 0) || templateHasTags || additionalFieldsHasTags) ? mergedTags : undefined },this.wiki.getModificationFields()); this.wiki.addTiddler(draftTiddler); // Update the story to insert the new draft at the top and remove any existing tiddler @@ -526,7 +530,7 @@ NavigatorWidget.prototype.handleImportTiddlersEvent = function(event) { var systemMessage = $tw.language.getString("Import/Upgrader/Tiddler/Unselected"); $tw.utils.each(messages,function(message,title) { newFields["message-" + title] = message; - if (message.indexOf(systemMessage) !== -1) { + if(message.indexOf(systemMessage) !== -1) { newFields["selection-" + title] = "unchecked"; } }); diff --git a/core/modules/widgets/view.js b/core/modules/widgets/view.js index 070836bff..ba0e8e989 100755 --- a/core/modules/widgets/view.js +++ b/core/modules/widgets/view.js @@ -18,6 +18,89 @@ var ViewWidget = function(parseTreeNode,options) { this.initialise(parseTreeNode,options); }; +var ViewHandler = function(widget) { + this.wiki = widget.wiki; + this.widget = widget; + this.document = widget.document; +}; + +/* +Base ViewHandler render method +*/ +ViewHandler.prototype.render = function(parent,nextSibling) { + this.text = this.getValue(); + this.createTextNode(parent,nextSibling); +}; + +/* +Base ViewHandler render method for wikified views +*/ +ViewHandler.prototype.renderWikified = function(parent,nextSibling) { + this.createFakeWidget(); + this.text = this.getValue(); + this.createWikifiedTextNode(parent,nextSibling); +}; + +/* +ViewHandler method to create a simple text node +*/ +ViewHandler.prototype.createTextNode = function(parent,nextSibling) { + if(this.text) { + var textNode = this.document.createTextNode(this.text); + parent.insertBefore(textNode,nextSibling); + this.widget.domNodes.push(textNode); + } else { + this.widget.makeChildWidgets(); + this.widget.renderChildren(parent,nextSibling); + } +}; + +/* +ViewHandler method to always create a text node, even if there's no text +*/ +ViewHandler.prototype.createWikifiedTextNode = function(parent,nextSibling) { + var textNode = this.document.createTextNode(this.text || ""); + parent.insertBefore(textNode,nextSibling); + this.widget.domNodes.push(textNode); +}; + +/* +ViewHandler method to create a fake widget used by wikified views +*/ +ViewHandler.prototype.createFakeWidget = function() { + this.fakeWidget = this.wiki.makeTranscludeWidget(this.widget.viewTitle,{ + document: $tw.fakeDocument, + field: this.widget.viewField, + index: this.widget.viewIndex, + parseAsInline: this.widget.viewMode !== "block", + mode: this.widget.viewMode === "block" ? "block" : "inline", + parentWidget: this.widget, + subTiddler: this.widget.viewSubTiddler + }); + this.fakeNode = $tw.fakeDocument.createElement("div"); + this.fakeWidget.makeChildWidgets(); + this.fakeWidget.render(this.fakeNode,null); +}; + +ViewHandler.prototype.refreshWikified = function(changedTiddlers) { + var refreshed = this.fakeWidget.refresh(changedTiddlers); + if(refreshed) { + var newText = this.getValue(); + if(newText !== this.text) { + this.widget.domNodes[0].textContent = newText; + this.text = newText; + } + } + return refreshed; +}; + +/* +Base ViewHandler refresh method +*/ +ViewHandler.prototype.refresh = function(changedTiddlers) { + return false; +}; + /* Inherit from the base widget class */ @@ -30,14 +113,8 @@ ViewWidget.prototype.render = function(parent,nextSibling) { this.parentDomNode = parent; this.computeAttributes(); this.execute(); - if(this.text) { - var textNode = this.document.createTextNode(this.text); - parent.insertBefore(textNode,nextSibling); - this.domNodes.push(textNode); - } else { - this.makeChildWidgets(); - this.renderChildren(parent,nextSibling); - } + this.view = this.getView(this.viewFormat); + this.view.render(parent,nextSibling); }; /* @@ -52,49 +129,238 @@ ViewWidget.prototype.execute = function() { this.viewFormat = this.getAttribute("format","text"); this.viewTemplate = this.getAttribute("template",""); this.viewMode = this.getAttribute("mode","block"); - switch(this.viewFormat) { - case "htmlwikified": - this.text = this.getValueAsHtmlWikified(this.viewMode); - break; - case "plainwikified": - this.text = this.getValueAsPlainWikified(this.viewMode); - break; - case "htmlencodedplainwikified": - this.text = this.getValueAsHtmlEncodedPlainWikified(this.viewMode); - break; - case "htmlencoded": - this.text = this.getValueAsHtmlEncoded(); - break; - case "htmltextencoded": - this.text = this.getValueAsHtmlTextEncoded(); - break; - case "urlencoded": - this.text = this.getValueAsUrlEncoded(); - break; - case "doubleurlencoded": - this.text = this.getValueAsDoubleUrlEncoded(); - break; - case "date": - this.text = this.getValueAsDate(this.viewTemplate); - break; - case "relativedate": - this.text = this.getValueAsRelativeDate(); - break; - case "stripcomments": - this.text = this.getValueAsStrippedComments(); - break; - case "jsencoded": - this.text = this.getValueAsJsEncoded(); - break; - default: // "text" - this.text = this.getValueAsText(); - break; - } }; /* -The various formatter functions are baked into this widget for the moment. Eventually they will be replaced by macro functions +Initialise the view subclasses */ +ViewWidget.prototype.getView = function(format) { + var View = this.initialiseView(); + View.prototype = Object.create(ViewHandler.prototype); + switch(format) { + case "htmlwikified": + View = this.initialiseHTMLWikifiedView(View); + break; + case "plainwikified": + View = this.initialisePlainWikifiedView(View); + break; + case "htmlencodedplainwikified": + View = this.initialiseHTMLEncodedPlainWikifiedView(View); + break; + case "htmlencoded": + View = this.initialiseHTMLEncodedView(View); + break; + case "htmltextencoded": + View = this.initialiseHTMLTextEncodedView(View); + break; + case "urlencoded": + View = this.initialiseURLEncodedView(View); + break; + case "doubleurlencoded": + View = this.initialiseDoubleURLEncodedView(View); + break; + case "date": + View = this.initialiseDateView(View); + break; + case "relativedate": + View = this.initialiseRelativeDateView(View); + break; + case "stripcomments": + View = this.initialiseStripCommentsView(View); + break; + case "jsencoded": + View = this.initialiseJSEncodedView(View); + break; + default: // "text" + View = this.initialiseTextView(View); + break; + }; + return new View(this); +}; + +/* +Return the function to intitialise the view subclass +*/ +ViewWidget.prototype.initialiseView = function() { + return function(widget) { + ViewHandler.call(this,widget); + }; +}; + +/* +Initialise HTML wikified view methods +*/ +ViewWidget.prototype.initialiseHTMLWikifiedView = function(View) { + + View.prototype.render = function(parent,nextSibling) { + this.renderWikified(parent,nextSibling); + }; + + View.prototype.getValue = function() { + return this.fakeNode.innerHTML; + }; + + View.prototype.refresh = function(changedTiddlers) { + return this.refreshWikified(changedTiddlers); + }; + return View; +}; + +/* +Initialise plain wikified view methods +*/ +ViewWidget.prototype.initialisePlainWikifiedView = function(View) { + + View.prototype.render = function(parent,nextSibling) { + this.renderWikified(parent,nextSibling); + }; + + View.prototype.getValue = function() { + return this.fakeNode.textContent; + }; + + View.prototype.refresh = function(changedTiddlers) { + return this.refreshWikified(changedTiddlers); + }; + return View; +}; + +/* +Initialise HTML encoded plain wikified methods +*/ +ViewWidget.prototype.initialiseHTMLEncodedPlainWikifiedView = function(View) { + + View.prototype.render = function(parent,nextSibling) { + this.renderWikified(parent,nextSibling); + }; + + View.prototype.getValue = function() { + return $tw.utils.htmlEncode(this.fakeNode.textContent); + }; + + View.prototype.refresh = function(changedTiddlers) { + return this.refreshWikified(changedTiddlers); + }; + return View; +}; + +/* +Initialise HTML encoded mehods +*/ +ViewWidget.prototype.initialiseHTMLEncodedView = function(View) { + var self = this; + View.prototype.getValue = function() { + return $tw.utils.htmlEncode(self.getValueAsText()); + }; + return View; +}; + +/* +Initialise HTML text encoded mehods +*/ +ViewWidget.prototype.initialiseHTMLTextEncodedView = function(View) { + var self = this; + View.prototype.getValue = function() { + return $tw.utils.htmlTextEncode(self.getValueAsText()); + }; + return View; +}; + +/* +Initialise URL encoded mehods +*/ +ViewWidget.prototype.initialiseURLEncodedView = function(View) { + var self = this; + View.prototype.getValue = function() { + return $tw.utils.encodeURIComponentExtended(self.getValueAsText()); + }; + return View; +}; + +/* +Initialise double URL encoded mehods +*/ +ViewWidget.prototype.initialiseDoubleURLEncodedView = function(View) { + var self = this; + View.prototype.getValue = function() { + return $tw.utils.encodeURIComponentExtended($tw.utils.encodeURIComponentExtended(self.getValueAsText())); + }; + return View; +}; + +/* +Initialise date mehods +*/ +ViewWidget.prototype.initialiseDateView = function(View) { + var self = this; + View.prototype.getValue = function(format) { + format = format || "YYYY MM DD 0hh:0mm"; + var value = $tw.utils.parseDate(self.getValue()); + if(value && $tw.utils.isDate(value) && value.toString() !== "Invalid Date") { + return $tw.utils.formatDateString(value,format); + } else { + return ""; + } + }; + return View; +}; + +/* +Initialise relative date mehods +*/ +ViewWidget.prototype.initialiseRelativeDateView = function(View) { + var self = this; + View.prototype.getValue = function(format) { + var value = $tw.utils.parseDate(self.getValue()); + if(value && $tw.utils.isDate(value) && value.toString() !== "Invalid Date") { + return $tw.utils.getRelativeDate((new Date()) - (new Date(value))).description; + } else { + return ""; + } + }; + return View; +}; + +/* +Initialise stripcomments mehods +*/ +ViewWidget.prototype.initialiseStripCommentsView = function(View) { + var self = this; + View.prototype.getValue = function() { + var lines = self.getValueAsText().split("\n"), + out = []; + for(var line=0; line 0) ? parseInt(options.startCount,10) : 0, prefix = (typeof(options.prefix) === "string") ? options.prefix : " "; + if (template) { // "count" is important to avoid an endless loop in while(...)!! template = (/\$count:?(\d+)?\$/i.test(template)) ? template : template + "$count$"; - title = $tw.utils.formatTitleString(template,{"base":baseTitle,"separator":prefix,"counter":c}); + // .formatTitleString() expects strings as input + title = $tw.utils.formatTitleString(template,{"base":baseTitle,"separator":prefix,"counter":c+""}); while(this.tiddlerExists(title) || this.isShadowTiddler(title) || this.findDraft(title)) { - title = $tw.utils.formatTitleString(template,{"base":baseTitle,"separator":prefix,"counter":(++c)}); + title = $tw.utils.formatTitleString(template,{"base":baseTitle,"separator":prefix,"counter":(++c)+""}); } } else { + if (c > 0) { + title = baseTitle + prefix + c; + } while(this.tiddlerExists(title) || this.isShadowTiddler(title) || this.findDraft(title)) { title = baseTitle + prefix + (++c); } diff --git a/core/templates/server/static.tiddler.wikitext.tid b/core/templates/server/static.tiddler.wikitext.tid index 2d2bdaba6..1f2ee3cf4 100644 --- a/core/templates/server/static.tiddler.wikitext.tid +++ b/core/templates/server/static.tiddler.wikitext.tid @@ -1,23 +1,23 @@ title: $:/core/templates/server/static.tiddler.wikitext \whitespace trim -
+

<$text text=<>/>

-
+
<$link to={{!!modifier}}> <$view field="modifier"/> <$view field="modified" format="date" template={{$:/language/Tiddler/DateFormat}}/>
-
+
<$list filter="[all[current]tags[]sort[title]]"> encodeuricomponent[]] }}}> <$macrocall $name="tag-pill" tag=<>/>
-
+
<$transclude mode="block"/>
diff --git a/core/templates/social-metadata.tid b/core/templates/social-metadata.tid index f742621e8..eb89418bb 100644 --- a/core/templates/social-metadata.tid +++ b/core/templates/social-metadata.tid @@ -4,7 +4,7 @@ tags: $:/tags/RawMarkupWikified \procedure meta-plain(name,source,name-attribute:"name") \whitespace trim <%if [has[text]] %> - <meta <$text text=<>/>="<$text text=<>/>" content="<$text text={{{ [get[text]encodehtml[]] }}}/>"> + <meta <$text text=<>/>="<$text text=<>/>" content="<$text text={{{ [get[text]encodehtml[]] }}}/>"> <$text text={{{ [charcode[10]] }}}/> <%endif%> \end meta-plain @@ -13,7 +13,7 @@ tags: $:/tags/RawMarkupWikified \whitespace trim <%if [has[text]] %> <$wikify name="html" text={{{ [get[text]] }}} output="text"> - <meta <$text text=<>/>="<$text text=<>/>" content="<$text text={{{ [encodehtml[]] }}}/>"> + <meta <$text text=<>/>="<$text text=<>/>" content="<$text text={{{ [encodehtml[]] }}}/>"> <$text text={{{ [charcode[10]] }}}/> <%endif%> diff --git a/core/templates/tiddlywiki5.html.tid b/core/templates/tiddlywiki5.html.tid index a94ae2693..721b3d9ce 100644 --- a/core/templates/tiddlywiki5.html.tid +++ b/core/templates/tiddlywiki5.html.tid @@ -57,3 +57,4 @@ title: $:/core/templates/tiddlywiki5.html `{{{ [enlisttag[$:/tags/RawMarkupWikified/BottomBody]] ||$:/core/templates/raw-static-tiddler}}}` ` + diff --git a/core/ui/Actions/new-journal.tid b/core/ui/Actions/new-journal.tid index 9df31cb97..9d663e537 100644 --- a/core/ui/Actions/new-journal.tid +++ b/core/ui/Actions/new-journal.tid @@ -2,10 +2,10 @@ title: $:/core/ui/Actions/new-journal tags: $:/tags/Actions description: create a new journal tiddler -\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$ \whitespace trim -<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}> -<$wikify name="journalTitle" text="<$macrocall $name='now' format=<>/>"> +\function get-tags() [] [] +[join[ ]] +<$let journalTitleTemplate={{$:/config/NewJournal/Title}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}> +<$wikify name="journalTitle" text="<$transclude $variable='now' format=<>/>"> <$reveal type="nomatch" state=<> text=""> <$action-sendmessage $message="tm-new-tiddler" title=<> tags=<> text={{{ [get[]] }}}/> @@ -13,4 +13,4 @@ description: create a new journal tiddler <$action-sendmessage $message="tm-new-tiddler" title=<> tags=<> text=<>/> - + diff --git a/core/ui/Actions/new-tiddler.tid b/core/ui/Actions/new-tiddler.tid index f71331327..847130800 100644 --- a/core/ui/Actions/new-tiddler.tid +++ b/core/ui/Actions/new-tiddler.tid @@ -2,8 +2,8 @@ title: $:/core/ui/Actions/new-tiddler tags: $:/tags/Actions description: create a new empty tiddler -\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$ \whitespace trim -<$vars textFieldTags={{$:/config/NewTiddler/Tags}} tagsFieldTags={{$:/config/NewTiddler/Tags!!tags}}> +\function get-tags() [] [] +[join[ ]] +<$let textFieldTags={{$:/config/NewTiddler/Tags}} tagsFieldTags={{$:/config/NewTiddler/Tags!!tags}}> <$action-sendmessage $message="tm-new-tiddler" tags=<>/> - + diff --git a/core/ui/AdvancedSearch/Filter.tid b/core/ui/AdvancedSearch/Filter.tid index 5b82f9b32..a8baf9d30 100644 --- a/core/ui/AdvancedSearch/Filter.tid +++ b/core/ui/AdvancedSearch/Filter.tid @@ -9,14 +9,16 @@ caption: {{$:/language/Search/Filter/Caption}} tag="$:/tags/AdvancedSearch" beforeafter="$beforeafter$" defaultState="$:/core/ui/AdvancedSearch/System" - actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<>/>"/> + actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<>/>" +/> \end \define cancel-search-actions() \whitespace trim -<$list - filter="[{$:/temp/advancedsearch/input}!match{$:/temp/advancedsearch}]" - emptyMessage="<$action-deletetiddler $filter='[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]' />"> +<$list filter="[{$:/temp/advancedsearch/input}!match{$:/temp/advancedsearch}]"> + <$list-empty> + <$action-deletetiddler $filter="[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]"/> + <$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/> <$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/> @@ -24,54 +26,67 @@ caption: {{$:/language/Search/Filter/Caption}} \define input-accept-actions() \whitespace trim -<$list - filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]" - emptyMessage="<$list filter='[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]'><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/>"> +<$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"> + <$list-empty> + <$list filter="[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]"> + <$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/> + + <$/list-empty> <$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/> \end \define input-accept-variant-actions() \whitespace trim -<$list - filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]" - emptyMessage="<$list filter='[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]'><$list filter='[<__tiddler__>get[text]minlength[1]]'><$action-sendmessage $message='tm-edit-tiddler' $param={{{ [<__tiddler__>get[text]] }}}/>"> +<$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"> + <$list-empty> + <$list filter="[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]"> + <$list filter="[<__tiddler__>get[text]minlength[1]]"> + <$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/> + + + <$list filter="[<__tiddler__>get[text]minlength[1]]"> <$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/> - -\end -\whitespace trim -<> - -<$reveal state="$:/temp/advancedsearch" type="nomatch" text=""> -<$set name="resultCount" value="<$count filter={{$:/temp/advancedsearch}}/>"> -
-

<>

-<$list filter={{$:/temp/advancedsearch}}> -addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}> -<$transclude tiddler="$:/core/ui/ListItemTemplate"/> - + +\end + +\whitespace trim + +<> + + - + +<$reveal state="$:/temp/advancedsearch" type="nomatch" text="" tag="div" class="tc-search-results"> + <$set name="resultCount" value="<$count filter={{$:/temp/advancedsearch}}/>"> +

<>

+ <$list filter={{$:/temp/advancedsearch}}> + addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}> + <$transclude tiddler="$:/core/ui/ListItemTemplate"/> + + + diff --git a/core/ui/AdvancedSearch/Shadows.tid b/core/ui/AdvancedSearch/Shadows.tid index e2ffa305f..043aee590 100644 --- a/core/ui/AdvancedSearch/Shadows.tid +++ b/core/ui/AdvancedSearch/Shadows.tid @@ -79,11 +79,15 @@ first-search-filter: [all[shadows]searchsort[title]limit[250]] -[[$:/ <$list filter="[{$:/temp/advancedsearch}minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="
{{$:/language/Search/Search/TooShort}}
" variable="listItem"> -<$set name="resultCount" value="<$count filter='[all[shadows]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]]'/>"> +<$set name="resultCount" value={{{ [all[shadows]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]] +[count[]]}}}>
-<> +<%if [match[0]] %> + {{$:/language/Search/Matches/NoMatch}} +<%else%> + <> +<%endif%> <$list filter="[all[shadows]search{$:/temp/advancedsearch}sort[title]limit[250]] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]]"> addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}> diff --git a/core/ui/AdvancedSearch/System.tid b/core/ui/AdvancedSearch/System.tid index 6804b80a8..5e1ec0254 100644 --- a/core/ui/AdvancedSearch/System.tid +++ b/core/ui/AdvancedSearch/System.tid @@ -78,11 +78,15 @@ first-search-filter: [is[system]searchsort[title]limit[250]] -[[$:/te <$list filter="[{$:/temp/advancedsearch}minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="
{{$:/language/Search/Search/TooShort}}
" variable="listItem"> -<$set name="resultCount" value="<$count filter='[is[system]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]] -[[$:/temp/advancedsearch/selected-item]]'/>"> +<$set name="resultCount" value={{{ [is[system]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]] -[[$:/temp/advancedsearch/selected-item]] +[count[]] }}}>
-<> +<%if [match[0]] %> + {{$:/language/Search/Matches/NoMatch}} +<%else%> + <> +<%endif%> <$list filter="[is[system]search{$:/temp/advancedsearch}sort[title]limit[250]] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]] -[[$:/temp/advancedsearch/selected-item]]"> addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}> diff --git a/core/ui/Components/plugin-info.tid b/core/ui/Components/plugin-info.tid index d7f408bd9..50766e51d 100644 --- a/core/ui/Components/plugin-info.tid +++ b/core/ui/Components/plugin-info.tid @@ -47,13 +47,13 @@ $:/config/Plugins/Disabled/$(currentTiddler)$

<%if [get[stability]match[STABILITY_0_DEPRECATED]] %> - DEPRECATED + <> <%elseif [get[stability]match[STABILITY_1_EXPERIMENTAL]] %> - EXPERIMENTAL + <> <%elseif [get[stability]match[STABILITY_2_STABLE]] %> - STABLE + <> <%elseif [get[stability]match[STABILITY_3_LEGACY]] %> - LEGACY + <> <%endif%> <$view field="version"/>

diff --git a/core/ui/ControlPanel/Basics.tid b/core/ui/ControlPanel/Basics.tid index 961cbe161..f494c2af6 100644 --- a/core/ui/ControlPanel/Basics.tid +++ b/core/ui/ControlPanel/Basics.tid @@ -2,22 +2,7 @@ title: $:/core/ui/ControlPanel/Basics tags: $:/tags/ControlPanel/Info caption: {{$:/language/ControlPanel/Basics/Caption}} -\define lingo-base() $:/language/ControlPanel/Basics/ - -\define show-filter-count(filter) -\whitespace trim -<$button class="tc-btn-invisible"> -<$action-setfield $tiddler="$:/temp/advancedsearch" $value="""$filter$"""/> -<$action-setfield $tiddler="$:/temp/advancedsearch/input" $value="""$filter$"""/> -<$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/> -<$action-setfield $tiddler="$:/state/tab--1498284803" $value="$:/core/ui/AdvancedSearch/Filter"/> -<$action-navigate $to="$:/AdvancedSearch"/> -<$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input"/> -''<$count filter="""$filter$"""/>'' - -{{$:/core/images/advanced-search-button}} - -\end +\procedure lingo-base() $:/language/ControlPanel/Basics/ \whitespace trim |tc-max-width tc-edit-max-width|k diff --git a/core/ui/DefaultSearchResultList.tid b/core/ui/DefaultSearchResultList.tid index 223efe6d7..19b3d7187 100644 --- a/core/ui/DefaultSearchResultList.tid +++ b/core/ui/DefaultSearchResultList.tid @@ -9,7 +9,7 @@ second-search-filter: [!is[system]searchsort[title]limit[250]] //{{$:/language/Search/Matches/Title}}// <$list filter="[minlength[1]]" variable="ignore"> -<$list filter={{{ [get[first-search-filter]] }}}> +<$list filter={{{ [get[first-search-filter]] }}} emptyMessage={{$:/language/Search/Matches/NoResult}}> addsuffix[-primaryList]] -[get[text]] +[then[]else[tc-list-item-selected]] }}}> <$transclude tiddler="$:/core/ui/ListItemTemplate"/> @@ -19,7 +19,7 @@ second-search-filter: [!is[system]searchsort[title]limit[250]] //{{$:/language/Search/Matches/All}}// <$list filter="[minlength[1]]" variable="ignore"> -<$list filter={{{ [get[second-search-filter]] }}}> +<$list filter={{{ [get[second-search-filter]] }}} emptyMessage={{$:/language/Search/Matches/NoResult}}> addsuffix[-secondaryList]] -[get[text]] +[then[]else[tc-list-item-selected]] }}}> <$transclude tiddler="$:/core/ui/ListItemTemplate"/> diff --git a/core/ui/EditTemplate/controls.tid b/core/ui/EditTemplate/controls.tid index e97cedd78..3bb90aac1 100644 --- a/core/ui/EditTemplate/controls.tid +++ b/core/ui/EditTemplate/controls.tid @@ -3,7 +3,7 @@ tags: $:/tags/EditTemplate \define config-title() $:/config/EditToolbarButtons/Visibility/$(listItem)$ \whitespace trim -
+
<$view field="title"/> <$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"> @@ -14,5 +14,4 @@ tags: $:/tags/EditTemplate -
diff --git a/core/ui/EditToolbar/cancel.tid b/core/ui/EditToolbar/cancel.tid index fe21c2e99..ae41fd4af 100644 --- a/core/ui/EditToolbar/cancel.tid +++ b/core/ui/EditToolbar/cancel.tid @@ -4,11 +4,15 @@ caption: {{$:/core/images/cancel-button}} {{$:/language/Buttons/Cancel/Caption}} description: {{$:/language/Buttons/Cancel/Hint}} \whitespace trim -<$button actions=<> tooltip={{$:/language/Buttons/Cancel/Hint}} aria-label={{$:/language/Buttons/Cancel/Caption}} class=<>> -<$list filter="[match[yes]]"> -{{$:/core/images/cancel-button}} - -<$list filter="[match[yes]]"> -<$text text={{$:/language/Buttons/Cancel/Caption}}/> - +<$button actions=<> + tooltip={{$:/language/Buttons/Cancel/Hint}} + aria-label={{$:/language/Buttons/Cancel/Hint}} + class=<> +> + <%if [match[yes]] %> + {{$:/core/images/cancel-button}} + <%endif%> + <%if [match[yes]] %> + <$text text={{$:/language/Buttons/Cancel/Caption}}/> + <%endif%> diff --git a/core/ui/EditToolbar/delete.tid b/core/ui/EditToolbar/delete.tid index fcaed4b48..1e6451da1 100644 --- a/core/ui/EditToolbar/delete.tid +++ b/core/ui/EditToolbar/delete.tid @@ -4,11 +4,15 @@ caption: {{$:/core/images/delete-button}} {{$:/language/Buttons/Delete/Caption}} description: {{$:/language/Buttons/Delete/Hint}} \whitespace trim -<$button actions=<> tooltip={{$:/language/Buttons/Delete/Hint}} aria-label={{$:/language/Buttons/Delete/Caption}} class=<>> -<$list filter="[match[yes]]"> -{{$:/core/images/delete-button}} - -<$list filter="[match[yes]]"> -<$text text={{$:/language/Buttons/Delete/Caption}}/> - +<$button actions=<> + tooltip={{$:/language/Buttons/Delete/Hint}} + aria-label={{$:/language/Buttons/Delete/Hint}} + class=<> +> + <%if [match[yes]] %> + {{$:/core/images/delete-button}} + <%endif%> + <%if [match[yes]] %> + <$text text={{$:/language/Buttons/Delete/Caption}}/> + <%endif%> diff --git a/core/ui/EditToolbar/save.tid b/core/ui/EditToolbar/save.tid index 3872e7674..d62daf981 100644 --- a/core/ui/EditToolbar/save.tid +++ b/core/ui/EditToolbar/save.tid @@ -4,21 +4,20 @@ caption: {{$:/core/images/done-button}} {{$:/language/Buttons/Save/Caption}} description: {{$:/language/Buttons/Save/Hint}} \whitespace trim -\define save-tiddler-button() -\whitespace trim +\procedure save-tiddler-button() <$fieldmangler> <$button tooltip={{$:/language/Buttons/Save/Hint}} - aria-label={{$:/language/Buttons/Save/Caption}} + aria-label={{$:/language/Buttons/Save/Hint}} class=<> > <> - <$list filter="[match[yes]]"> + <%if [match[yes]] %> {{$:/core/images/done-button}} - - <$list filter="[match[yes]]"> + <%endif%> + <%if [match[yes]] %> <$text text={{$:/language/Buttons/Save/Caption}}/> - + <%endif%> \end diff --git a/core/ui/EditorToolbar/bold.tid b/core/ui/EditorToolbar/bold.tid index 1cde1be39..258b13d75 100644 --- a/core/ui/EditorToolbar/bold.tid +++ b/core/ui/EditorToolbar/bold.tid @@ -11,4 +11,5 @@ shortcuts: ((bold)) $param="wrap-selection" prefix="''" suffix="''" + trimSelection="yes" /> diff --git a/core/ui/EditorToolbar/excise.tid b/core/ui/EditorToolbar/excise.tid index fe5c5288b..8bb17edd5 100644 --- a/core/ui/EditorToolbar/excise.tid +++ b/core/ui/EditorToolbar/excise.tid @@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar icon: $:/core/images/excise caption: {{$:/language/Buttons/Excise/Caption}} description: {{$:/language/Buttons/Excise/Hint}} -condition: [type[]] [get[type]prefix[text/vnd.tiddlywiki]] +[first[]] +condition: [type[]] [type[text/vnd.tiddlywiki]] [type[text/markdown]] [type[text/x-markdown]] +[first[]] shortcuts: ((excise)) dropdown: $:/core/ui/EditorToolbar/excise-dropdown diff --git a/core/ui/EditorToolbar/italic.tid b/core/ui/EditorToolbar/italic.tid index 7f3505ddb..47c86b46d 100644 --- a/core/ui/EditorToolbar/italic.tid +++ b/core/ui/EditorToolbar/italic.tid @@ -11,4 +11,5 @@ shortcuts: ((italic)) $param="wrap-selection" prefix="//" suffix="//" + trimSelection="yes" /> diff --git a/core/ui/EditorToolbar/linkify.tid b/core/ui/EditorToolbar/linkify.tid index e8b5fed62..f500669ad 100644 --- a/core/ui/EditorToolbar/linkify.tid +++ b/core/ui/EditorToolbar/linkify.tid @@ -12,4 +12,5 @@ tags: $:/tags/EditorToolbar $param="wrap-selection" prefix="[[" suffix="]]" + trimSelection="yes" /> diff --git a/core/ui/EditorToolbar/mono-line.tid b/core/ui/EditorToolbar/mono-line.tid index 2df863171..cfad08e71 100644 --- a/core/ui/EditorToolbar/mono-line.tid +++ b/core/ui/EditorToolbar/mono-line.tid @@ -11,4 +11,5 @@ shortcuts: ((mono-line)) $param="wrap-selection" prefix="`" suffix="`" + trimSelection="yes" /> diff --git a/core/ui/EditorToolbar/stamp-dropdown-item-template.tid b/core/ui/EditorToolbar/stamp-dropdown-item-template.tid index 5e5acb162..cef3de8b0 100644 --- a/core/ui/EditorToolbar/stamp-dropdown-item-template.tid +++ b/core/ui/EditorToolbar/stamp-dropdown-item-template.tid @@ -21,7 +21,7 @@ title: $:/core/ui/EditorToolbar/StampDropdown/ItemTemplate $message="tm-edit-text-operation" $param="wrap-selection" prefix={{{ [addsuffix[/prefix]get[text]] }}} - suffix={{{ [addsuffix[/suffix]get[text]] }}} + suffix={{{ [addsuffix[/suffix]get[text]] }}} /> diff --git a/core/ui/EditorToolbar/strikethrough.tid b/core/ui/EditorToolbar/strikethrough.tid index 0b00df486..51dbbede2 100644 --- a/core/ui/EditorToolbar/strikethrough.tid +++ b/core/ui/EditorToolbar/strikethrough.tid @@ -11,4 +11,5 @@ shortcuts: ((strikethrough)) $param="wrap-selection" prefix="~~" suffix="~~" + trimSelection="yes" /> diff --git a/core/ui/EditorToolbar/subscript.tid b/core/ui/EditorToolbar/subscript.tid index 1c980a896..4be11ba54 100644 --- a/core/ui/EditorToolbar/subscript.tid +++ b/core/ui/EditorToolbar/subscript.tid @@ -11,4 +11,5 @@ shortcuts: ((subscript)) $param="wrap-selection" prefix=",," suffix=",," + trimSelection="yes" /> diff --git a/core/ui/EditorToolbar/superscript.tid b/core/ui/EditorToolbar/superscript.tid index ee4713409..02cb1176e 100644 --- a/core/ui/EditorToolbar/superscript.tid +++ b/core/ui/EditorToolbar/superscript.tid @@ -11,4 +11,5 @@ shortcuts: ((superscript)) $param="wrap-selection" prefix="^^" suffix="^^" + trimSelection="yes" /> diff --git a/core/ui/EditorToolbar/transcludify.tid b/core/ui/EditorToolbar/transcludify.tid index d24b2041c..61195ed1e 100644 --- a/core/ui/EditorToolbar/transcludify.tid +++ b/core/ui/EditorToolbar/transcludify.tid @@ -12,4 +12,5 @@ tags: $:/tags/EditorToolbar $param="wrap-selection" prefix="{{" suffix="}}" + trimSelection="yes" /> diff --git a/core/ui/EditorToolbar/underline.tid b/core/ui/EditorToolbar/underline.tid index 9f0fc9c30..9d4c4d151 100644 --- a/core/ui/EditorToolbar/underline.tid +++ b/core/ui/EditorToolbar/underline.tid @@ -11,4 +11,5 @@ shortcuts: ((underline)) $param="wrap-selection" prefix="__" suffix="__" + trimSelection="yes" /> diff --git a/core/ui/PageControls/advanced-search.tid b/core/ui/PageControls/advanced-search.tid index 1549b07f4..4aa49e6e5 100644 --- a/core/ui/PageControls/advanced-search.tid +++ b/core/ui/PageControls/advanced-search.tid @@ -4,15 +4,14 @@ caption: {{$:/core/images/advanced-search-button}} {{$:/language/Buttons/Advance description: {{$:/language/Buttons/AdvancedSearch/Hint}} \whitespace trim -\define advanced-search-button(class) -\whitespace trim -<$button to="$:/AdvancedSearch" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class="""$(tv-config-toolbar-class)$ $class$"""> -<$list filter="[match[yes]]"> +\procedure advanced-search-button(class) +<$button to="$:/AdvancedSearch" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class=`$(tv-config-toolbar-class)$ $(class)$`> +<%if [match[yes]] %> {{$:/core/images/advanced-search-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/AdvancedSearch/Caption}}/> - +<%endif%> \end diff --git a/core/ui/PageControls/closeall.tid b/core/ui/PageControls/closeall.tid index 2665fff0d..23aefa8be 100644 --- a/core/ui/PageControls/closeall.tid +++ b/core/ui/PageControls/closeall.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/CloseAll/Hint}} \whitespace trim <$button message="tm-close-all-tiddlers" tooltip={{$:/language/Buttons/CloseAll/Hint}} aria-label={{$:/language/Buttons/CloseAll/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/close-all-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/CloseAll/Caption}}/> - - \ No newline at end of file +<%endif%> + diff --git a/core/ui/PageControls/controlpanel.tid b/core/ui/PageControls/controlpanel.tid index 872d640ac..8b9db8d9a 100644 --- a/core/ui/PageControls/controlpanel.tid +++ b/core/ui/PageControls/controlpanel.tid @@ -4,15 +4,14 @@ caption: {{$:/core/images/options-button}} {{$:/language/Buttons/ControlPanel/Ca description: {{$:/language/Buttons/ControlPanel/Hint}} \whitespace trim -\define control-panel-button(class) -\whitespace trim -<$button to="$:/ControlPanel" tooltip={{$:/language/Buttons/ControlPanel/Hint}} aria-label={{$:/language/Buttons/ControlPanel/Caption}} class="""$(tv-config-toolbar-class)$ $class$"""> -<$list filter="[match[yes]]"> +\procedure control-panel-button(class) +<$button to="$:/ControlPanel" tooltip={{$:/language/Buttons/ControlPanel/Hint}} aria-label={{$:/language/Buttons/ControlPanel/Caption}} class=`$(tv-config-toolbar-class)$ $(class)$`> +<%if [match[yes]] %> {{$:/core/images/options-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/ControlPanel/Caption}}/> - +<%endif%> \end diff --git a/core/ui/PageControls/encryption.tid b/core/ui/PageControls/encryption.tid index 9f8ae0bd6..572d162de 100644 --- a/core/ui/PageControls/encryption.tid +++ b/core/ui/PageControls/encryption.tid @@ -6,25 +6,25 @@ 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]]"> +<%if [match[yes]] %> {{$:/core/images/locked-padlock}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Encryption/ClearPassword/Caption}}/> - +<%endif%> <$reveal type="nomatch" state="$:/isEncrypted" text="yes"> <$button message="tm-set-password" tooltip={{$:/language/Buttons/Encryption/SetPassword/Hint}} aria-label={{$:/language/Buttons/Encryption/SetPassword/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/unlocked-padlock}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Encryption/SetPassword/Caption}}/> - +<%endif%> diff --git a/core/ui/PageControls/export-page.tid b/core/ui/PageControls/export-page.tid index fe036abf7..902f643e9 100644 --- a/core/ui/PageControls/export-page.tid +++ b/core/ui/PageControls/export-page.tid @@ -3,4 +3,4 @@ tags: $:/tags/PageControls caption: {{$:/core/images/export-button}} {{$:/language/Buttons/ExportPage/Caption}} description: {{$:/language/Buttons/ExportPage/Hint}} -<$macrocall $name="exportButton" exportFilter="[!is[system]sort[title]]" lingoBase="$:/language/Buttons/ExportPage/"/> \ No newline at end of file +<$transclude $variable="exportButton" exportFilter="[!is[system]sort[title]]" lingoBase="$:/language/Buttons/ExportPage/"/> \ No newline at end of file diff --git a/core/ui/PageControls/fold-all.tid b/core/ui/PageControls/fold-all.tid index 46c3165b8..dba6bb1b6 100644 --- a/core/ui/PageControls/fold-all.tid +++ b/core/ui/PageControls/fold-all.tid @@ -6,12 +6,12 @@ description: {{$:/language/Buttons/FoldAll/Hint}} \whitespace trim <$button tooltip={{$:/language/Buttons/FoldAll/Hint}} aria-label={{$:/language/Buttons/FoldAll/Caption}} class=<>> <$action-sendmessage $message="tm-fold-all-tiddlers" $param=<> foldedStatePrefix="$:/state/folded/"/> -<$list filter="[match[yes]]" variable="listItem"> +<%if [match[yes]] %> {{$:/core/images/fold-all-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/FoldAll/Caption}}/> - - \ No newline at end of file +<%endif%> + diff --git a/core/ui/PageControls/full-screen.tid b/core/ui/PageControls/full-screen.tid index ada7d5a65..864ee5c26 100644 --- a/core/ui/PageControls/full-screen.tid +++ b/core/ui/PageControls/full-screen.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/FullScreen/Hint}} \whitespace trim <$button message="tm-full-screen" tooltip={{$:/language/Buttons/FullScreen/Hint}} aria-label={{$:/language/Buttons/FullScreen/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/full-screen-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/FullScreen/Caption}}/> - - \ No newline at end of file +<%endif%> + diff --git a/core/ui/PageControls/home.tid b/core/ui/PageControls/home.tid index f3a0b1787..6c1d5a789 100644 --- a/core/ui/PageControls/home.tid +++ b/core/ui/PageControls/home.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/Home/Hint}} \whitespace trim <$button message="tm-home" tooltip={{$:/language/Buttons/Home/Hint}} aria-label={{$:/language/Buttons/Home/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/home-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Home/Caption}}/> - - \ No newline at end of file +<%endif%> + diff --git a/core/ui/PageControls/import.tid b/core/ui/PageControls/import.tid index 39ca51eb6..11474db22 100644 --- a/core/ui/PageControls/import.tid +++ b/core/ui/PageControls/import.tid @@ -6,14 +6,14 @@ description: {{$:/language/Buttons/Import/Hint}} \whitespace trim
<$button tooltip={{$:/language/Buttons/Import/Hint}} aria-label={{$:/language/Buttons/Import/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/import-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Import/Caption}}/> - +<%endif%> <$browse tooltip={{$:/language/Buttons/Import/Hint}}/> -
\ No newline at end of file +
diff --git a/core/ui/PageControls/language.tid b/core/ui/PageControls/language.tid index 623c71004..3315b5a23 100644 --- a/core/ui/PageControls/language.tid +++ b/core/ui/PageControls/language.tid @@ -4,21 +4,18 @@ caption: {{$:/core/images/globe}} {{$:/language/Buttons/Language/Caption}} description: {{$:/language/Buttons/Language/Hint}} \whitespace trim -\define flag-title() -$(languagePluginTitle)$/icon -\end <$button popup=<> tooltip={{$:/language/Buttons/Language/Hint}} aria-label={{$:/language/Buttons/Language/Caption}} class=<> selectedClass="tc-selected"> -<$list filter="[match[yes]]"> - -<$set name="languagePluginTitle" value={{$:/language}}> -<$image source=<>/> - - - -<$list filter="[match[yes]]"> +<%if [match[yes]] %> + + <$set name="languagePluginTitle" value={{$:/language}}> + <$image source=`$(languagePluginTitle)$/icon`/> + + +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Language/Caption}}/> - +<%endif%> <$reveal state=<> type="popup" position="below" animate="yes"> diff --git a/core/ui/PageControls/layout.tid b/core/ui/PageControls/layout.tid index 703bbcb1b..c9a0f596b 100644 --- a/core/ui/PageControls/layout.tid +++ b/core/ui/PageControls/layout.tid @@ -6,10 +6,10 @@ description: {{$:/language/LayoutSwitcher/Description}} \whitespace trim <$button tooltip={{$:/language/Buttons/LayoutSwitcher/Hint}} aria-label={{$:/language/Buttons/LayoutSwitcher/Caption}} class=<>> <$action-sendmessage $message="tm-show-switcher" switch="layout"/> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/layout-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/LayoutSwitcher/Caption}}/> - +<%endif%> diff --git a/core/ui/PageControls/manager.tid b/core/ui/PageControls/manager.tid index d2144c574..3cc364f80 100644 --- a/core/ui/PageControls/manager.tid +++ b/core/ui/PageControls/manager.tid @@ -4,17 +4,16 @@ caption: {{$:/core/images/list}} {{$:/language/Buttons/Manager/Caption}} description: {{$:/language/Buttons/Manager/Hint}} \whitespace trim -\define manager-button(class) -\whitespace trim -<$button to="$:/Manager" tooltip={{$:/language/Buttons/Manager/Hint}} aria-label={{$:/language/Buttons/Manager/Caption}} class="""$(tv-config-toolbar-class)$ $class$"""> -<$list filter="[match[yes]]"> +\procedure manager-button(class) +<$button to="$:/Manager" tooltip={{$:/language/Buttons/Manager/Hint}} aria-label={{$:/language/Buttons/Manager/Caption}} class=`$(tv-config-toolbar-class)$ $(class)$`> +<%if [match[yes]] %> {{$:/core/images/list}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Manager/Caption}}/> - +<%endif%> \end diff --git a/core/ui/PageControls/more-page-actions.tid b/core/ui/PageControls/more-page-actions.tid index 3acaef2b6..7453b9df7 100644 --- a/core/ui/PageControls/more-page-actions.tid +++ b/core/ui/PageControls/more-page-actions.tid @@ -12,33 +12,29 @@ description: {{$:/language/Buttons/More/Hint}} class=<> selectedClass="tc-selected" > - <$list filter="[match[yes]]"> + <%if [match[yes]] %> {{$:/core/images/down-arrow}} - - <$list filter="[match[yes]]"> + <%endif%> + <%if [match[yes]] %> <$text text={{$:/language/Buttons/More/Caption}}/> - + <%endif%> <$reveal state=<> type="popup" position="below" animate="yes">
- <$set name="tv-config-toolbar-icons" value="yes"> - <$set name="tv-config-toolbar-text" value="yes"> - <$set name="tv-config-toolbar-class" value="tc-btn-invisible"> - <$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]] -[[$:/core/ui/Buttons/more-page-actions]]" - variable="listItem" + <$let tv-config-toolbar-icons="yes" tv-config-toolbar-text="yes" tv-config-toolbar-class="tc-btn-invisible"> + <$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]] -[[$:/core/ui/Buttons/more-page-actions]]" + variable="listItem" + > + <$reveal type="match" state=<> text="hide"> + <$set name="tv-config-toolbar-class" + filter="[] [encodeuricomponent[]addprefix[tc-btn-]]" > - <$reveal type="match" state=<> text="hide"> - <$set name="tv-config-toolbar-class" - filter="[] [encodeuricomponent[]addprefix[tc-btn-]]" - > - <$transclude tiddler=<> mode="inline"/> - - - - - - + <$transclude tiddler=<> mode="inline"/> + + + +
- \ No newline at end of file + diff --git a/core/ui/PageControls/network-activity.tid b/core/ui/PageControls/network-activity.tid index 763365f37..7be25b261 100644 --- a/core/ui/PageControls/network-activity.tid +++ b/core/ui/PageControls/network-activity.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/NetworkActivity/Hint}} \whitespace trim <$button message="tm-http-cancel-all-requests" tooltip={{$:/language/Buttons/NetworkActivity/Hint}} aria-label={{$:/language/Buttons/NetworkActivity/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/network-activity}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/NetworkActivity/Caption}}/> - - \ No newline at end of file +<%endif%> + diff --git a/core/ui/PageControls/new-image.tid b/core/ui/PageControls/new-image.tid index b37fba7c5..0cf954966 100644 --- a/core/ui/PageControls/new-image.tid +++ b/core/ui/PageControls/new-image.tid @@ -5,12 +5,12 @@ 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]]"> +<%if [match[yes]] %> {{$:/core/images/new-image-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/NewImage/Caption}}/> - +<%endif%> diff --git a/core/ui/PageControls/new-journal.tid b/core/ui/PageControls/new-journal.tid index 8ae8ee78a..8330b8cb7 100644 --- a/core/ui/PageControls/new-journal.tid +++ b/core/ui/PageControls/new-journal.tid @@ -4,17 +4,16 @@ caption: {{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournal/ description: {{$:/language/Buttons/NewJournal/Hint}} \whitespace trim -\define journalButton() -\whitespace trim +\procedure journalButton() <$button tooltip={{$:/language/Buttons/NewJournal/Hint}} aria-label={{$:/language/Buttons/NewJournal/Caption}} class=<> actions={{$:/core/ui/Actions/new-journal}}> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/new-journal-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/NewJournal/Caption}}/> - +<%endif%> \end <> diff --git a/core/ui/PageControls/newtiddler.tid b/core/ui/PageControls/newtiddler.tid index cd2f56913..f6a6e6891 100644 --- a/core/ui/PageControls/newtiddler.tid +++ b/core/ui/PageControls/newtiddler.tid @@ -5,12 +5,12 @@ 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]]"> +<%if [match[yes]] %> {{$:/core/images/new-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/NewTiddler/Caption}}/> - +<%endif%> diff --git a/core/ui/PageControls/palette.tid b/core/ui/PageControls/palette.tid index 6fdbdb439..efa016d49 100644 --- a/core/ui/PageControls/palette.tid +++ b/core/ui/PageControls/palette.tid @@ -6,12 +6,12 @@ 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]]"> +<%if [match[yes]] %> {{$:/core/images/palette}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Palette/Caption}}/> - +<%endif%> <$reveal state=<> type="popup" position="below" animate="yes"> diff --git a/core/ui/PageControls/print.tid b/core/ui/PageControls/print.tid index ef664b6e3..994303d25 100644 --- a/core/ui/PageControls/print.tid +++ b/core/ui/PageControls/print.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/Print/Hint}} \whitespace trim <$button message="tm-print" tooltip={{$:/language/Buttons/Print/Hint}} aria-label={{$:/language/Buttons/Print/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/print-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Print/Caption}}/> - - \ No newline at end of file +<%endif%> + diff --git a/core/ui/PageControls/refresh.tid b/core/ui/PageControls/refresh.tid index 38692f817..5a8773b77 100644 --- a/core/ui/PageControls/refresh.tid +++ b/core/ui/PageControls/refresh.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/Refresh/Hint}} \whitespace trim <$button message="tm-browser-refresh" tooltip={{$:/language/Buttons/Refresh/Hint}} aria-label={{$:/language/Buttons/Refresh/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/refresh-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Refresh/Caption}}/> - - \ No newline at end of file +<%endif%> + diff --git a/core/ui/PageControls/savewiki.tid b/core/ui/PageControls/savewiki.tid index 60f8dc99f..7e6a18ccc 100644 --- a/core/ui/PageControls/savewiki.tid +++ b/core/ui/PageControls/savewiki.tid @@ -9,13 +9,13 @@ description: {{$:/language/Buttons/SaveWiki/Hint}} <$action-sendmessage $message="tm-save-wiki" $param={{$:/config/SaveWikiButton/Template}} filename=<>/> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/save-button-dynamic}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/SaveWiki/Caption}}/> - +<%endif%> - \ No newline at end of file + diff --git a/core/ui/PageControls/storyview.tid b/core/ui/PageControls/storyview.tid index c4d0b7365..7738cfa97 100644 --- a/core/ui/PageControls/storyview.tid +++ b/core/ui/PageControls/storyview.tid @@ -4,19 +4,16 @@ caption: {{$:/core/images/storyview-classic}} {{$:/language/Buttons/StoryView/Ca description: {{$:/language/Buttons/StoryView/Hint}} \whitespace trim -\define icon() -$:/core/images/storyview-$(storyview)$ -\end <$button popup=<> tooltip={{$:/language/Buttons/StoryView/Hint}} aria-label={{$:/language/Buttons/StoryView/Caption}} class=<> selectedClass="tc-selected"> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> <$set name="storyview" value={{$:/view}}> -<$transclude tiddler=<>/> +<$transclude tiddler=`$:/core/images/storyview-$(storyview)$`/> - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/StoryView/Caption}}/> - +<%endif%> <$reveal state=<> type="popup" position="below" animate="yes"> diff --git a/core/ui/PageControls/tag-button.tid b/core/ui/PageControls/tag-button.tid index e2b5c9277..6c04804ce 100644 --- a/core/ui/PageControls/tag-button.tid +++ b/core/ui/PageControls/tag-button.tid @@ -4,17 +4,16 @@ caption: {{$:/core/images/tag-button}} {{$:/language/Buttons/TagManager/Caption} description: {{$:/language/Buttons/TagManager/Hint}} \whitespace trim -\define control-panel-button(class) -\whitespace trim -<$button to="$:/TagManager" tooltip={{$:/language/Buttons/TagManager/Hint}} aria-label={{$:/language/Buttons/TagManager/Caption}} class="""$(tv-config-toolbar-class)$ $class$"""> -<$list filter="[match[yes]]"> +\procedure control-panel-button(class) +<$button to="$:/TagManager" tooltip={{$:/language/Buttons/TagManager/Hint}} aria-label={{$:/language/Buttons/TagManager/Caption}} class=`$(tv-config-toolbar-class)$ $(class)$`> +<%if [match[yes]] %> {{$:/core/images/tag-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/TagManager/Caption}}/> - +<%endif%> \end diff --git a/core/ui/PageControls/theme.tid b/core/ui/PageControls/theme.tid index 2d8eadc7b..60e37a95e 100644 --- a/core/ui/PageControls/theme.tid +++ b/core/ui/PageControls/theme.tid @@ -6,12 +6,12 @@ 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]]"> +<%if [match[yes]] %> {{$:/core/images/theme-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Theme/Caption}}/> - +<%endif%> <$reveal state=<> type="popup" position="below" animate="yes"> diff --git a/core/ui/PageControls/timestamp.tid b/core/ui/PageControls/timestamp.tid index a54b3f2ca..0186d7c12 100644 --- a/core/ui/PageControls/timestamp.tid +++ b/core/ui/PageControls/timestamp.tid @@ -7,26 +7,26 @@ description: {{$:/language/Buttons/Timestamp/Hint}} <$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"/> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/timestamp-on}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Timestamp/On/Caption}}/> - +<%endif%> <$reveal type="match" state="$:/config/TimestampDisable" text="yes"> <$button tooltip={{$:/language/Buttons/Timestamp/Off/Hint}} aria-label={{$:/language/Buttons/Timestamp/Off/Caption}} class=<>> <$action-setfield $tiddler="$:/config/TimestampDisable" $value="no"/> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/timestamp-off}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Timestamp/Off/Caption}}/> - +<%endif%> diff --git a/core/ui/PageControls/unfold-all.tid b/core/ui/PageControls/unfold-all.tid index 6e8357a3b..e0d26bc49 100644 --- a/core/ui/PageControls/unfold-all.tid +++ b/core/ui/PageControls/unfold-all.tid @@ -6,12 +6,12 @@ description: {{$:/language/Buttons/UnfoldAll/Hint}} \whitespace trim <$button tooltip={{$:/language/Buttons/UnfoldAll/Hint}} aria-label={{$:/language/Buttons/UnfoldAll/Caption}} class=<>> <$action-sendmessage $message="tm-unfold-all-tiddlers" $param=<> foldedStatePrefix="$:/state/folded/"/> -<$list filter="[match[yes]]" variable="listItem"> +<%if [match[yes]] %> {{$:/core/images/unfold-all-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/UnfoldAll/Caption}}/> - - \ No newline at end of file +<%endif%> + diff --git a/core/ui/TagManager.tid b/core/ui/TagManager.tid index e2d6d2fa8..e554d66cc 100644 --- a/core/ui/TagManager.tid +++ b/core/ui/TagManager.tid @@ -46,6 +46,21 @@ color: #bbb \end +\procedure color-picker-actions() +\whitespace trim +<$action-setfield $tiddler=<> color=<>/> +\end + +\procedure color-picker-button() +\whitespace trim +
+<$button class="tc-btn-invisible" popup={{{ [[$:/state/tag-manager/color/]addsuffix] }}}>{{$:/core/images/palette}} +<$reveal type="popup" tag="div" class="tc-drop-down tc-popup-keep" state={{{ [[$:/state/tag-manager/color/]addsuffix] }}}> +<$transclude $variable="colour-picker" actions=<>/> + +
+\end + \whitespace trim @@ -58,7 +73,7 @@ color: #bbb <$list filter="[tags[]!is[system]sort[title]]"> - + -\end \whitespace trim + +\procedure lingo-base() $:/language/Docs/Fields/ + +\function tf.getLingoText() [] [] +[join[]get[text]] + +\procedure renderfield(title) +<tr class="tc-view-field"> + <td class="tc-view-field-name"> + ''<$text text=<<title>>/>'': + </td> + <td class="tc-view-field-value"> + //<<tf.getLingoText>>// + </td> + <td class="tc-view-field-list"> + <$macrocall $name="show-filter-count" filter=`[has[$(title)$]sort[]]`>> + </td> +</tr> +\end + <table class="tc-view-field-table"> -<tbody> -<$list filter="[fields[]sort[title]]" variable="listItem"> -<$macrocall $name="renderfield" title=<<listItem>>/> -</$list> -</tbody> + <tbody> + <!-- <<renderfieldHeader>> --> + <$list filter="[fields[]sort[title]]" variable="listItem"> + <$macrocall $name="renderfield" title=<<listItem>>/> + </$list> + </tbody> </table> diff --git a/core/wiki/config/ViewTemplateBodyFilters.multids b/core/wiki/config/ViewTemplateBodyFilters.multids index 42a7ad823..a91c039de 100644 --- a/core/wiki/config/ViewTemplateBodyFilters.multids +++ b/core/wiki/config/ViewTemplateBodyFilters.multids @@ -1,7 +1,7 @@ title: $:/config/ViewTemplateBodyFilters/ tags: $:/tags/ViewTemplateBodyFilter -testcase: [tag[$:/tags/wiki-test-spec]type[text/vnd.tiddlywiki-multiple]then[$:/core/ui/TestCaseTemplate]] [tag[$:/tags/wiki-test-spec-failing]type[text/vnd.tiddlywiki-multiple]then[$:/core/ui/TestCaseTemplate]] +testcase: [tag[$:/tags/wiki-test-spec]type[text/vnd.tiddlywiki-multiple]] [tag[$:/tags/wiki-test-spec-failing]type[text/vnd.tiddlywiki-multiple]] :then[[$:/core/ui/TestCaseTemplate]] stylesheet: [tag[$:/tags/Stylesheet]then[$:/core/ui/ViewTemplate/body/rendered-plain-text]] core-ui-tags: [tag[$:/tags/PageTemplate]] [tag[$:/tags/EditTemplate]] [tag[$:/tags/ViewTemplate]] [tag[$:/tags/KeyboardShortcut]] [tag[$:/tags/ImportPreview]] [tag[$:/tags/EditPreview]][tag[$:/tags/EditorToolbar]] [tag[$:/tags/Actions]] :then[[$:/core/ui/ViewTemplate/body/code]] system: [prefix[$:/boot/]] [prefix[$:/core/macros]] [prefix[$:/core/save/]] [prefix[$:/core/templates/]] [prefix[$:/config/]] [prefix[$:/info/]] [prefix[$:/language/]] [prefix[$:/languages/]] [prefix[$:/snippets/]] [prefix[$:/info/]] [prefix[$:/state/]] [prefix[$:/status/]] [prefix[$:/temp/]] :and[!is[image]] :then[[$:/core/ui/ViewTemplate/body/code]] diff --git a/core/wiki/macros/colour-picker.tid b/core/wiki/macros/colour-picker.tid index 1ff1e7b90..7a607a551 100644 --- a/core/wiki/macros/colour-picker.tid +++ b/core/wiki/macros/colour-picker.tid @@ -10,9 +10,7 @@ tags: $:/tags/Macro \define colour-picker-inner(actions) <$button tag="a" tooltip="""$(colour-picker-value)$"""> - $(colour-picker-update-recent)$ - <$transclude $variable="__actions__"/> <span style="display:inline-block; background-color: $(colour-picker-value)$; width: 100%; height: 100%; border-radius: 50%;"/> diff --git a/core/wiki/macros/export.tid b/core/wiki/macros/export.tid index 3d0d14760..5233da385 100644 --- a/core/wiki/macros/export.tid +++ b/core/wiki/macros/export.tid @@ -1,33 +1,51 @@ title: $:/core/macros/export -tags: $:/tags/Macro +tags: $:/tags/Macro $:/tags/Global -\define exportButtonFilename(baseFilename) -$baseFilename$$(extension)$ +\function exportButtonFilename(baseFilename) +[<baseFilename>] [<extension>] +[join[]] \end -\define exportButton(exportFilter:"[!is[system]sort[title]]",lingoBase,baseFilename:"tiddlers") +\procedure exportButton(exportFilter:"[!is[system]sort[title]]",lingoBase,baseFilename:"tiddlers") \whitespace trim -<$vars hint={{{ [<__lingoBase__>addsuffix[Hint]get[text]] }}} caption={{{ [<__lingoBase__>addsuffix[Caption]get[text]] }}}> -<span class="tc-popup-keep"><$button popup=<<qualify "$:/state/popup/export">> tooltip=<<hint>> aria-label=<<caption>> class=<<tv-config-toolbar-class>> selectedClass="tc-selected"> -<$list filter="[<tv-config-toolbar-icons>match[yes]]"> -{{$:/core/images/export-button}} -</$list> -<$list filter="[<tv-config-toolbar-text>match[yes]]"> -<span class="tc-btn-text"><$text text=<<caption>>/></span> -</$list> -</$button></span></$vars><$reveal state=<<qualify "$:/state/popup/export">> type="popup" position="below" animate="yes"> -<div class="tc-drop-down"> -<$set name="count" value={{{ [subfilter<__exportFilter__>count[]] }}}> -<$list filter="[all[shadows+tiddlers]tag[$:/tags/Exporter]]"> -<$list filter="[<currentTiddler>has[condition]subfilter{!!condition}limit[1]] ~[<currentTiddler>!has[condition]then[true]]" variable="ignore"> -<$button class="tc-btn-invisible"> -<$action-sendmessage $message="tm-download-file" $param=<<currentTiddler>> exportFilter=<<__exportFilter__>> filename={{{ [<__baseFilename__>addsuffix{!!extension}] }}}/> -<$action-deletetiddler $tiddler=<<qualify "$:/state/popup/export">>/> -<$transclude field="description"/> -</$button> -</$list> -</$list> -</$set> -</div> +<$let hint={{{ [<lingoBase>addsuffix[Hint]get[text]] }}} + caption={{{ [<lingoBase>addsuffix[Caption]get[text]] }}} +> + <span class="tc-popup-keep"> + <$button popup=<<qualify "$:/state/popup/export">> + tooltip=<<hint>> + aria-label=<<caption>> + class=<<tv-config-toolbar-class>> + selectedClass="tc-selected" + dragFilter=<<exportFilter>> + > + <%if [<tv-config-toolbar-icons>match[yes]] %> + {{$:/core/images/export-button}} + <%endif%> + <%if [<tv-config-toolbar-text>match[yes]] %> + <span class="tc-btn-text"><$text text=<<caption>>/></span> + <%endif%> + </$button> + </span> +</$let> +<$reveal state=<<qualify "$:/state/popup/export">> type="popup" position="below" animate="yes"> + <div class="tc-drop-down"> + <$set name="count" value={{{ [subfilter<exportFilter>count[]] }}}> + <$list filter="[all[shadows+tiddlers]tag[$:/tags/Exporter]]"> + <$list filter="[<currentTiddler>has[condition]subfilter{!!condition}limit[1]] ~[<currentTiddler>!has[condition]then[true]]" + variable="ignore" + > + <$button class="tc-btn-invisible"> + <$action-sendmessage $message="tm-download-file" + $param=<<currentTiddler>> + exportFilter=<<exportFilter>> + filename={{{ [<baseFilename>addsuffix{!!extension}] }}} + /> + <$action-deletetiddler $tiddler=<<qualify "$:/state/popup/export">>/> + <$transclude field="description"/> + </$button> + </$list> + </$list> + </$set> + </div> </$reveal> \end diff --git a/core/wiki/macros/show-filter-count.tid b/core/wiki/macros/show-filter-count.tid new file mode 100644 index 000000000..be06fcde1 --- /dev/null +++ b/core/wiki/macros/show-filter-count.tid @@ -0,0 +1,17 @@ +title: $:/core/macros/show-filter-count +tags: $:/tags/Macro $:/tags/Global + +\whitespace trim + +\procedure show-filter-count(filter) +<$button class="tc-btn-invisible"> + <$action-setfield $tiddler="$:/temp/advancedsearch" $value=<<filter>>/> + <$action-setfield $tiddler="$:/temp/advancedsearch/input" $value=<<filter>>/> + <$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/> + <$action-setfield $tiddler="$:/state/tab--1498284803" $value="$:/core/ui/AdvancedSearch/Filter"/> + <$action-navigate $to="$:/AdvancedSearch"/> + <$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input"/> + <span class="tc-small-gap-right">''<$count filter=<<filter>>/>''</span> + {{$:/core/images/advanced-search-button}} +</$button> +\end \ No newline at end of file diff --git a/core/wiki/macros/tag-picker.tid b/core/wiki/macros/tag-picker.tid index 8bd3caf4e..4186f4138 100644 --- a/core/wiki/macros/tag-picker.tid +++ b/core/wiki/macros/tag-picker.tid @@ -31,11 +31,11 @@ second-search-filter: [subfilter<tagListFilter>is[system]search:title<userInput> \procedure add-tag-actions() <$let tag=<<_tf.getTag>> > <$action-listops $tiddler=<<saveTiddler>> $field=<<tagField>> $subfilter='+[toggle<tag>trim[]]'/> - <% if [<tag>] :intersection[<saveTiddler>get<tagField>enlist-input[]] %> + <%if [<tag>] :intersection[<saveTiddler>get<tagField>enlist-input[]] %> <!-- tag has been removed - do nothing --> - <% else %> + <%else%> <<actions>> - <% endif %> + <%endif%> <<delete-tag-state-tiddlers>> <$action-setfield $tiddler=<<refreshTitle>> text="yes"/> </$let> @@ -46,11 +46,11 @@ second-search-filter: [subfilter<tagListFilter>is[system]search:title<userInput> The second ESC tries to close the "draft tiddler" --> \procedure clear-tags-actions-inner() -<% if [<storeTitle>has[text]] ~[<newTagNameTiddler>has[text]] %> +<%if [<storeTitle>has[text]] ~[<newTagNameTiddler>has[text]] %> <<delete-tag-state-tiddlers>> -<% else %> +<%else%> <<cancel-delete-tiddler-actions "cancel">> -<% endif %> +<%endif%> \end <!-- triggered by keyboard only --> @@ -83,6 +83,9 @@ The second ESC tries to close the "draft tiddler" emptyMessage="<div class='tc-search-results'>{{$:/language/Search/Search/TooShort}}</div>" variable="listItem" > <$list filter=<<filter>> variable="tag"> + <$list-empty> + <span class="tc-small-gap-left">{{$:/language/EditTemplate/Tags/EmptyMessage}}</span> + </$list-empty> <!-- The buttonClasses filter is used to define tc-tag-button-selected state --> <!-- tf.get-tagpicker-focus-selector has to be resolved for $:/core/ui/TagPickerTagTemplate, othwerwise qualify in tf.tagpicker-dropdown-id causes problems --> @@ -125,13 +128,13 @@ The second ESC tries to close the "draft tiddler" > {{$:/core/images/down-arrow}} </$button> - <% if [<storeTitle>has[text]] %> + <%if [<storeTitle>has[text]] %> <$button actions=<<delete-tag-state-tiddlers>> class="tc-btn-invisible tc-small-gap tc-btn-dropdown" tooltip={{$:/language/EditTemplate/Tags/ClearInput/Hint}} aria-label={{$:/language/EditTemplate/Tags/ClearInput/Caption}} > {{$:/core/images/close-button}} </$button> - <% endif %> + <%endif%> <span class="tc-add-tag-button tc-small-gap-left"> <$let tag=<<_tf.getTag>>> <$button set=<<newTagNameTiddler>> actions=<<add-button-actions>> > @@ -141,13 +144,13 @@ The second ESC tries to close the "draft tiddler" </span> </div> <div class="tc-block-dropdown-wrapper"> - <% if [<tf.tagpicker-dropdown-id>has[text]] %> + <%if [<tf.tagpicker-dropdown-id>has[text]] %> <div class="tc-block-dropdown tc-block-tags-dropdown"> <$macrocall $name="tag-picker-listTags" filter=<<nonSystemTagsFilter>> suffix="-primaryList" /> <hr> <$macrocall $name="tag-picker-listTags" filter=<<systemTagsFilter>> suffix="-secondaryList" /> </div> - <% endif %> + <%endif%> </div> </div> \end diff --git a/core/wiki/macros/tag.tid b/core/wiki/macros/tag.tid index eedbd0c4c..2c539b42e 100644 --- a/core/wiki/macros/tag.tid +++ b/core/wiki/macros/tag.tid @@ -7,7 +7,7 @@ fill:$(foregroundColor)$; color:$(foregroundColor)$; \end -<!-- This has no whitespace trim to avoid modifying $actions$. Closing tags omitted for brevity. --> +<!-- This has no whitespace trim to avoid modifying $actions$ --> \define tag-pill-inner(tag,icon,colour,fallbackTarget,colourA,colourB,element-tag,element-attributes,actions) \whitespace trim <$let diff --git a/editions/prerelease/tiddlers/Release 5.3.6.tid b/editions/prerelease/tiddlers/Release 5.3.6.tid index c681f3b0e..1d2c9b8b8 100644 --- a/editions/prerelease/tiddlers/Release 5.3.6.tid +++ b/editions/prerelease/tiddlers/Release 5.3.6.tid @@ -1,6 +1,6 @@ caption: 5.3.6 -created: 20240810120027897 -modified: 20240810120027897 +created: 20240830144941926 +modified: 20240830144941926 tags: ReleaseNotes title: Release 5.3.6 type: text/vnd.tiddlywiki @@ -12,20 +12,40 @@ description: Under development ! Translation improvements +<<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8531">> support for new language "Chinese (Hong Kong)" + This release includes improvements to the following translations: -* +* Chinese ! Plugin Improvements !! Geospatial Plugin * <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8404">> support for custom wikitext popups to be attached to map features +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8437">> ordering of latitude and longitude in geospatial operators +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8484">> crash when geomap contains an empty geolayer widget !! Markdown Plugin * <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8395">> strikethrough, superscript and subscript editor toolbar buttons * <<.link-badge-improved "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8402">> readability of Markdown links to other tiddlers +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8459">> image toolbar dropdown to editor toolbar +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8492">> colour for target footnote background +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8585">> settings tab +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8498">> support for the excision tool + +! TestCaseWidget and Related Improvements + +This release includes several fixes and improvements to the TestCaseWidget, its default template, and the related DataWidget and CompoundTiddlers format. These features were first introduced in [[Release 5.3.4]] and are undergoing continuous improvement as we work on integrating them more widely across the system. + +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8447">> new `$compound-filter` attribute for the DataWidget that allows other compound tiddlers to be imported. There is also a companion ''import-compound'' field for the TestCaseWidget template +* <<.link-badge-improved "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8514">> the TestCaseWidget default template to make it more modular +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8499">> support for an ''import'' field in TestCaseTiddlers, allowing additional tiddlers to be imported +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8416">> [[TestCaseWidget]] default template to allow wikitext within the test case narrative +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8449">> WikiText formatting buttons when editing CompoundTiddlers +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8450">> CompoundTiddlers type `text/vnd.tiddlywiki-multiple` to the editor type dropdown +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8409">> filesystem handling so that CompoundTiddlers are saved as .tid files ! Widget Improvements @@ -37,11 +57,28 @@ This release includes improvements to the following translations: ! Usability Improvements +* <<.link-badge-improved "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8530">> language descriptions by localising them * <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8407">> the contrast of plugin stability badges on hover +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8430">> a "copy to clipboard" button to the view template body template used for code tiddlers +* <<.link-badge-added "github.com/TiddlyWiki/TiddlyWiki5/pull/8441">> support for social media cards to be added to TiddlyWiki +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8518">> type attribute to input fields in control panel, allowing virtual keyboards to switch to the proper one when editing settings +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8558">> empty message to tag picker, search dropdown and advanced search +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8157">> a search button to the control panel tiddler fields tab +* <<.link-badge-improved "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8323">> (and <<.link-badge-here "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8324">>) the view and edit toolbars with more descriptive Aria labels ! Hackability Improvements -* +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8431">> support for the HTML entity `⁠` which can be useful for joining HTML elements without an unwanted linebreak +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8439">> a keyboard shortcut for opening the control panel (by default it is <kbd>ctrl</kbd>-<kbd>alt</kbd>-<kbd>C</kbd>) +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8182">> new [[Hidden Setting: Tag Pill Drag Filter]] that allows configuration of the tiddlers that are transferred when dragging a tag pill +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8384">> tests to ensure that the syntax elements `{% %}` and `{= =}` are reserved for external tooling, and will never be recognised by TiddlyWiki itself +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8462">> new cascades for the view template subtitle and tags +* <<.link-badge-improved "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8500">> excision tool implementation to make the excision tiddler title translatable +* <<.link-badge-improved "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8584">> editor toolbar buttons to use the new [[Conditional Shortcut Syntax]] +* <<.link-badge-improved "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8579">> page control toolbar buttons to use the new [[Conditional Shortcut Syntax]] +* <<.link-badge-improved "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8559">> [[WidgetMessage: tm-new-tiddler]] to allow tiddlers to be created with no tags field +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/7941">> ''startCount'' parameter to [[unusedtitle Macro]] +* <<.link-badge-added "https://github.com/TiddlyWiki/TiddlyWiki5/pull/7944">> trimSelection parameter to [[WidgetMessage: tm-edit-text-operation]] ! Bug Fixes @@ -49,28 +86,55 @@ This release includes improvements to the following translations: * <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8393">> crash when [[WidgetMessage: tm-copy-to-clipboard]] is passed an empty string * <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8399">> disengage "select all" when cancelling an import * <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8382">> [[transcludes Operator]] and [[backtranscludes Operator]] minor issue with transclusions made via a filtered attribute -* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8416">> [[TestCaseWidget]] default template to allow wikitext within the test case narrative +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/discussions/8428">> scroll top position when animation duration is zero +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8476">> importing $:/build tiddler when upgrading to avoid overwriting it +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/commit/d9ac4a823fe0f91c615ed33fa890069f88cc8ab9">> crash with RenderCommand when filename filter returns empty result +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8355">> display of language plugins +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8540">> (and <<.link-badge-here "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8546">>) display of non-square plugin icons +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8517">> appearance of input elements other than type `text` and `search` +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/commit/38081b86c97a795420515156fcd52177574be516">> crash with filesystem adaptor if the wiki folder is missing +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8413">> unwrapped oveflowed code blocks not showing scroll bars when setting "Wrap long lines in code blocks" to "No" in "Theme tweaks" +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/7317">> (and <<.link-badge-here "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8552">>) search input box outline in Chrome-like browsers +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8578">> problem with rapid typing in the advanced search filter tab +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8535">> crash with EditionsCommand if an edition directory does not have a [[tiddlywiki.info file|tiddlywiki.info Files]] +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/commit/b8fb9e6b21319e790e9aa7453ca265b0ed4898db">> DataWidget to allow title fields to be overwritten +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/commit/fa423e508ff5012423a1904bb17c9d61848732ee">> "Put Saver" to correctly interpret HTTP response codes +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8547">> invalid accept header in "Put Saver" +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8485">> duplicated search results in advanced search when more than one tiddlers are tagged with [[SystemTag: $:/tags/SearchResults]] +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/commit/7dfdbae812306875bac2445ca4ee505b406e3be1">> crash if the KeyboardWidget is used within a [[startup action|StartupActions]] +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8574">> suffix in the [[encodebase64 Operator]] and [[decodebase64 Operator]] +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8557">> overflow of floated elements ! Node.js Improvements -* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8409">> filesystem handling so that [[Compound Tiddlers]] are saved as .tid files +* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8339">> server crash when authenticating if newlines are contained in the site title ! Developer Improvements -* +* <<.link-badge-improved "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8423">> the browser checks used in $:/boot/bootprefix.js +* <<.link-badge-extended "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8494">> parse tree format to add `start`/`end` properties to table row and cell elements +* <<.link-badge-improved "https://github.com/TiddlyWiki/TiddlyWiki5/pull/8265">> and simplified plugin library edition usage ! Acknowledgements [[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki: <<.contributors """ +BramChen btheado flibbles +hoelzro kookma Leilei332 +linonetwo +michaeljmcd pmario +PotOfCoffee2Go saqimtiaz simonbaird springerspandrel +twMat +valpackett webplusai +wolfsprite """>> diff --git a/editions/test/tiddlers/tests/data/conditionals/Basic.tid b/editions/test/tiddlers/tests/data/conditionals/Basic.tid index ff2d2df4d..6e5046f56 100644 --- a/editions/test/tiddlers/tests/data/conditionals/Basic.tid +++ b/editions/test/tiddlers/tests/data/conditionals/Basic.tid @@ -5,7 +5,7 @@ tags: [[$:/tags/wiki-test-spec]] title: Text -This is a <% if [<something>match[one]] %>Elephant<% endif %>, I think. +This is a <%if [<something>match[one]] %>Elephant<%endif%>, I think. + title: Output diff --git a/editions/test/tiddlers/tests/data/conditionals/BlockMode.tid b/editions/test/tiddlers/tests/data/conditionals/BlockMode.tid index 45233baa4..c41b34563 100644 --- a/editions/test/tiddlers/tests/data/conditionals/BlockMode.tid +++ b/editions/test/tiddlers/tests/data/conditionals/BlockMode.tid @@ -6,23 +6,23 @@ tags: [[$:/tags/wiki-test-spec]] title: Output \procedure test(animal) -<% if [<animal>match[Elephant]] %> +<%if [<animal>match[Elephant]] %> ! It is an elephant -<% else %> +<%else%> -<% if [<animal>match[Giraffe]] %> +<%if [<animal>match[Giraffe]] %> ! It is a giraffe -<% else %> +<%else%> ! It is completely unknown -<% endif %> +<%endif%> -<% endif %> +<%endif%> \end diff --git a/editions/test/tiddlers/tests/data/conditionals/Else.tid b/editions/test/tiddlers/tests/data/conditionals/Else.tid index 7bc32b34e..ef42f198c 100644 --- a/editions/test/tiddlers/tests/data/conditionals/Else.tid +++ b/editions/test/tiddlers/tests/data/conditionals/Else.tid @@ -5,7 +5,7 @@ tags: [[$:/tags/wiki-test-spec]] title: Text -This is a <% if [<something>match[one]] %>Elephant<% else %>Crocodile<% endif %>, I think. +This is a <%if [<something>match[one]] %>Elephant<%else%>Crocodile<%endif%>, I think. + title: Output diff --git a/editions/test/tiddlers/tests/data/conditionals/Elseif.tid b/editions/test/tiddlers/tests/data/conditionals/Elseif.tid index d37f3380c..068ac31c9 100644 --- a/editions/test/tiddlers/tests/data/conditionals/Elseif.tid +++ b/editions/test/tiddlers/tests/data/conditionals/Elseif.tid @@ -5,7 +5,7 @@ tags: [[$:/tags/wiki-test-spec]] title: Text -This is a <% if [<something>match[one]] %>Elephant<% elseif [<something>match[two]] %>Antelope<% else %>Crocodile<% endif %>, I think. +This is a <%if [<something>match[one]] %>Elephant<%elseif [<something>match[two]] %>Antelope<%else%>Crocodile<%endif%>, I think. + title: Output diff --git a/editions/test/tiddlers/tests/data/conditionals/MissingEndIf.tid b/editions/test/tiddlers/tests/data/conditionals/MissingEndIf.tid index cacaf9869..ff01ca959 100644 --- a/editions/test/tiddlers/tests/data/conditionals/MissingEndIf.tid +++ b/editions/test/tiddlers/tests/data/conditionals/MissingEndIf.tid @@ -5,7 +5,7 @@ tags: [[$:/tags/wiki-test-spec]] title: Text -This is a <% if [<something>match[one]] %>Elephant +This is a <%if [<something>match[one]] %>Elephant + title: Output diff --git a/editions/test/tiddlers/tests/data/conditionals/MultipleResults.tid b/editions/test/tiddlers/tests/data/conditionals/MultipleResults.tid index baa966ed5..866c6d8f5 100644 --- a/editions/test/tiddlers/tests/data/conditionals/MultipleResults.tid +++ b/editions/test/tiddlers/tests/data/conditionals/MultipleResults.tid @@ -5,7 +5,7 @@ tags: [[$:/tags/wiki-test-spec]] title: Output -This is a <% if 1 2 3 4 5 6 %>Elephant<% endif %>, I think. +This is a <%if 1 2 3 4 5 6 %>Elephant<%endif%>, I think. + title: ExpectedResult diff --git a/editions/test/tiddlers/tests/data/conditionals/Nested.tid b/editions/test/tiddlers/tests/data/conditionals/Nested.tid index dffa791fc..e5ea9fc40 100644 --- a/editions/test/tiddlers/tests/data/conditionals/Nested.tid +++ b/editions/test/tiddlers/tests/data/conditionals/Nested.tid @@ -6,15 +6,15 @@ tags: [[$:/tags/wiki-test-spec]] title: Output \procedure test(animal) -<% if [<animal>match[Elephant]] %> +<%if [<animal>match[Elephant]] %> It is an elephant -<% else %> -<% if [<animal>match[Giraffe]] %> +<%else%> +<%if [<animal>match[Giraffe]] %> It is a giraffe -<% else %> +<%else%> It is completely unknown -<% endif %> -<% endif %> +<%endif%> +<%endif%> \end <<test "Giraffe">> diff --git a/editions/test/tiddlers/tests/data/conditionals/NestedElseif.tid b/editions/test/tiddlers/tests/data/conditionals/NestedElseif.tid index 6fba8cac8..bfc3e085c 100644 --- a/editions/test/tiddlers/tests/data/conditionals/NestedElseif.tid +++ b/editions/test/tiddlers/tests/data/conditionals/NestedElseif.tid @@ -7,20 +7,20 @@ title: Text \whitespace trim This is a - <% if [<something>match[one]] %> - <% if [<another>match[one]] %> + <%if [<something>match[one]] %> + <%if [<another>match[one]] %> Indian - <% elseif [<another>match[two]] %> + <%elseif [<another>match[two]] %> African - <% else %> + <%else%> Unknown - <% endif %> + <%endif%> Elephant - <% elseif [<something>match[two]] %> + <%elseif [<something>match[two]] %> Antelope - <% else %> + <%else%> Crocodile - <% endif %> + <%endif%> , I think. + title: Output diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params.tid index 5e1ae482d..c0ec65ec0 100644 --- a/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params.tid +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params.tid @@ -14,7 +14,15 @@ title: Output <<unusedtitle baseName:"About" separator:"-">> +<!-- v5.3.6 startCount --> + +<<unusedtitle startCount:"3">> + +<<unusedtitle startCount:"-1" baseName:"invalid start">> + +<<unusedtitle startCount:"aaa" baseName:"invalid count">> + + title: ExpectedResult -<p>New Tiddler</p><p>New Tiddler</p><p>anotherBase</p><p>About</p> \ No newline at end of file +<p>New Tiddler</p><p>New Tiddler</p><p>anotherBase</p><p>About</p><p>New Tiddler 3</p><p>invalid start</p><p>invalid count</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/template-startCount.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/template-startCount.tid new file mode 100644 index 000000000..83fc1686b --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/template-startCount.tid @@ -0,0 +1,27 @@ +title: Macros/unusedtitle/template-startCount +description: test <<unusedtitle>> with templates and startCount +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +<!-- test template basics --> + +<<unusedtitle template:"$basename$$separator$$count$xx" >> + +<<unusedtitle template:"$basename$$separator$$count$xx" startCount:"4" >> + +<<unusedtitle template:"$basename$$separator$$count:1$xx" startCount:"11">> + +<!-- test parameter edgecases --> + +<<unusedtitle template:"$basename$$separator$$count:2$xx" startCount:"" baseName:"emptyCount">> + +<<unusedtitle template:"$basename$$separator$$count$xx" startCount:"-1" separator:"" baseName:"invalid start" >> + +<<unusedtitle template:"$basename$$separator$$count$xx" startCount:"bbb" separator:"" baseName:"invalid count" >> + ++ +title: ExpectedResult + +<p>New Tiddler 0xx</p><p>New Tiddler 4xx</p><p>New Tiddler 11xx</p><p>emptyCount 00xx</p><p>invalid start 0xx</p><p>invalid count 0xx</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/template.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/template.tid index 66bd0f763..183ad42da 100644 --- a/editions/test/tiddlers/tests/data/macros/unusedtitle/template.tid +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/template.tid @@ -25,4 +25,4 @@ title: Output + title: ExpectedResult -<p>New Tiddler</p><p>count-missing</p><p>00-new</p><p>00-base</p><p>00-New Tiddler</p><p>00-asdf</p><p>00 asdf</p> \ No newline at end of file +<p>New Tiddler</p><p>count-missing0</p><p>00-new</p><p>00-base</p><p>00-New Tiddler</p><p>00-asdf</p><p>00 asdf</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/messages/tm-new-tiddler/create-a-new-tiddler-with-a-tag.tid b/editions/test/tiddlers/tests/data/messages/tm-new-tiddler/create-a-new-tiddler-with-a-tag.tid new file mode 100644 index 000000000..3f9204da8 --- /dev/null +++ b/editions/test/tiddlers/tests/data/messages/tm-new-tiddler/create-a-new-tiddler-with-a-tag.tid @@ -0,0 +1,38 @@ +title: Message/tm-new-tiddler/create-a-new-tiddler-with-a-tag +description: tm-new-tiddler message will create a new draft tiddler with a tag +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +<pre>{{Draft of 'New Tiddler'||output-template}}</pre> ++ +title: Actions + +<$navigator story="$:/StoryList"> + +<$action-sendmessage $message="tm-new-tiddler" + text="some text" + z-field="a" + tags="test [[with spaces]]" +/> + +</$navigator> + ++ +title: output-template + +<!-- This template is used for saving tiddlers in TiddlyWeb *.tid format --> +<$fields exclude='text bag created modified' template='$name$: $value$ +'></$fields> +<$view field="text" format="text" /> ++ +title: ExpectedResult + +<p><pre>draft.of: New Tiddler +draft.title: New Tiddler +tags: test [[with spaces]] +title: Draft of 'New Tiddler' +z-field: a + +some text</pre></p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/messages/tm-new-tiddler/default.tid b/editions/test/tiddlers/tests/data/messages/tm-new-tiddler/default.tid new file mode 100644 index 000000000..cba16f261 --- /dev/null +++ b/editions/test/tiddlers/tests/data/messages/tm-new-tiddler/default.tid @@ -0,0 +1,39 @@ +title: Message/tm-new-tiddler/default +description: tm-new-tiddler message will create a new draft tiddler +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +<pre>{{Draft of 'New Tiddler'||output-template}}</pre> ++ +title: Actions + +<$navigator story="$:/StoryList"> + +New in TW v5.3.6 + Create a draft tiddler which should have __no__ tags field + +<$action-sendmessage $message="tm-new-tiddler" + text="some text" + z-field="a" +/> + +</$navigator> + ++ +title: output-template + +<!-- This template is used for saving tiddlers in TiddlyWeb *.tid format --> +<$fields exclude='text bag created modified' template='$name$: $value$ +'></$fields> +<$view field="text" format="text" /> ++ +title: ExpectedResult + +<p><pre>draft.of: New Tiddler +draft.title: New Tiddler +title: Draft of 'New Tiddler' +z-field: a + +some text</pre></p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/messages/tm-new-tiddler/new-from-template-with-tag.tid b/editions/test/tiddlers/tests/data/messages/tm-new-tiddler/new-from-template-with-tag.tid new file mode 100644 index 000000000..aceeffdde --- /dev/null +++ b/editions/test/tiddlers/tests/data/messages/tm-new-tiddler/new-from-template-with-tag.tid @@ -0,0 +1,44 @@ +title: Message/tm-new-tiddler/new-from-template-with-tag +description: tm-new-tiddler create a draft from a template. Template has an empty tags field +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +<pre>{{ Draft of 'new-tiddler-template 1'||output-template}}</pre> ++ +title: Actions + +<$navigator story="$:/StoryList"> + +<$action-sendmessage $message="tm-new-tiddler" + $param="new-tiddler-template" + text="some text" + z-field="a" +/> + +</$navigator> + ++ +title: new-tiddler-template +asdf: asdf +tags: + ++ +title: output-template + +<!-- This template is used for saving tiddlers in TiddlyWeb *.tid format --> +<$fields exclude='text bag created modified' template='$name$: $value$ +'></$fields> +<$view field="text" format="text" /> ++ +title: ExpectedResult + +<p><pre>asdf: asdf +draft.of: new-tiddler-template 1 +draft.title: new-tiddler-template 1 +tags: +title: Draft of 'new-tiddler-template 1' +z-field: a + +some text</pre></p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/messages/tm-new-tiddler/new-from-template-without-tag.tid b/editions/test/tiddlers/tests/data/messages/tm-new-tiddler/new-from-template-without-tag.tid new file mode 100644 index 000000000..dfb815f09 --- /dev/null +++ b/editions/test/tiddlers/tests/data/messages/tm-new-tiddler/new-from-template-without-tag.tid @@ -0,0 +1,65 @@ +title: Message/tm-new-tiddler/new-from-template-without-tag +description: tm-new-tiddler create 2 drafts from a template. Template has no tags field +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +<pre>{{ Draft of 'new-tiddler-template 1'||output-template}}</pre> +<pre>{{ Draft of 'new-tiddler-template 2'||output-template}}</pre> ++ +title: Actions + +<$navigator story="$:/StoryList"> + +New in TW v5.3.6 + Create a new tiddler from a template, which has no tags field + So draft should also have __no__ tags field + +<$action-sendmessage $message="tm-new-tiddler" + $param="new-tiddler-template" + text="some text" + z-field="a" +/> + +Create a new tiddler from a template, which has no tag field +AND __add__ a tags field with the command below + +<$action-sendmessage $message="tm-new-tiddler" + $param="new-tiddler-template" + text="some text" + z-field="a" + tag="" +/> + +</$navigator> + ++ +title: new-tiddler-template +asdf: asdf + ++ +title: output-template + +<!-- This template is used for saving tiddlers in TiddlyWeb *.tid format --> +<$fields exclude='text bag created modified' template='$name$: $value$ +'></$fields> +<$view field="text" format="text" /> ++ +title: ExpectedResult + +<p><pre>asdf: asdf +draft.of: new-tiddler-template 1 +draft.title: new-tiddler-template 1 +title: Draft of 'new-tiddler-template 1' +z-field: a + +some text</pre> +<pre>asdf: asdf +draft.of: new-tiddler-template 2 +draft.title: new-tiddler-template 2 +tag: +title: Draft of 'new-tiddler-template 2' +z-field: a + +some text</pre></p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/messages/tm-new-tiddler/new-with-tag.tid b/editions/test/tiddlers/tests/data/messages/tm-new-tiddler/new-with-tag.tid new file mode 100644 index 000000000..9b52e7de1 --- /dev/null +++ b/editions/test/tiddlers/tests/data/messages/tm-new-tiddler/new-with-tag.tid @@ -0,0 +1,40 @@ +title: Message/tm-new-tiddler/new-with-tag +description: tm-new-tiddler message creates a draft tiddler with an empty tag field +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +<pre>{{Draft of 'New Tiddler'||output-template}}</pre> ++ +title: Actions + +<$navigator story="$:/StoryList"> + +Create a draft tiddler which __should have a tags field__ + +<$action-sendmessage $message="tm-new-tiddler" + text="some text" + z-field="a" + tag="" +/> + +</$navigator> + ++ +title: output-template + +<!-- This template is used for saving tiddlers in TiddlyWeb *.tid format --> +<$fields exclude='text bag created modified' template='$name$: $value$ +'></$fields> +<$view field="text" format="text" /> ++ +title: ExpectedResult + +<p><pre>draft.of: New Tiddler +draft.title: New Tiddler +tag: +title: Draft of 'New Tiddler' +z-field: a + +some text</pre></p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/tabs-macro/expected-html-tabs-horizontal-all.tid b/editions/test/tiddlers/tests/data/tabs-macro/expected-html-tabs-horizontal-all.tid deleted file mode 100644 index 61f8d4971..000000000 --- a/editions/test/tiddlers/tests/data/tabs-macro/expected-html-tabs-horizontal-all.tid +++ /dev/null @@ -1,5 +0,0 @@ -title: expected-html-tabs-horizontal-all -type: text/html -description: Horizontal tabs with all parameters active. This is the expected HTML output from a test in test-wikitext-tabs-macro.js - -<p><div class="tc-tab-set "><div class="tc-tab-buttons "><button class="" role="switch">t 1</button><button aria-checked="true" class=" tc-tab-selected" role="switch">t 2</button><button class="" role="switch">desc</button><button class="" role="switch">TabFour</button></div><div class="tc-tab-divider "></div><div class="tc-tab-content "><div class=" tc-reveal" hidden="true"></div><div class=" tc-reveal"><h2 class=""><a class="tc-tiddlylink tc-tiddlylink-resolves" href="#TabTwo">TabTwo</a></h2><p><p>Text tab 2</p></p></div><div class=" tc-reveal" hidden="true"></div><div class=" tc-reveal" hidden="true"></div></div></div></p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/tabs-macro/expected-html-tabs-horizontal.tid b/editions/test/tiddlers/tests/data/tabs-macro/expected-html-tabs-horizontal.tid deleted file mode 100644 index 0d1f2a416..000000000 --- a/editions/test/tiddlers/tests/data/tabs-macro/expected-html-tabs-horizontal.tid +++ /dev/null @@ -1,5 +0,0 @@ -title: expected-html-tabs-horizontal -type: text/html -description: Horizontal tabs test - This is the expected HTML output from a test in test-wikitext-tabs-macro.js - -<p><div class="tc-tab-set "><div class="tc-tab-buttons "><button class="" role="switch">t 1</button><button aria-checked="true" class=" tc-tab-selected" role="switch">t 2</button><button class="" role="switch">t 3</button><button class="" role="switch">TabFour</button></div><div class="tc-tab-divider "></div><div class="tc-tab-content "><div class=" tc-reveal" hidden="true"></div><div class=" tc-reveal"><p>Text tab 2</p></div><div class=" tc-reveal" hidden="true"></div><div class=" tc-reveal" hidden="true"></div></div></div></p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/tabs-macro/expected-html-tabs-vertical.tid b/editions/test/tiddlers/tests/data/tabs-macro/expected-html-tabs-vertical.tid deleted file mode 100644 index c45891073..000000000 --- a/editions/test/tiddlers/tests/data/tabs-macro/expected-html-tabs-vertical.tid +++ /dev/null @@ -1,5 +0,0 @@ -title: expected-html-tabs-vertical -type: text/html -description: Vertical tabs test -- This is the expected HTML output from the test in test-wikitext-tabs-macro.js - -<p><div class="tc-tab-set tc-vertical"><div class="tc-tab-buttons tc-vertical"><button class="" role="switch">t 1</button><button aria-checked="true" class=" tc-tab-selected" role="switch">t 2</button><button class="" role="switch">t 3</button><button class="" role="switch">TabFour</button></div><div class="tc-tab-divider tc-vertical"></div><div class="tc-tab-content tc-vertical"><div class=" tc-reveal" hidden="true"></div><div class=" tc-reveal"><p>Text tab 2</p></div><div class=" tc-reveal" hidden="true"></div><div class=" tc-reveal" hidden="true"></div></div></div></p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/tabs-macro/expected-test-tabs-horizontal-a.tid b/editions/test/tiddlers/tests/data/tabs-macro/expected-test-tabs-horizontal-a.tid new file mode 100644 index 000000000..1cb356182 --- /dev/null +++ b/editions/test/tiddlers/tests/data/tabs-macro/expected-test-tabs-horizontal-a.tid @@ -0,0 +1,5 @@ +title: expected-test-tabs-horizontal-a +type: text/html +description: Horizontal tabs test - This is the expected HTML output from a test in test-wikitext-tabs-macro.js + +<p><div class="tc-tab-set "><div class="tc-tab-buttons "><button class="" data-tab-title="TabOne" role="switch">t 1</button><button aria-checked="true" class=" tc-tab-selected" data-tab-title="TabTwo" role="switch">t 2</button><button class="" data-tab-title="TabThree" role="switch">t 3</button><button class="" data-tab-title="TabFour" role="switch">TabFour</button></div><div class="tc-tab-divider "></div><div class="tc-tab-content "><div class=" tc-reveal" hidden="true"></div><div class=" tc-reveal"><p>Text tab 2</p></div><div class=" tc-reveal" hidden="true"></div><div class=" tc-reveal" hidden="true"></div></div></div></p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/tabs-macro/expected-test-tabs-horizontal-all.tid b/editions/test/tiddlers/tests/data/tabs-macro/expected-test-tabs-horizontal-all.tid new file mode 100644 index 000000000..418510172 --- /dev/null +++ b/editions/test/tiddlers/tests/data/tabs-macro/expected-test-tabs-horizontal-all.tid @@ -0,0 +1,5 @@ +title: expected-test-tabs-horizontal-all +type: text/html +description: Horizontal tabs with all parameters active. This is the expected HTML output from a test in test-wikitext-tabs-macro.js + +<p><div class="tc-tab-set "><div class="tc-tab-buttons "><button class="" data-tab-title="TabOne" role="switch">t 1</button><button aria-checked="true" class=" tc-tab-selected" data-tab-title="TabTwo" role="switch">t 2</button><button class="" data-tab-title="TabThree" role="switch">desc</button><button class="" data-tab-title="TabFour" role="switch">TabFour</button></div><div class="tc-tab-divider "></div><div class="tc-tab-content "><div class=" tc-reveal" hidden="true"></div><div class=" tc-reveal"><h2 class="">TabTwo</h2><p><p>Text tab 2</p></p></div><div class=" tc-reveal" hidden="true"></div><div class=" tc-reveal" hidden="true"></div></div></div></p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/tabs-macro/expected-test-tabs-vertical.tid b/editions/test/tiddlers/tests/data/tabs-macro/expected-test-tabs-vertical.tid new file mode 100644 index 000000000..3f1f344f9 --- /dev/null +++ b/editions/test/tiddlers/tests/data/tabs-macro/expected-test-tabs-vertical.tid @@ -0,0 +1,5 @@ +title: expected-test-tabs-vertical +type: text/html +description: Vertical tabs test -- This is the expected HTML output from the test in test-wikitext-tabs-macro.js + +<p><div class="tc-tab-set tc-vertical"><div class="tc-tab-buttons tc-vertical"><button class="" data-tab-title="TabOne" role="switch">t 1</button><button aria-checked="true" class=" tc-tab-selected" data-tab-title="TabTwo" role="switch">t 2</button><button class="" data-tab-title="TabThree" role="switch">t 3</button><button class="" data-tab-title="TabFour" role="switch">TabFour</button></div><div class="tc-tab-divider tc-vertical"></div><div class="tc-tab-content tc-vertical"><div class=" tc-reveal" hidden="true"></div><div class=" tc-reveal"><p>Text tab 2</p></div><div class=" tc-reveal" hidden="true"></div><div class=" tc-reveal" hidden="true"></div></div></div></p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/test-wikitext-tabs-macro.js b/editions/test/tiddlers/tests/test-wikitext-tabs-macro.js index 39f061d11..973f6fe66 100644 --- a/editions/test/tiddlers/tests/test-wikitext-tabs-macro.js +++ b/editions/test/tiddlers/tests/test-wikitext-tabs-macro.js @@ -1,7 +1,7 @@ /*\ title: test-wikitext-tabs-macro.js type: application/javascript -tags: [[$:/tags/test-spec-disabled]] +tags: [[$:/tags/test-spec]] Tests the core tabs macro by comparing the HTML output with a stored template. Intended to permit future readability improvements. @@ -17,70 +17,67 @@ Adding new functionality will probably change the "expected" html structure. describe("Tabs-macro HTML tests", function() { - var expected = $tw.wiki.getTiddler("expected-html-tabs-horizontal"), - expectedAll = $tw.wiki.getTiddler("expected-html-tabs-horizontal-all"), - expectedVert = $tw.wiki.getTiddler("expected-html-tabs-vertical"), +// This code can be copy pasted into the browser console for easy testing + + // the expected tiddlers can be found at ./data/tabs-macro/ + var expected = $tw.wiki.getTiddler("expected-test-tabs-horizontal-a"), + expectedAll = $tw.wiki.getTiddler("expected-test-tabs-horizontal-all"), + expectedVert = $tw.wiki.getTiddler("expected-test-tabs-vertical"), coreTabsTiddler = $tw.wiki.getTiddler("$:/core/macros/tabs"); - // Create a wiki - var wiki = new $tw.Wiki(); + // Create a wiki with test tiddlers // Add a couple of tiddlers - wiki.addTiddler({title: "TabOne", text: "Text tab 1", caption:"t 1"}); - wiki.addTiddler({title: "TabTwo", text: "Text tab 2", caption:"t 2"}); + $tw.wiki.addTiddler(new $tw.Tiddler({title: "TabOne", text: "Text tab 1", caption:"t 1"},$tw.wiki.getModificationFields())); + $tw.wiki.addTiddler(new $tw.Tiddler({title: "TabTwo", text: "Text tab 2", caption:"t 2"},$tw.wiki.getModificationFields())); // TabThree shows description used in button-template instead of caption - wiki.addTiddler({title: "TabThree", text: "Text tab 3", caption:"t 3", description:"desc"}); + $tw.wiki.addTiddler(new $tw.Tiddler({title: "TabThree", text: "Text tab 3", caption:"t 3", description:"desc"},$tw.wiki.getModificationFields())); // Tab Four has no caption field, so title will be used - wiki.addTiddler({title: "TabFour", text: "Text tab 4"}); + $tw.wiki.addTiddler(new $tw.Tiddler({title: "TabFour", text: "Text tab 4"},$tw.wiki.getModificationFields())); // Template tiddlers - wiki.addTiddler({ title: "body-template", - text: '!! <<currentTab>>\n\n<$transclude tiddler=<<currentTab>> mode="block"/>'}); - wiki.addTiddler({ title: "button-template", - text: '<$transclude tiddler=<<currentTab>> field="description"><$transclude tiddler=<<currentTab>> field="caption"><$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/></$transclude></$transclude>'}); + $tw.wiki.addTiddler(new $tw.Tiddler({title: "body-template", "code-body":"yes", + text: '!! <<currentTab>>\n\n<$transclude tiddler=<<currentTab>> mode="block"/>'},$tw.wiki.getModificationFields())); + $tw.wiki.addTiddler(new $tw.Tiddler({title: "button-template", "code-body":"yes", + text: '<$transclude tiddler=<<currentTab>> field="description"><$transclude tiddler=<<currentTab>> field="caption"><$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/></$transclude></$transclude>'},$tw.wiki.getModificationFields())); // tabs macro cloned, to be used with \\import - wiki.addTiddler({title: "tabs-macro-definition", text: coreTabsTiddler.fields.text}); + $tw.wiki.addTiddler(new $tw.Tiddler({title: "tabs-macro-definition", "code-body":"yes", text: coreTabsTiddler.fields.text},$tw.wiki.getModificationFields())); // horizontal tabs test uses `tabsList`, `default` and `state` -- unnamed params - wiki.addTiddler({title: "test-tabs-macro-horizontal", text: '\\import [[tabs-macro-definition]]\n<<tabs "TabOne TabTwo TabThree TabFour" "TabTwo" "$:/state/test-tab-01">>'}); + $tw.wiki.addTiddler(new $tw.Tiddler( + {title: "test-tabs-horizontal", text: '\\import [[tabs-macro-definition]]\n<<tabs "TabOne TabTwo TabThree TabFour" "TabTwo" "$:/state/test-tab-01">>'}, + $tw.wiki.getModificationFields()) + ); // horizontal tabs test adds `template`, `buttonTemplate` and `explicitState` as named params - wiki.addTiddler({title: "test-tabs-macro-horizontal-all", text: '\\import [[tabs-macro-definition]]\n<<tabs "TabOne TabTwo TabThree TabFour" "TabTwo" "$:/state/test-tab-01" template:"body-template" buttonTemplate:"button-template" explicitState:"$:/state/explicit">>'}); + $tw.wiki.addTiddler(new $tw.Tiddler( + {title: "test-tabs-horizontal-all", text: '\\import [[tabs-macro-definition]]\n<<tabs "TabOne TabTwo TabThree TabFour" "TabTwo" "$:/state/test-tab-01" template:"body-template" buttonTemplate:"button-template" explicitState:"$:/state/explicit">>'}, + $tw.wiki.getModificationFields()) + ); // vertical tabs test. Same params as test 1 - wiki.addTiddler({title: "test-tabs-macro-vertical", text: '\\import [[tabs-macro-definition]]\n<<tabs "TabOne TabTwo TabThree TabFour" "TabTwo" "$:/state/test-tab-02" "tc-vertical">>'}); + $tw.wiki.addTiddler(new $tw.Tiddler( + {title: "test-tabs-vertical", text: '\\import [[tabs-macro-definition]]\n<<tabs "TabOne TabTwo TabThree TabFour" "TabTwo" "$:/state/test-tab-02" "tc-vertical">>'}, + $tw.wiki.getModificationFields()) + ); + +// End This code can be copy pasted into the browser console /* ----------------- / Run the tests --------------------*/ // horizontal -/* - xit("should render horizontal tabs v5.2.1", function() { - expect(wiki.renderTiddler("text/html","test-tabs-macro-horizontal")).toBe(expected.fields.text); - }); - - xit("should render horizontal tabs macro with all parameters modified V5.2.1", function() { - expect(wiki.renderTiddler("text/html","test-tabs-macro-horizontal-all")).toBe(expectedAll.fields.text); - }); - - // vertical - xit("should render tabs vertical tabs v5.2.1", function() { - expect(wiki.renderTiddler("text/html","test-tabs-macro-vertical")).toBe(expectedVert.fields.text); - }); -*/ - // Future tests - // horizontal it("should render 'horizontal' tabs from v5.2.2 and up with whitespace trim", function() { - expect(wiki.renderTiddler("text/html","test-tabs-macro-horizontal")).toBe(expected.fields.text.replace(/\n/g,"")); + expect($tw.wiki.renderTiddler("text/html","test-tabs-horizontal")).toBe(expected.fields.text.replace(/\n/g,"")); }); it("should render all 'horizontal' tabs from v5.2.2 and up with whitespace trim", function() { - expect(wiki.renderTiddler("text/html","test-tabs-macro-horizontal-all")).toBe(expectedAll.fields.text.replace(/\n/g,"")); + expect($tw.wiki.renderTiddler("text/html","test-tabs-horizontal-all")).toBe(expectedAll.fields.text.replace(/\n/g,"")); }); // vertical it("should render 'vertical' tabs from v5.2.2 and up with whitespace trim", function() { - expect(wiki.renderTiddler("text/html","test-tabs-macro-vertical")).toBe(expectedVert.fields.text.replace(/\n/g,"")); + expect($tw.wiki.renderTiddler("text/html","test-tabs-vertical")).toBe(expectedVert.fields.text.replace(/\n/g,"")); }); }); diff --git a/editions/tw5.com/tiddlers/Core Classes.tid b/editions/tw5.com/tiddlers/Core Classes.tid new file mode 100644 index 000000000..ea21246df --- /dev/null +++ b/editions/tw5.com/tiddlers/Core Classes.tid @@ -0,0 +1,16 @@ +created: 20240421142359127 +modified: 20240422090116239 +tags: Reference +title: Core Classes + +~TiddlyWiki class definitions are ''prefixed'' with `tc-` and are mainly used in the "vanilla base" theme. The ''tc-'' prefix ''is reserved'' for ~TiddlyWiki, so it should not be used for user defined classes. + +Users, especially plugin developers, should use their own prefixes eg: mytc- or something similar. + +The following info can also be found in the $:/ControlPanel ''-> Advanced -> Stylesheets'' tab + +All stylesheets used in this wiki are: <small>(shadow tiddlers are bold)</small> + +<<list-links filter:"[all[shadows+tiddlers]tag[$:/tags/Stylesheet]]">> + +Also see: [[Utility Classes]] \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/Core Functions.tid b/editions/tw5.com/tiddlers/Core Functions.tid new file mode 100644 index 000000000..cf9e6b300 --- /dev/null +++ b/editions/tw5.com/tiddlers/Core Functions.tid @@ -0,0 +1,8 @@ +created: 20240421144224104 +modified: 20240422090925417 +tags: Reference +title: Core Functions + +<!-- TODO Placeholder - Can be improved once the new "dumpvariables" macro is finished --> + +Also see: [[Functions]] \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/Core Messages.tid b/editions/tw5.com/tiddlers/Core Messages.tid new file mode 100644 index 000000000..597bc6643 --- /dev/null +++ b/editions/tw5.com/tiddlers/Core Messages.tid @@ -0,0 +1,10 @@ +created: 20240421144407522 +modified: 20240422091247905 +tags: Reference +title: Core Messages + +{{||Messages}} + +The following widget messages are implemented by the core: + +<<list-links filter:"[tag[Messages]]" class:"multi-columns">> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/Core Procedures.tid b/editions/tw5.com/tiddlers/Core Procedures.tid new file mode 100644 index 000000000..ce2a01719 --- /dev/null +++ b/editions/tw5.com/tiddlers/Core Procedures.tid @@ -0,0 +1,8 @@ +created: 20240422090331513 +modified: 20240422090918289 +tags: Reference +title: Core Procedures + +<!-- TODO Placeholder - Can be improved once the new "dumpvariables" macro is finished --> + +Also see: [[Procedures]] \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/Core Widgets.tid b/editions/tw5.com/tiddlers/Core Widgets.tid new file mode 100644 index 000000000..c38a3e0c0 --- /dev/null +++ b/editions/tw5.com/tiddlers/Core Widgets.tid @@ -0,0 +1,10 @@ +created: 20240422083130158 +modified: 20240422083155753 +tags: Reference +title: Core Widgets + +{{Widgets}} + +The following classes of widget are built into the core: + +<<list-links "[tag[Widgets]]" class:"multi-columns">> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/concepts/Macros.tid b/editions/tw5.com/tiddlers/concepts/Macros.tid index 884551996..e71f80077 100644 --- a/editions/tw5.com/tiddlers/concepts/Macros.tid +++ b/editions/tw5.com/tiddlers/concepts/Macros.tid @@ -1,6 +1,6 @@ created: 20140211171341271 -modified: 20230922094937115 -tags: Concepts Reference +modified: 20240422084520179 +tags: Concepts [[Core Macros]] title: Macros type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/concepts/Messages.tid b/editions/tw5.com/tiddlers/concepts/Messages.tid index 77c9df290..968a2509f 100644 --- a/editions/tw5.com/tiddlers/concepts/Messages.tid +++ b/editions/tw5.com/tiddlers/concepts/Messages.tid @@ -1,11 +1,8 @@ created: 20140226083311937 -modified: 20211117042057208 -tags: Concepts Reference +modified: 20240422091319082 +tags: Concepts [[Core Messages]] title: Messages type: text/vnd.tiddlywiki -Widget ''messages'' are generated by [[Widgets]] in response to user actions. Messages have a <<.param name>>, an optional primary <<.param parameter>>, and one or more optional named parameters. These messages travel up the widget tree where they are handled by ancestor widgets or the core itself. +Widget [[messages|Core Messages]] are generated by [[Widgets]] in response to user actions. Messages have a <<.param name>>, an optional primary <<.param parameter>>, and one or more optional named parameters. These messages travel up the widget tree where they are handled by ancestor widgets or the core itself. -The following widget messages are implemented by the core: - -<<list-links "[tag[Messages]]">> diff --git a/editions/tw5.com/tiddlers/concepts/TestCaseTiddlers.tid b/editions/tw5.com/tiddlers/concepts/TestCaseTiddlers.tid index fae4bab55..4d30dc75b 100644 --- a/editions/tw5.com/tiddlers/concepts/TestCaseTiddlers.tid +++ b/editions/tw5.com/tiddlers/concepts/TestCaseTiddlers.tid @@ -1,5 +1,5 @@ created: 20240507221902644 -modified: 20240729083054531 +modified: 20240808020847667 tags: Concepts title: TestCaseTiddlers type: text/vnd.tiddlywiki @@ -14,8 +14,9 @@ Test case tiddlers have the following ''fields'': |<<.field type>> |Needs to be set to `text/vnd.tiddlywiki-multiple` | |<<.field tags>> |Test cases are tagged [[$:/tags/wiki-test-spec]]. Test cases that intentionally fail are tagged [[$:/tags/wiki-test-spec-failing]] | |<<.field description>> |Descriptive heading for the test, intended to make it easy to identify the test | -|<<.field display-format>> |Optional, defaults to `wikitext`. Set to `plaintext` to cause the output to be rended as plain text | -|<<.field import-compound>> |<<.from-version "5.3.6">> A filter string, that defines a list of compound tiddlers, that should be imported. See: <<.wlink DataWidget>> widget | +|<<.field display-format>> |Optional, defaults to `wikitext`. Set to `plaintext` to cause the output to be rendered as plain text | +|<<.field import>> |<<.from-version "5.3.6">> A filter string that defines a list of tiddlers to import | +|<<.field import-compound>> |<<.from-version "5.3.6">> A filter string that defines a list of compound tiddlers to import. See: <<.wlink DataWidget>> widget | Test case tiddlers with the appropriate tag are shown in the $:/ControlPanel ''-> Advanced -> Test Cases '' diff --git a/editions/tw5.com/tiddlers/customising/Alternative page layouts.tid b/editions/tw5.com/tiddlers/customising/Alternative page layouts.tid index 071d00dbd..eb1afd2b7 100644 --- a/editions/tw5.com/tiddlers/customising/Alternative page layouts.tid +++ b/editions/tw5.com/tiddlers/customising/Alternative page layouts.tid @@ -1,5 +1,5 @@ created: 20201123172925848 -modified: 20240627060629394 +modified: 20240801020629394 tags: [[Customise TiddlyWiki]] title: Alternative page layouts type: text/vnd.tiddlywiki @@ -23,9 +23,8 @@ This alternative page template can either be a tweaked and modified version of t tc-page-container tc-language-$(languageTitle)$ your-plugin-name-container \end \procedure redirected-navigate-actions() - <$action-setfield $tiddler="$:/layout" text="" $timestamp="no"> - <$action-navigate $to=<<event-navigateTo>> $scroll="yes" /> - </$action-setfield> + <$action-setfield $tiddler="$:/layout" text="" $timestamp="no" /> + <$action-navigate $to=<<event-navigateTo>> $scroll="yes" /> \end <$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}> diff --git a/editions/tw5.com/tiddlers/definitions/JeremyRuston.tid b/editions/tw5.com/tiddlers/definitions/JeremyRuston.tid index bf139ea1e..a63f3df68 100644 --- a/editions/tw5.com/tiddlers/definitions/JeremyRuston.tid +++ b/editions/tw5.com/tiddlers/definitions/JeremyRuston.tid @@ -15,6 +15,7 @@ I'm the original inventor of TiddlyWiki. You can hire me through [[Intertwingled Further information: +* A recording of the [[keynote I gave at QCon London in April 2024|https://www.infoq.com/presentations/bbc-micro/]], and the [[discussion on talk.tiddlywiki.org|https://talk.tiddlywiki.org/t/recording-of-jeremys-keynote-at-qcon-london-april-2024/10505]]. The talk mixes some nostalgia about my teenage activities with the BBC Micro with thoughts on the development of the software industry and insights gained from working with TiddlyWiki * An [[interview with me in The Inquirer|http://www.theinquirer.net/inquirer/feature/2105529/bt-software-engineer-tells-telco-source]] by Wendy Grossman * A [[hilarious interview with me|https://www.youtube.com/watch?v=auyIhw8MTmQ]] from British television in 1983 * Here's a video of a presentation I did in 2007 called [["How to Start an Open Source Project"|http://vimeo.com/856110]]. diff --git a/editions/tw5.com/tiddlers/definitions/Tiddlyhost.tid b/editions/tw5.com/tiddlers/definitions/Tiddlyhost.tid index 8dee477da..3a9140237 100644 --- a/editions/tw5.com/tiddlers/definitions/Tiddlyhost.tid +++ b/editions/tw5.com/tiddlers/definitions/Tiddlyhost.tid @@ -1,12 +1,11 @@ -title: Tiddlyhost -tags: Definitions created: 20230410105035569 modified: 20230410105035569 +tags: Definitions +title: Tiddlyhost +type: text/vnd.tiddlywiki <span style="float:right;">[img width=140 [Tiddlyhost Logo]]</span> [[Tiddlyhost.com|https://tiddlyhost.com/]] is a hosting service for TiddlyWiki created by Simon Baird. Once you sign up and confirm your email you can create "sites", (i.e. ~TiddlyWikis), with support for online saving. Sites can be private or public, and you can optionally list them on the taggable and searchable [[Tiddlyhost Hub|https://tiddlyhost.com/hub]] where they'll be discoverable by others. Unlike [[TiddlySpot|Saving on TiddlySpot]], [[Tiddlyhost|https://tiddlyhost.com]] is secure, open source, and has proper support for TiddlyWiki5. It also allows uploading existing ~TiddlyWiki files, supports TiddlyWikiClassic, and lets you claim ownership of your ~TiddlySpot sites. For more information see the [[FAQ|https://github.com/simonbaird/tiddlyhost/wiki/FAQ]] and the [[About|https://tiddlyhost.com/about]] page. - -<div style="clear: both;"/> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/definitions/Xememex.tid b/editions/tw5.com/tiddlers/definitions/Xememex.tid index e69c17e8b..8f3fc1dd6 100644 --- a/editions/tw5.com/tiddlers/definitions/Xememex.tid +++ b/editions/tw5.com/tiddlers/definitions/Xememex.tid @@ -1,7 +1,8 @@ -title: Xememex -tags: Definitions created: 20230410105035569 modified: 20230410105035569 +tags: Definitions +title: Xememex +type: text/vnd.tiddlywiki <span style="float:right;">[img width=340 [Xememex Logo]]</span> @@ -10,5 +11,3 @@ Xememex is a multiuser TiddlyWiki from [[Intertwingled Innovations]]. It allows The largest customer implementation has hundreds of online wikis with thousands of users. See https://manuals.annafreud.org/ Xememex is currently only available under commercial terms from Intertwingled Innovations. Contact [[Jeremy Ruston at Intertwingled Innovations|mailto:jeremy@intertwingledinnovations.com]] for more details. - -<div style="clear: both;"/> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/empty-tag-node-template.tid b/editions/tw5.com/tiddlers/empty-tag-node-template.tid index 79905b77c..96c77e76b 100644 --- a/editions/tw5.com/tiddlers/empty-tag-node-template.tid +++ b/editions/tw5.com/tiddlers/empty-tag-node-template.tid @@ -5,8 +5,8 @@ tags: $:/tags/ViewTemplate title: $:/editions/tw5.com/empty-tag-node-template type: -<% if [<storyTiddler>!has[text]!has[tags]tagging[]] %> +<%if [<storyTiddler>!has[text]!has[tags]tagging[]] %> The following tiddlers are tagged with <<tag>>: <<list-links filter:"[<storyTiddler>!has[text]!has[tags]tagging[]]" class:"multi-columns">> -<% endif %> \ No newline at end of file +<%endif%> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/compare Operator.tid b/editions/tw5.com/tiddlers/filters/compare Operator.tid index debf09ead..b86e8c729 100644 --- a/editions/tw5.com/tiddlers/filters/compare Operator.tid +++ b/editions/tw5.com/tiddlers/filters/compare Operator.tid @@ -1,15 +1,15 @@ +caption: compare created: 20200412181551706 modified: 20200412181551706 +op-input: a [[selection of titles|Title Selection]] +op-neg-output: those input titles <<.em not>> matching the specified comparison +op-output: those input titles matching the specified comparison +op-parameter: the value to compare +op-purpose: filter the input by comparing each item against the parameter +op-suffix: the <<.op compare>> operator uses a rich suffix, see below for details tags: [[Filter Operators]] [[Mathematics Operators]] [[String Operators]] [[Negatable Operators]] title: compare Operator type: text/vnd.tiddlywiki -caption: compare -op-purpose: filter the input by comparing each item against the parameter -op-input: a [[selection of titles|Title Selection]] -op-suffix: the <<.op compare>> operator uses a rich suffix, see below for details -op-parameter: the value to compare -op-output: those input titles matching the specified comparison -op-neg-output: those input titles <<.em not>> matching the specified comparison <<.from-version "5.1.22">>The <<.op compare>> filter allows numerical, string and date comparisons to be performed. @@ -21,7 +21,7 @@ The <<.op compare>> operator uses an extended syntax to specify all the options: The ''type'' can be: -* "number" - invalid numbers are interpreted as zero +* "number" - (default) invalid numbers are interpreted as zero * "integer" - invalid integers are interpreted as zero * "string" * "date" - invalid dates are interpreted as 1st January 1970 @@ -43,7 +43,7 @@ For example: ``` [[2]compare:number:eq[3]] returns nothing [[2]compare:number:lt[3]] returns "2" -[[2]compare:number:eq[2]] returns "2" +[[2]compare::eq[2]] returns "2" ``` Note that several of the variants of the <<.op compare>> operator are synonyms for existing operators, and are provided in the interests of consistency. For example, `compare:string:eq[x]` is a synonym for `match[x]`. diff --git a/editions/tw5.com/tiddlers/filters/decodebase64 Operator (Examples).tid b/editions/tw5.com/tiddlers/filters/decodebase64 Operator (Examples).tid new file mode 100644 index 000000000..6a79011e3 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/decodebase64 Operator (Examples).tid @@ -0,0 +1,10 @@ +created: 20240831025944330 +modified: 20240831041423075 +tags: [[decodebase64 Operator]] [[Operator Examples]] +title: decodebase64 Operator (Examples) + +<<.operator-example 1 "[[dGVzdA==]decodebase64[]]">> + +<<.operator-example 2 "[[8J+Yjg==]decodebase64[]]">> + +<<.operator-example 3 "[[8J-Yjg==]decodebase64:urlsafe[]]">> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/decodebase64 Operator.tid b/editions/tw5.com/tiddlers/filters/decodebase64 Operator.tid index 0d3a61920..5421ddf8f 100644 --- a/editions/tw5.com/tiddlers/filters/decodebase64 Operator.tid +++ b/editions/tw5.com/tiddlers/filters/decodebase64 Operator.tid @@ -1,14 +1,16 @@ caption: decodebase64 +created: 20240831034919913 +from-version: 5.2.6 +modified: 20240831034931703 op-input: a [[selection of titles|Title Selection]] op-output: the input with base 64 decoding applied -op-suffix: optional: `binary` to produce binary output, `urlsafe` for URL-safe input op-parameter: op-parameter-name: -op-purpose: apply base 64 decoding to a string +op-purpose: apply [[base 64|Base64]] decoding to a string +op-suffix: optional: `binary` to produce binary output, `urlsafe` for URL-safe input tags: [[Filter Operators]] [[String Operators]] title: decodebase64 Operator type: text/vnd.tiddlywiki -from-version: 5.2.6 See Mozilla Developer Network for details of [[base 64 encoding|https://developer.mozilla.org/en-US/docs/Glossary/Base64]]. TiddlyWiki uses [[library code from @nijikokun|https://gist.github.com/Nijikokun/5192472]] to handle the conversion. diff --git a/editions/tw5.com/tiddlers/filters/encodebase64 Operator (Examples).tid b/editions/tw5.com/tiddlers/filters/encodebase64 Operator (Examples).tid new file mode 100644 index 000000000..c49aff77a --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/encodebase64 Operator (Examples).tid @@ -0,0 +1,10 @@ +created: 20240831025156306 +modified: 20240831041537886 +tags: [[encodebase64 Operator]] [[Operator Examples]] +title: encodebase64 Operator (Examples) + +<<.operator-example 1 "[[test]encodebase64[]]">> + +<<.operator-example 2 "[[😎]encodebase64[]]">> + +<<.operator-example 3 "[[😎]encodebase64:urlsafe[]]">> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/encodebase64 Operator.tid b/editions/tw5.com/tiddlers/filters/encodebase64 Operator.tid index a7943d726..918d656d2 100644 --- a/editions/tw5.com/tiddlers/filters/encodebase64 Operator.tid +++ b/editions/tw5.com/tiddlers/filters/encodebase64 Operator.tid @@ -1,14 +1,16 @@ caption: encodebase64 +created: 20240831034955575 +from-version: 5.2.6 +modified: 20240831035003716 op-input: a [[selection of titles|Title Selection]] op-output: the input with base 64 encoding applied -op-suffix: optional: `binary` to treat input as binary data, `urlsafe` for URL-safe output op-parameter: op-parameter-name: -op-purpose: apply base 64 encoding to a string +op-purpose: apply [[base 64|Base64]] encoding to a string +op-suffix: optional: `binary` to treat input as binary data, `urlsafe` for URL-safe output tags: [[Filter Operators]] [[String Operators]] title: encodebase64 Operator type: text/vnd.tiddlywiki -from-version: 5.2.6 See Mozilla Developer Network for details of [[base 64 encoding|https://developer.mozilla.org/en-US/docs/Glossary/Base64]]. TiddlyWiki uses [[library code from @nijikokun|https://gist.github.com/Nijikokun/5192472]] to handle the conversion. diff --git a/editions/tw5.com/tiddlers/filters/examples/compare Operator (Examples).tid b/editions/tw5.com/tiddlers/filters/examples/compare Operator (Examples).tid index f729dc5d2..76488503a 100644 --- a/editions/tw5.com/tiddlers/filters/examples/compare Operator (Examples).tid +++ b/editions/tw5.com/tiddlers/filters/examples/compare Operator (Examples).tid @@ -9,3 +9,4 @@ type: text/vnd.tiddlywiki <<.operator-example 3 "[list[Days of the Week]compare:string:gt[M]compare:string:lt[W]]">> <<.operator-example 4 "[[v5.1.23-prerelease]compare:version:gt[v5.1.22]]">> <<.operator-example 5 "[[1]compare:number:gt[2]then[yes]else[no]]">> +<<.operator-example 6 "[[-2]compare::lt[-1]]">> diff --git a/editions/tw5.com/tiddlers/filters/list.tid b/editions/tw5.com/tiddlers/filters/list.tid index be3908b86..8df76103c 100644 --- a/editions/tw5.com/tiddlers/filters/list.tid +++ b/editions/tw5.com/tiddlers/filters/list.tid @@ -1,16 +1,16 @@ +caption: list created: 20140410103123179 -modified: 20211115092315020 +modified: 20240811083650364 +op-input: ignored +op-neg-input: a [[selection of titles|Title Selection]] +op-neg-output: those input titles that are <<.em not>> mentioned at <<.place R>> +op-output: the titles stored as a [[title list|Title List]] at <<.place R>> +op-parameter: a [[reference|TextReference]] to a [[field|TiddlerFields]] or [[index|DataTiddlers]] of a particular tiddler +op-parameter-name: R +op-purpose: select titles via a list field tags: [[Filter Operators]] [[Field Operators]] [[Selection Constructors]] [[Negatable Operators]] title: list Operator type: text/vnd.tiddlywiki -caption: list -op-purpose: select titles via a list field -op-input: ignored -op-neg-input: a [[selection of titles|Title Selection]] -op-parameter: a [[reference|TextReference]] to a [[field|TiddlerFields]] or [[property|DataTiddlers]] of a particular tiddler -op-parameter-name: R -op-output: the titles stored as a [[title list|Title List]] at <<.place R>> -op-neg-output: those input titles that are <<.em not>> mentioned at <<.place R>> <<.place R>> can reference either a field or a property. See [[TextReference]] for the syntax. diff --git a/editions/tw5.com/tiddlers/functions/Functions.tid b/editions/tw5.com/tiddlers/functions/Functions.tid index 028747a34..0911fdd6d 100644 --- a/editions/tw5.com/tiddlers/functions/Functions.tid +++ b/editions/tw5.com/tiddlers/functions/Functions.tid @@ -1,6 +1,6 @@ created: 20221009124003601 -modified: 20240619211228560 -tags: Concepts Reference +modified: 20240422084850412 +tags: Concepts [[Core Functions]] title: Functions type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/hellothere/HelloThere.tid b/editions/tw5.com/tiddlers/hellothere/HelloThere.tid index 88125a043..4f59bdcbb 100644 --- a/editions/tw5.com/tiddlers/hellothere/HelloThere.tid +++ b/editions/tw5.com/tiddlers/hellothere/HelloThere.tid @@ -9,7 +9,7 @@ type: text/vnd.tiddlywiki Use it to keep your [[to-do list|TaskManagementExample]], to plan an [[essay or novel|"TiddlyWiki for Scholars" by Alberto Molina]], or to organise your wedding. Record every thought that crosses your brain, or build a flexible and responsive website. -TiddlyWiki lets you choose where to keep your data, guaranteeing that in the decades to come you will [[still be able to use|Future Proof]] the notes you take today. +~TiddlyWiki lets you choose where to keep your data, guaranteeing that in the decades to come you will [[still be able to use|Future Proof]] the notes you take today. !! ''Quick Start'' @@ -19,7 +19,7 @@ TiddlyWiki lets you choose where to keep your data, guaranteeing that in the dec </$list> </div> <div class="tc-cards tc-small"> -<$link to="中文社区 - Chinese Community" class="tc-btn-big-green tc-card"> +<$link to="中文社区 - Chinese Community" class="tc-btn-big-green tc-card" aria-label="Chinese Community"> 中文社区<br/>Chinese Community </$link> </div> diff --git a/editions/tw5.com/tiddlers/hellothere/badges/ProductHunt-Link.tid b/editions/tw5.com/tiddlers/hellothere/badges/ProductHunt-Link.tid index 3554c2d74..2dd0a2912 100644 --- a/editions/tw5.com/tiddlers/hellothere/badges/ProductHunt-Link.tid +++ b/editions/tw5.com/tiddlers/hellothere/badges/ProductHunt-Link.tid @@ -1,4 +1,4 @@ title: Product Hunt Link tags: [[HelloThere Badge]] -<a href="https://www.producthunt.com/posts/tiddlywiki-2?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-tiddlywiki-2" alt="Product Hunt: Product of the Day" target="_blank" rel="noopener noreferrer">{{ProductHunt-Badge.svg}}</a> \ No newline at end of file +<a href="https://www.producthunt.com/posts/tiddlywiki-2?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-tiddlywiki-2" aria-label="Product Hunt: Product of the Day" target="_blank" rel="noopener noreferrer">{{ProductHunt-Badge.svg}}</a> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting Content to be displayed for empty story.tid b/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting Content to be displayed for empty story.tid new file mode 100644 index 000000000..f3497d5be --- /dev/null +++ b/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting Content to be displayed for empty story.tid @@ -0,0 +1,12 @@ +created: 20240811052854726 +modified: 20240811053649554 +tags: [[Hidden Settings]] +title: Hidden Setting: Content to be displayed for empty story + +To display content when the story is empty, create $:/config/EmptyStoryMessage and enter the desired contents. + +The following would show the GettingStarted tiddler when all others are closed. + +``` +{{GettingStarted||$:/core/ui/ViewTemplate}} +``` \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting Default Tiddler Colour.tid b/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting Default Tiddler Colour.tid new file mode 100644 index 000000000..649fd7629 --- /dev/null +++ b/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting Default Tiddler Colour.tid @@ -0,0 +1,7 @@ +created: 20240907042443909 +modified: 20240907042629405 +tags: [[Hidden Settings]] +title: Hidden Setting: Default Tiddler Colour +type: text/vnd.tiddlywiki + +A default tiddler colour can be specified by creating a tiddler called $:/config/DefaultTiddlerColour containing the CSS color value. diff --git a/editions/tw5.com/tiddlers/howtos/Using Stylesheets.tid b/editions/tw5.com/tiddlers/howtos/Using Stylesheets.tid index 3d41d3f19..201c2b823 100644 --- a/editions/tw5.com/tiddlers/howtos/Using Stylesheets.tid +++ b/editions/tw5.com/tiddlers/howtos/Using Stylesheets.tid @@ -41,7 +41,7 @@ You can then use your own [[styles and classes in WikiText|Styles and Classes in Custom stylesheets are applied independently from theme stylesheets. Therefore, it is often necessary for the css rules in your custom stylesheet to be more specific than those of the theme you want to override. For example, `html body.tc-body` is more specific than `body.tc-body`. -<<.tip "''You should always start with the least specific value that works!''<br><br>">> +<<.tip """You should always start with the least specific value that works!""">> ! Stylesheet Types @@ -76,4 +76,4 @@ The ~TiddlyWiki core provides several [[global macros that are helpful in constr !! See Also -* <<list-links "[tag[Using Stylesheets]]">> +<<list-links "[tag[Using Stylesheets]]">> diff --git a/editions/tw5.com/tiddlers/images/Blurry Lawn.jpg.meta b/editions/tw5.com/tiddlers/images/Blurry Lawn.jpg.meta index 2dc802bee..49b003bd2 100644 --- a/editions/tw5.com/tiddlers/images/Blurry Lawn.jpg.meta +++ b/editions/tw5.com/tiddlers/images/Blurry Lawn.jpg.meta @@ -1,4 +1,5 @@ title: Blurry Lawn.jpg type: image/jpeg tags: picture external-image -source: https://www.flickr.com/photos/jermy/16386332964/in/photostream \ No newline at end of file +source: https://www.flickr.com/photos/jermy/16386332964/in/photostream +alt-text: Blurry image with green grass with flowsers. diff --git a/editions/tw5.com/tiddlers/images/Favicon template.svg.meta b/editions/tw5.com/tiddlers/images/Favicon template.svg.meta index 8d6a1a197..9ad8a9f86 100644 --- a/editions/tw5.com/tiddlers/images/Favicon template.svg.meta +++ b/editions/tw5.com/tiddlers/images/Favicon template.svg.meta @@ -1,3 +1,4 @@ title: Favicon template.svg tags: picture -type: image/svg+xml \ No newline at end of file +type: image/svg+xml +alt-text: Motovun Jack with blue background. diff --git a/editions/tw5.com/tiddlers/images/Funding.png.meta b/editions/tw5.com/tiddlers/images/Funding.png.meta index b9caa4a72..8d6225a60 100644 --- a/editions/tw5.com/tiddlers/images/Funding.png.meta +++ b/editions/tw5.com/tiddlers/images/Funding.png.meta @@ -1,3 +1,4 @@ title: Funding.png type: image/png tags: picture +alt-text: Hand over a debit-card. diff --git a/editions/tw5.com/tiddlers/images/Grok TiddlyWiki.png.meta b/editions/tw5.com/tiddlers/images/Grok TiddlyWiki.png.meta index a0595cc9f..da5e252a2 100644 --- a/editions/tw5.com/tiddlers/images/Grok TiddlyWiki.png.meta +++ b/editions/tw5.com/tiddlers/images/Grok TiddlyWiki.png.meta @@ -1,3 +1,4 @@ title: Grok TiddlyWiki Banner type: image/png tags: picture +alt-text: Grok TiddlyWiki page and siluette of Motovun Jack. diff --git a/editions/tw5.com/tiddlers/images/Introduction Video Thumbnail.jpg.meta b/editions/tw5.com/tiddlers/images/Introduction Video Thumbnail.jpg.meta index ee1c94cd4..9b2a023c4 100644 --- a/editions/tw5.com/tiddlers/images/Introduction Video Thumbnail.jpg.meta +++ b/editions/tw5.com/tiddlers/images/Introduction Video Thumbnail.jpg.meta @@ -1,3 +1,4 @@ title: Introduction Video Thumbnail.jpg type: image/jpeg tags: picture +alt-text: Screenshot with a headline: TiddlyWiki. Below are several tiddlers randomly stacked. diff --git a/editions/tw5.com/tiddlers/images/Marketplace Banner.png.meta b/editions/tw5.com/tiddlers/images/Marketplace Banner.png.meta index b693c99e3..14ccdbc0b 100644 --- a/editions/tw5.com/tiddlers/images/Marketplace Banner.png.meta +++ b/editions/tw5.com/tiddlers/images/Marketplace Banner.png.meta @@ -1,3 +1,4 @@ title: TiddlyWiki Marketplace Banner type: image/jpeg tags: picture +alt-text: Motovun Jack with a shopping cart. Blue floor, orange background. diff --git a/editions/tw5.com/tiddlers/images/Motovun Jack.ascii.tid b/editions/tw5.com/tiddlers/images/Motovun Jack.ascii.tid index 115cf2e60..db5a9dc28 100644 --- a/editions/tw5.com/tiddlers/images/Motovun Jack.ascii.tid +++ b/editions/tw5.com/tiddlers/images/Motovun Jack.ascii.tid @@ -1,5 +1,6 @@ title: Motovun Jack.ascii tags: picture +alt-text: Motovun Jack ASCII-art. \rules only html <pre style="font-size:10px; font-family: monospace; line-height:13px"> diff --git a/editions/tw5.com/tiddlers/images/Motovun Jack.jpg.meta b/editions/tw5.com/tiddlers/images/Motovun Jack.jpg.meta index 43901f30f..ee2ddbe5b 100644 --- a/editions/tw5.com/tiddlers/images/Motovun Jack.jpg.meta +++ b/editions/tw5.com/tiddlers/images/Motovun Jack.jpg.meta @@ -2,3 +2,4 @@ title: Motovun Jack.jpg type: image/jpeg source: https://www.flickr.com/photos/jermy/6292279493/in/photostream tags: picture +alt-text: Motovun Jack on a stone wall with treas and hills in the background. diff --git a/editions/tw5.com/tiddlers/images/Motovun Jack.pdf.meta b/editions/tw5.com/tiddlers/images/Motovun Jack.pdf.meta index 27cb054c9..0a64294e5 100644 --- a/editions/tw5.com/tiddlers/images/Motovun Jack.pdf.meta +++ b/editions/tw5.com/tiddlers/images/Motovun Jack.pdf.meta @@ -1,3 +1,4 @@ title: Motovun Jack.pdf type: application/pdf tags: picture +alt-text: PDF reader with Motovun Jack siluette on a white background page 1 of 1. diff --git a/editions/tw5.com/tiddlers/images/New Release Banner.png.meta b/editions/tw5.com/tiddlers/images/New Release Banner.png.meta index e5fc745fe..2da8dc356 100644 --- a/editions/tw5.com/tiddlers/images/New Release Banner.png.meta +++ b/editions/tw5.com/tiddlers/images/New Release Banner.png.meta @@ -1,3 +1,4 @@ title: New Release Banner type: image/png tags: picture +alt-text: Release banner, with a custom background and a release version in big letters. diff --git a/editions/tw5.com/tiddlers/images/Newnham Horizon.jpg.meta b/editions/tw5.com/tiddlers/images/Newnham Horizon.jpg.meta index 4e5fb7d8b..8202f6a04 100644 --- a/editions/tw5.com/tiddlers/images/Newnham Horizon.jpg.meta +++ b/editions/tw5.com/tiddlers/images/Newnham Horizon.jpg.meta @@ -2,3 +2,4 @@ title: Newnham Horizon.jpg type: image/jpeg tags: picture external-image source: https://www.flickr.com/photos/jermy/289999155/in/photostream +alt-text: Newham Horizon. Green field, blue skey with some clouds on a sunny day. diff --git a/editions/tw5.com/tiddlers/images/Open Collective Logo.tid b/editions/tw5.com/tiddlers/images/Open Collective Logo.tid index 7dec4d62b..dbafad946 100644 --- a/editions/tw5.com/tiddlers/images/Open Collective Logo.tid +++ b/editions/tw5.com/tiddlers/images/Open Collective Logo.tid @@ -2,5 +2,6 @@ created: 20240621075644739 modified: 20240621075647009 tags: picture title: Open Collective Logo +alt-text: Open Collective Logo <svg style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 28 28"><path d="M25.509 6.026A13.934 13.934 0 0 1 28 14c0 2.963-.92 5.71-2.491 7.974l-3.626-3.627A8.96 8.96 0 0 0 23 14a8.964 8.964 0 0 0-1.117-4.347l3.626-3.627Z"/><path d="m21.974 2.49-3.627 3.628a9 9 0 1 0 0 15.765l3.627 3.626A13.934 13.934 0 0 1 14 27.999C6.268 28 0 21.733 0 14 0 6.269 6.268 0 14 0c2.963 0 5.711.922 7.974 2.492Z"/></svg> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/images/PerlinLight.jpg.meta b/editions/tw5.com/tiddlers/images/PerlinLight.jpg.meta index 3df28f9c5..aff5d2b80 100644 --- a/editions/tw5.com/tiddlers/images/PerlinLight.jpg.meta +++ b/editions/tw5.com/tiddlers/images/PerlinLight.jpg.meta @@ -1,2 +1,3 @@ title: PerlinLight.jpg type: image/jpeg +alt-text: Backgournd tile with light gray dots randomly scatterd. diff --git a/editions/tw5.com/tiddlers/images/Reddit Logo.tid b/editions/tw5.com/tiddlers/images/Reddit Logo.tid index f4153ebb0..660785858 100644 --- a/editions/tw5.com/tiddlers/images/Reddit Logo.tid +++ b/editions/tw5.com/tiddlers/images/Reddit Logo.tid @@ -1,4 +1,5 @@ title: Reddit Logo +alt-text: Reddit Logo \parameters (size:"22pt") <svg width=<<size>> height=<<size>> viewBox="0 0 20 20"> diff --git a/editions/tw5.com/tiddlers/images/TWEUM Thumbnail.jpg.meta b/editions/tw5.com/tiddlers/images/TWEUM Thumbnail.jpg.meta index 8d35840cf..3ff7014fb 100644 --- a/editions/tw5.com/tiddlers/images/TWEUM Thumbnail.jpg.meta +++ b/editions/tw5.com/tiddlers/images/TWEUM Thumbnail.jpg.meta @@ -1,3 +1,4 @@ title: TWEUM Thumbnail.jpg type: image/jpeg tags: picture +alt-text: TW EU Meeting thumbnail. Skyline of Oxford on a sunny day with blue sky. Motovun Jack and a TiddlyWiki sceenshot in the back. diff --git a/editions/tw5.com/tiddlers/images/Tiddler Fishes.svg.meta b/editions/tw5.com/tiddlers/images/Tiddler Fishes.svg.meta index 257787b66..042c8a89d 100644 --- a/editions/tw5.com/tiddlers/images/Tiddler Fishes.svg.meta +++ b/editions/tw5.com/tiddlers/images/Tiddler Fishes.svg.meta @@ -1,3 +1,4 @@ title: Tiddler Fishes.svg type: image/svg+xml tags: picture +alt-text: 5 coloured sketched fish arranged in a cyrcle. diff --git a/editions/tw5.com/tiddlers/images/Tiddler Poster.png.meta b/editions/tw5.com/tiddlers/images/Tiddler Poster.png.meta index 2466871f0..221569974 100644 --- a/editions/tw5.com/tiddlers/images/Tiddler Poster.png.meta +++ b/editions/tw5.com/tiddlers/images/Tiddler Poster.png.meta @@ -2,3 +2,4 @@ title: Tiddler Poster.png type: image/png source: https://tiddlywiki.com/poster tags: picture +alt-text: Poster with a headline: Your messy thoughts. Organized. Below is an abstract Stickleback fish and tiddlywiki.com URL. diff --git a/editions/tw5.com/tiddlers/images/TiddlyFox Apocalypse.png.meta b/editions/tw5.com/tiddlers/images/TiddlyFox Apocalypse.png.meta index 2c3e7bab3..50d42ef49 100644 --- a/editions/tw5.com/tiddlers/images/TiddlyFox Apocalypse.png.meta +++ b/editions/tw5.com/tiddlers/images/TiddlyFox Apocalypse.png.meta @@ -1,3 +1,4 @@ title: TiddlyFox Apocalypse.png type: image/png tags: picture +alt-text: Motovun Jack's head with a FireFox logo over the head and a date: Nov. 14th 2017 on the left. diff --git a/editions/tw5.com/tiddlers/images/TiddlyWiki Classic.png.meta b/editions/tw5.com/tiddlers/images/TiddlyWiki Classic.png.meta index 4296f5116..0142e4d67 100644 --- a/editions/tw5.com/tiddlers/images/TiddlyWiki Classic.png.meta +++ b/editions/tw5.com/tiddlers/images/TiddlyWiki Classic.png.meta @@ -1,3 +1,4 @@ title: TiddlyWiki Classic.png type: image/png tags: picture +alt-text: TiddlyWiki classic screenshto thumbnail. diff --git a/editions/tw5.com/tiddlers/images/TiddlyWiki Newsletter Badge.png.meta b/editions/tw5.com/tiddlers/images/TiddlyWiki Newsletter Badge.png.meta index b53a63b97..3eb2dbdde 100644 --- a/editions/tw5.com/tiddlers/images/TiddlyWiki Newsletter Badge.png.meta +++ b/editions/tw5.com/tiddlers/images/TiddlyWiki Newsletter Badge.png.meta @@ -1,3 +1,6 @@ -title: TiddlyWiki Newsletter Badge.png -type: image/png +alt-text: Motovun Jack reads a Newsletter. +created: 20240630093143711 +modified: 20240630094906495 tags: picture +title: TiddlyWiki Newsletter Badge.png +type: image/png \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/images/TiddlyWikiLinks.png.meta b/editions/tw5.com/tiddlers/images/TiddlyWikiLinks.png.meta index 5ac185287..ebe0b79ba 100644 --- a/editions/tw5.com/tiddlers/images/TiddlyWikiLinks.png.meta +++ b/editions/tw5.com/tiddlers/images/TiddlyWikiLinks.png.meta @@ -1,3 +1,4 @@ title: TiddlyWikiLinks type: image/png tags: picture +alt-text: Motovun Jack body with "chain liks" around the neck. diff --git a/editions/tw5.com/tiddlers/images/Tiddlyhost Logo.png.meta b/editions/tw5.com/tiddlers/images/Tiddlyhost Logo.png.meta index c0f8f256a..7cae3e920 100644 --- a/editions/tw5.com/tiddlers/images/Tiddlyhost Logo.png.meta +++ b/editions/tw5.com/tiddlers/images/Tiddlyhost Logo.png.meta @@ -1,3 +1,4 @@ title: Tiddlyhost Logo type: image/png tags: picture +atl-text: TiddlyHost logo. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/images/Xememex Logo.svg.meta b/editions/tw5.com/tiddlers/images/Xememex Logo.svg.meta index 1eab02541..19726a249 100644 --- a/editions/tw5.com/tiddlers/images/Xememex Logo.svg.meta +++ b/editions/tw5.com/tiddlers/images/Xememex Logo.svg.meta @@ -1,2 +1,3 @@ type: image/svg+xml title: Xememex Logo +alt-text Xememex Logo diff --git a/editions/tw5.com/tiddlers/images/favicon.png.meta b/editions/tw5.com/tiddlers/images/favicon.png.meta index 76d0be1a8..45e69d9e7 100644 --- a/editions/tw5.com/tiddlers/images/favicon.png.meta +++ b/editions/tw5.com/tiddlers/images/favicon.png.meta @@ -1,2 +1,3 @@ title: $:/favicon.ico type: image/png +alt-text: Motovun Jack with blue background. diff --git a/editions/tw5.com/tiddlers/images/green_favicon.png.meta b/editions/tw5.com/tiddlers/images/green_favicon.png.meta index 1f2a3ecc0..9c605b1e4 100644 --- a/editions/tw5.com/tiddlers/images/green_favicon.png.meta +++ b/editions/tw5.com/tiddlers/images/green_favicon.png.meta @@ -1,2 +1,3 @@ title: $:/green_favicon.ico type: image/png +alt-text: Motovun Jack with green background. diff --git a/editions/tw5.com/tiddlers/macros/CoreMacros.tid b/editions/tw5.com/tiddlers/macros/CoreMacros.tid index 01879e3ac..2c46555f3 100644 --- a/editions/tw5.com/tiddlers/macros/CoreMacros.tid +++ b/editions/tw5.com/tiddlers/macros/CoreMacros.tid @@ -1,5 +1,6 @@ created: 20150220180315000 -modified: 20150221222052000 +modified: 20240422084600212 +tags: Reference title: Core Macros type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/macros/UnusedTitleMacro.tid b/editions/tw5.com/tiddlers/macros/UnusedTitleMacro.tid index e0cc00433..b39bb5eb1 100644 --- a/editions/tw5.com/tiddlers/macros/UnusedTitleMacro.tid +++ b/editions/tw5.com/tiddlers/macros/UnusedTitleMacro.tid @@ -1,6 +1,6 @@ caption: unusedtitle created: 20210104143546885 -modified: 20210427184035684 +modified: 20240119224103283 tags: Macros [[Core Macros]] title: unusedtitle Macro type: text/vnd.tiddlywiki @@ -18,7 +18,10 @@ It uses the same method as the create new tiddler button, a number is appended t : <<.from-version "5.2.0">> An ''optional'' string specifying the separator between baseName and the unique number. eg: `separator:"-"`. Defaults to a space: `" "`. If you need an empty separator use the ''template''! ; template -: <<.from-version "5.2.0">> A ''optional'' template string can be used to allow you maximum flexibility. If the template string is used, there will always be a counter value. +: <<.from-version "5.2.0">> An ''optional'' template string can be used to allow you maximum flexibility. If the template string is used, there will always be a counter value. + +; startCount +: <<.from-version "5.3.6">> An ''optional'' parameter, that sets the initial value for the new tiddler counter. !! Template String diff --git a/editions/tw5.com/tiddlers/macros/examples/unusedtitle Macro (Examples 1).tid b/editions/tw5.com/tiddlers/macros/examples/unusedtitle Macro (Examples 1).tid index 22ece3997..3853299bf 100644 --- a/editions/tw5.com/tiddlers/macros/examples/unusedtitle Macro (Examples 1).tid +++ b/editions/tw5.com/tiddlers/macros/examples/unusedtitle Macro (Examples 1).tid @@ -1,5 +1,5 @@ created: 20210227212730299 -modified: 20211118025545823 +modified: 20240119151636562 tags: [[Macro Examples]] title: unusedtitle Macro (Examples 1) type: text/vnd.tiddlywiki @@ -16,6 +16,10 @@ type: text/vnd.tiddlywiki <$action-sendmessage $message="tm-new-tiddler" title=<<unusedtitle baseName:"new" template:"$count:2$-$basename$">> /> \end +\define testStartCount() +<$action-createtiddler $basetitle=<<unusedtitle startCount:"10" baseName:"new" separator:"-" template:"$count:2$$separator$$basename$">>/> +\end + ``` <<unusedtitle template:"$count:2$-new">> ``` @@ -43,6 +47,16 @@ New Tiddler Create Tiddler </$button> + +``` +<<unusedtitle startCount:"10" baseName:"new" separator:"-" template:"$count:2$$separator$$basename$">> +``` + +<$button actions=<<testStartCount>>> +<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/> +Create Tiddler +</$button> + --- <details> diff --git a/editions/tw5.com/tiddlers/macros/examples/unusedtitle.tid b/editions/tw5.com/tiddlers/macros/examples/unusedtitle.tid index a86f0d16e..fc9ed29ed 100644 --- a/editions/tw5.com/tiddlers/macros/examples/unusedtitle.tid +++ b/editions/tw5.com/tiddlers/macros/examples/unusedtitle.tid @@ -1,5 +1,5 @@ created: 20210104143940715 -modified: 20210228141241657 +modified: 20240119150720917 tags: [[unusedtitle Macro]] [[Macro Examples]] title: unusedtitle Macro (Examples) type: text/vnd.tiddlywiki @@ -9,7 +9,8 @@ type: text/vnd.tiddlywiki <$macrocall $name=".example" n="2" eg="""<<unusedtitle separator:"-">>"""/> <$macrocall $name=".example" n="3" eg="""<<unusedtitle baseName:"anotherBase">>"""/> <$macrocall $name=".example" n="4" eg="""<<unusedtitle baseName:"About" separator:"-">>"""/> -<$macrocall $name=".example" n="5" eg="""<<unusedtitle template:"$count:2$-test">>"""/> +<$macrocall $name=".example" n="5" eg="""<<unusedtitle baseName:"Count" startCount:"3">>"""/> +<$macrocall $name=".example" n="6" eg="""<<unusedtitle template:"$count:2$-test">>"""/> --- diff --git a/editions/tw5.com/tiddlers/macros/show-filter-count.tid b/editions/tw5.com/tiddlers/macros/show-filter-count.tid new file mode 100644 index 000000000..7e026a590 --- /dev/null +++ b/editions/tw5.com/tiddlers/macros/show-filter-count.tid @@ -0,0 +1,21 @@ + +created: 20240804143842924 +modified: 20240804150223291 +tags: Macros [[Core Macros]] +title: show-filter-count Macro +type: text/vnd.tiddlywiki + +<<.from-version "5.3.6">> -- The <<.def show-filter-count>> [[macro|Macros]] creates an element, that shows a counter and a button to open the provided filter string in $:/AdvancedSearch + +!! Parameters + +; filter +: Needs to be a valid [[filter run|Filters]] + +!! Examples + +<<wikitext-example-without-html src:"""<<show-filter-count filter:"[tag[HelloThere]]">> -- The number and the icon is click-able""">> + +<<wikitext-example-without-html src:"""<<show-filter-count filter:"[has[author]sort[]]">> -- The number and the icon is click-able""">> + +Also see: [[$:/core/ui/ControlPanel/TiddlerFields]] diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-edit-text-operation.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-edit-text-operation.tid index 72cc90381..9aaca9bf3 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-edit-text-operation.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-edit-text-operation.tid @@ -1,6 +1,6 @@ caption: tm-edit-text-operation created: 20160424211339792 -modified: 20230803045746596 +modified: 20240909083525060 tags: Messages title: WidgetMessage: tm-edit-text-operation type: text/vnd.tiddlywiki @@ -11,9 +11,9 @@ type: text/vnd.tiddlywiki Excises the currently selected text into a new tiddler and replaces it with a link, a macro or a transclude of the new tiddler. Parameters include: |!Name |!Description | -|title |Title of the new tiddler the selected content is excised to| -|type |Type of the replacement to be inserted: Can be one of <<.value "transclude">>, <<.value "link">> or <<.value "macro">>| -|macro |In case //type=<<.value "macro">>//, specifies the name of the macro to be inserted. The title of the new tiddler is provided as the first parameter to the macro. Defaults to the [[translink macro|translink Macro]]| +|title |Title of the new tiddler the selected content is excised to | +|type |Type of the replacement to be inserted: Can be one of <<.value "transclude">>, <<.value "link">> or <<.value "macro">> | +|macro |In case //type=<<.value "macro">>//, specifies the name of the macro to be inserted. The title of the new tiddler is provided as the first parameter to the macro. Defaults to the [[translink macro|translink Macro]] | |tagnew |If '<<.value "yes">>', will tag the new tiddler with the title of the tiddler currently being edited | </div> @@ -25,7 +25,7 @@ Excises the currently selected text into a new tiddler and replaces it with a li Replaces ''all'' contents of the editor with the provided text. |!Name |!Description | -|text |Text to be inserted| +|text |Text to be inserted | </div> \end @@ -36,7 +36,7 @@ Replaces ''all'' contents of the editor with the provided text. Replaces the current selection with the provided text. |!Name |!Description | -|text |Text to be inserted| +|text |Text to be inserted | </div> \end @@ -47,8 +47,8 @@ Replaces the current selection with the provided text. Prefixes the currently selected line//(s)// with the provided character. If a line is already prefixed by the provided prefix, the prefix is removed instead. |!Name |!Description | -|character |Prefix character| -|count |Number of characters that make up the prefix| +|character |Prefix character | +|count |Number of characters that make up the prefix | ''Example'' Setting //character="<<.value "!">>"// and //count="<<.value "3">>"// would insert the prefix "<<.value "!!!" >>", which will resolve to a subheading when parsed as WikiText. @@ -61,8 +61,8 @@ Prefixes the currently selected line//(s)// with the provided character. If a li Surrounds the selected //lines// with the provided <<.param "prefix">> and <<.param "suffix">>. |!Name |!Description | -|prefix |String to be prefixed to the selected lines| -|suffix |Suffix to be inserted after the selected lines| +|prefix |String to be prefixed to the selected lines | +|suffix |Suffix to be inserted after the selected lines | </div> @@ -75,8 +75,9 @@ Surrounds the selected //lines// with the provided <<.param "prefix">> and <<.pa Surrounds the current //selection// with the provided <<.param "prefix">> and <<.param "suffix">>. |!Name |!Description | -|prefix |String to be prefixed to the selection| -|suffix |Suffix to be inserted after the selection| +|prefix |String to be prefixed to the selection | +|suffix |Suffix to be inserted after the selection | +|trimSelection |<<.from-version 5.3.6>> Trim leading and trailing white-space from the selection and move it to the surrounding text. Possible values are: `yes`, `no` (default), `start` and `end` | </div> \end @@ -138,11 +139,11 @@ At this point the following text operations have been implemented: |<<.def "wrap-selection">>|<<wrapSelectionDescription>> | |<<.def "save-selection">>|<<saveSelectionDescription>> | |<<.def "make-link">>|<<makeLinkDescription>> | -|<<.def "insert-text">>|<<insertTextDescription>>| +|<<.def "insert-text">>|<<insertTextDescription>> | |<<.def "focus-editor">>|<<.from-version 5.2.0>> <<focusEditorDescription>> | -!Example +! Example An example can be seen in [[$:/core/ui/EditorToolbar/bold]]: @@ -152,6 +153,7 @@ An example can be seen in [[$:/core/ui/EditorToolbar/bold]]: $param="wrap-selection" prefix="''" suffix="''" + trimSelection="yes" /> ``` diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Examples.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Examples.tid index 53ea600ca..3df6bd6a9 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Examples.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Examples.tid @@ -1,5 +1,5 @@ created: 20240609152203076 -modified: 20240614210714914 +modified: 20240901142049810 tags: title: WidgetMessage: tm-http-request Examples type: text/vnd.tiddlywiki @@ -32,6 +32,7 @@ type: text/vnd.tiddlywiki <$action-sendmessage $message="tm-http-request" url="https://httpbin.org/post" + header-content-type="application/json" method="POST" body='{"foo": "bar"}' oncompletion=<<store-fetched-output>> diff --git a/editions/tw5.com/tiddlers/procedures/Procedures.tid b/editions/tw5.com/tiddlers/procedures/Procedures.tid index 321284f93..1643fac18 100644 --- a/editions/tw5.com/tiddlers/procedures/Procedures.tid +++ b/editions/tw5.com/tiddlers/procedures/Procedures.tid @@ -1,6 +1,6 @@ created: 20221007124007426 -modified: 20240310173130052 -tags: Concepts Reference +modified: 20240422090349758 +tags: Concepts [[Core Procedures]] title: Procedures type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/releasenotes/Release 5.3.2.tid b/editions/tw5.com/tiddlers/releasenotes/Release 5.3.2.tid index d99d537c1..56f54cbb0 100644 --- a/editions/tw5.com/tiddlers/releasenotes/Release 5.3.2.tid +++ b/editions/tw5.com/tiddlers/releasenotes/Release 5.3.2.tid @@ -23,13 +23,13 @@ type: text/vnd.tiddlywiki These new token-based shortcuts allow a richer structure and expressivity than existing features such as widgets or pragmas. For example: ``` -<% if [<animal>match[Elephant]] %> +<%if [<animal>match[Elephant]] %> It is an elephant -<% elseif [<animal>match[Giraffe]] %> +<%elseif [<animal>match[Giraffe]] %> It is a giraffe -<% else %> +<%else%> It is completely unknown -<% endif %> +<%endif%> ``` Behind the scenes, the conditional shortcut syntax is rendered as the equivalent [[ListWidgets|ListWidget]]. diff --git a/editions/tw5.com/tiddlers/saving/Example config-tiddlyweb-host for IIS.txt.meta b/editions/tw5.com/tiddlers/saving/Example config-tiddlyweb-host for IIS.txt.meta index 2e5142973..4c9dae0be 100644 --- a/editions/tw5.com/tiddlers/saving/Example config-tiddlyweb-host for IIS.txt.meta +++ b/editions/tw5.com/tiddlers/saving/Example config-tiddlyweb-host for IIS.txt.meta @@ -1,5 +1,5 @@ title: Example config-tiddlyweb-host for IIS created: 20180328145039530 modified: 20180328145234871 -tags: Saving +tags: [[Installing TiddlyWiki on Microsoft Internet Information Server]] type: text/plain diff --git a/editions/tw5.com/tiddlers/saving/Example package.json for IIS.txt.meta b/editions/tw5.com/tiddlers/saving/Example package.json for IIS.txt.meta index 4d673d6d0..e40a98526 100644 --- a/editions/tw5.com/tiddlers/saving/Example package.json for IIS.txt.meta +++ b/editions/tw5.com/tiddlers/saving/Example package.json for IIS.txt.meta @@ -1,5 +1,5 @@ created: 20180328145039530 modified: 20180328145234871 -tags: Saving +tags: [[Installing TiddlyWiki on Microsoft Internet Information Server]] title: Example package.json for IIS type: text/plain diff --git a/editions/tw5.com/tiddlers/saving/Example tiddlywiki.info for IIS.txt.meta b/editions/tw5.com/tiddlers/saving/Example tiddlywiki.info for IIS.txt.meta index 6fb2e36fc..dc5911c97 100644 --- a/editions/tw5.com/tiddlers/saving/Example tiddlywiki.info for IIS.txt.meta +++ b/editions/tw5.com/tiddlers/saving/Example tiddlywiki.info for IIS.txt.meta @@ -1,5 +1,5 @@ created: 20180328151124878 modified: 20180328151214616 -tags: Saving +tags: [[Installing TiddlyWiki on Microsoft Internet Information Server]] title: Example tiddlywiki.info for IIS type: text/plain diff --git a/editions/tw5.com/tiddlers/saving/Example web.config for IIS.txt.meta b/editions/tw5.com/tiddlers/saving/Example web.config for IIS.txt.meta index 749fdcc68..2c8870758 100644 --- a/editions/tw5.com/tiddlers/saving/Example web.config for IIS.txt.meta +++ b/editions/tw5.com/tiddlers/saving/Example web.config for IIS.txt.meta @@ -1,5 +1,5 @@ created: 20180328145259455 modified: 20180701185215523 -tags: Saving +tags: [[Installing TiddlyWiki on Microsoft Internet Information Server]] title: Example web.config for IIS type: text/plain diff --git a/editions/tw5.com/tiddlers/saving/Saving on TidGi.tid b/editions/tw5.com/tiddlers/saving/Saving on TidGi.tid index 8290254c6..26263ed69 100644 --- a/editions/tw5.com/tiddlers/saving/Saving on TidGi.tid +++ b/editions/tw5.com/tiddlers/saving/Saving on TidGi.tid @@ -1,4 +1,4 @@ -caption: TidGi Desktop +caption: ~TidGi Desktop color: #FF8A65 community-author: LinOnetwo created: 20220221080637764 diff --git a/editions/tw5.com/tiddlers/saving/Saving with FireFox.tid b/editions/tw5.com/tiddlers/saving/Saving with FireFox.tid index b64f695c4..2a3b3bd19 100644 --- a/editions/tw5.com/tiddlers/saving/Saving with FireFox.tid +++ b/editions/tw5.com/tiddlers/saving/Saving with FireFox.tid @@ -1,4 +1,4 @@ -caption: Saving with FireFox +caption: Saving with ~FireFox created: 20230803205140949 modified: 20230803213246739 tags: Saving Firefox diff --git a/editions/tw5.com/tiddlers/saving/Saving with TiddlyPWA.tid b/editions/tw5.com/tiddlers/saving/Saving with TiddlyPWA.tid new file mode 100644 index 000000000..c8555bdd0 --- /dev/null +++ b/editions/tw5.com/tiddlers/saving/Saving with TiddlyPWA.tid @@ -0,0 +1,15 @@ +caption: ~TiddlyPWA +color: #E056B4 +community-author: Val Packett +created: 20240902162617154 +delivery: Progressive Web Application +description: Save to Browser Storage +method: save +modified: 20240902162617154 +tags: Chrome Firefox Linux Mac Opera Safari Saving Windows iOS Edge +title: TiddlyPWA - Save to Browser Storage +type: text/vnd.tiddlywiki + +~TiddlyPWA turns TiddlyWiki 5 into an offline-first Progressive Web App with encrypted local persistent storage and efficient synchronization with a self-hosted server that can easily be hosted for free. + +https://tiddly.packett.cool/ diff --git a/editions/tw5.com/tiddlers/system/doc-macros.tid b/editions/tw5.com/tiddlers/system/doc-macros.tid index d0574fe5f..199479fb8 100644 --- a/editions/tw5.com/tiddlers/system/doc-macros.tid +++ b/editions/tw5.com/tiddlers/system/doc-macros.tid @@ -119,7 +119,7 @@ type: text/vnd.tiddlywiki \procedure .infoBox(text:"", title, icon:"$:/core/images/info-button", class, iconSize:"1.4rem") \function _f.tipClass() [[doc-icon-block]] [<class>!is[blank]then<class>] +[join[ ]] <div class=<<_f.tipClass>>> - <%if [<title>!is[blank]] %><div>''<<title>>''</div><% endif %> + <%if [<title>!is[blank]] %><div>''<<title>>''</div><%endif%> <div class="doc-block-icon"><$transclude $tiddler=<<icon>> size=<<iconSize>>/></div> <<text>> </div> diff --git a/editions/tw5.com/tiddlers/system/filter-run-template.tid b/editions/tw5.com/tiddlers/system/filter-run-template.tid index 73b4a2510..c559d8bdd 100644 --- a/editions/tw5.com/tiddlers/system/filter-run-template.tid +++ b/editions/tw5.com/tiddlers/system/filter-run-template.tid @@ -9,18 +9,18 @@ type: text/vnd.tiddlywiki \whitespace trim \procedure .op-place() -<% if [<op-name>!is[blank]] %> +<%if [<op-name>!is[blank]] %> <$macrocall $name=".place" _=<<op-name>> /><span class="tc-tiny-gap">=</span> -<% endif %> +<%endif%> \end \procedure .op-row() -<% if [<op-body>!is[blank]] %> +<%if [<op-body>!is[blank]] %> <tr> <th align="left"><<op-head>></th> <td><<.op-place>><<op-body>></td> </tr> -<% endif %> +<%endif%> \end <$list filter="[all[current]tag[Named Filter Run Prefix]]"> diff --git a/editions/tw5.com/tiddlers/system/operator-macros.tid b/editions/tw5.com/tiddlers/system/operator-macros.tid index 2b19d56db..e2dce9e2d 100644 --- a/editions/tw5.com/tiddlers/system/operator-macros.tid +++ b/editions/tw5.com/tiddlers/system/operator-macros.tid @@ -16,9 +16,9 @@ title: $:/editions/tw5.com/operator-macros <$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix<n>]" variable=".state"> <$reveal state=<<.state>> type="nomatch" text="show"> <code><$text text=<<eg>>/></code> - <% if [<ie>!is[blank]] %> + <%if [<ie>!is[blank]] %> <dd>→ <<ie>></dd> - <% endif %> + <%endif%> <dl> <dd><$button actions=<<.operator-example-tryit-actions>>>Try it</$button></dd> </dl> diff --git a/editions/tw5.com/tiddlers/system/operator-template.tid b/editions/tw5.com/tiddlers/system/operator-template.tid index f4f3e08ef..47096f79c 100644 --- a/editions/tw5.com/tiddlers/system/operator-template.tid +++ b/editions/tw5.com/tiddlers/system/operator-template.tid @@ -8,17 +8,17 @@ title: $:/editions/tw5.com/operator-template \whitespace trim \procedure .op-place() -<% if [<op-name>!is[blank]] %> +<%if [<op-name>!is[blank]] %> <$macrocall $name=".place" _=<<op-name>> /><span class="tc-tiny-gap">=</span> -<% endif %> +<%endif%> \end \procedure .op-row() -<% if [<op-body>!is[blank]] %> +<%if [<op-body>!is[blank]] %> <tr> <th align="left"><<op-head>></th><td><<.op-place>><<op-body>></td> </tr> -<% endif %> +<%endif%> \end <$list filter="[all[current]tag[Filter Operators]]"> diff --git a/editions/tw5.com/tiddlers/system/version-macros.tid b/editions/tw5.com/tiddlers/system/version-macros.tid index c03f4237c..35e98cf71 100644 --- a/editions/tw5.com/tiddlers/system/version-macros.tid +++ b/editions/tw5.com/tiddlers/system/version-macros.tid @@ -19,11 +19,11 @@ type: text/vnd.tiddlywiki \end \procedure .from-version(version) -<% if [<version>compare:version:gteq<tf.from-version-reference>] %> +<%if [<version>compare:version:gteq<tf.from-version-reference>] %> <<.from-version-template "doc-from-version doc-from-version-new" "New in v">> -<% else %> +<%else%> <<.from-version-template "doc-from-version" "Introduced in v">> -<% endif %> +<%endif%> \end \procedure .deprecated-since(version, superseded:"") diff --git a/editions/tw5.com/tiddlers/system/wikitext-macros.tid b/editions/tw5.com/tiddlers/system/wikitext-macros.tid index e4a898ad8..796f949a7 100644 --- a/editions/tw5.com/tiddlers/system/wikitext-macros.tid +++ b/editions/tw5.com/tiddlers/system/wikitext-macros.tid @@ -89,10 +89,13 @@ type: text/vnd.tiddlywiki \end \procedure flex-card(class,bordercolor:"",backgroundcolor:"",textcolor:"",imageField:"image",captionField:"caption",subtitle:"",descriptionField:"description",linkField:"link") -<$link class={{{ [<class>addprefix[tc-card ]] }}} to={{{ [<currentTiddler>get<linkField>else<currentTiddler>] }}}> +<$link class={{{ [<class>addprefix[tc-card ]] }}} + to={{{ [<currentTiddler>get<linkField>else<currentTiddler>] }}} + aria-label=<<currentTiddler>> +> <div class="tc-card-accent" style.borderTop={{{ [<bordercolor>!is[blank]addprefix[5px solid ]] }}} style.background={{!!background}} style.backgroundColor=<<backgroundcolor>> style.color=<<textcolor>> style.fill=<<textcolor>>> <$list filter="[<currentTiddler>has[ribbon-text]]" variable="ignore"> - <div class="tc-card-ribbon-wrapper"> + <div class="tc-card-ribbon-wrapper" aria-hidden="true"> <div class="tc-card-ribbon" style.backgroundColor={{{ [<currentTiddler>get[ribbon-color]else[red]] }}}> <div class="tc-card-ribbon-inner"> <$text text={{!!ribbon-text}}/> @@ -102,7 +105,9 @@ type: text/vnd.tiddlywiki </$list> <$list filter="[<currentTiddler>has<imageField>]" variable="ignore"> <div class="tc-card-image"> - <$image source={{{ [<currentTiddler>get<imageField>] }}}/> + <$image source={{{ [<currentTiddler>get<imageField>] }}} + alt={{{ [<currentTiddler>get<imageField>get[alt-text]else[Image.]] }}} + /> </div> </$list> <div class="tc-card-title"><$transclude field=<<captionField>>><$view field="title"/></$transclude></div> diff --git a/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_ControlPanel_SettingsTab.tid b/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_ControlPanel_SettingsTab.tid new file mode 100644 index 000000000..2f08ea686 --- /dev/null +++ b/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_ControlPanel_SettingsTab.tid @@ -0,0 +1,9 @@ +caption: $:/tags/ControlPanel/SettingsTab +created: 20240813060717747 +description: marks elements to be placed under "Settings" tab in Control Panel +modified: 20240813060843043 +tags: SystemTags +title: SystemTag: $:/tags/ControlPanel/SettingsTab +type: text/vnd.tiddlywiki + +The [[system tag|SystemTags]] `$:/tags/ControlPanel/SettingsTab` marks elements to be placed under "Settings" tab in [[$:/ControlPanel]] \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/testcases/HTML/BlockModeInHTMLTable.tid b/editions/tw5.com/tiddlers/testcases/HTML/BlockModeInHTMLTable.tid new file mode 100644 index 000000000..f7050de7d --- /dev/null +++ b/editions/tw5.com/tiddlers/testcases/HTML/BlockModeInHTMLTable.tid @@ -0,0 +1,30 @@ +created: 20240713164810184 +description: Block mode for table cells +modified: 20240713164810184 +tags: $:/tags/wiki-test-spec +title: TestCases/HTML/BlockModeInHTMLTable +type: text/vnd.tiddlywiki-multiple + +title: Narrative + +Unlike the table wiki syntax, the less convenient `<table>`, `<tr>`, `<td>` html tags can use a blank line +to get block mode punctuation regognised inside of table cells. ++ +title: Output + +<table> +<tr><td> + +* list item one +* list item two +</td><td> + +|nested|table| +</td></tr> +</table> ++ +title: ExpectedResult + +<p><table> +<tr><td><ul><li>list item one</li><li>list item two</li></ul></td><td><table><tbody><tr class="evenRow"><td>nested</td><td>table</td></tr></tbody></table></td></tr> +</table></p> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/testcases/HTML/OpenTagBlankLine.tid b/editions/tw5.com/tiddlers/testcases/HTML/OpenTagBlankLine.tid new file mode 100644 index 000000000..0c14b0527 --- /dev/null +++ b/editions/tw5.com/tiddlers/testcases/HTML/OpenTagBlankLine.tid @@ -0,0 +1,23 @@ +created: 20240622142425004 +description: Blank line after open tag +modified: 20240622144230258 +tags: $:/tags/wiki-test-spec +title: TestCases/HTML/OpenTagBlankLine +type: text/vnd.tiddlywiki-multiple + +title: Narrative + +A blank line after an open html tag allows block mode punctuation to be recognised ++ +title: Output + +<div> + +* blank line after open tag allows +* block mode punctuation (i.e. this list) to +* be recognised +</div> ++ +title: ExpectedResult + +<div><ul><li>blank line after open tag allows</li><li>block mode punctuation (i.e. this list) to</li><li>be recognised</li></ul></div> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/testcases/HTML/OpenTagBlankLineInBoldSyntax.tid b/editions/tw5.com/tiddlers/testcases/HTML/OpenTagBlankLineInBoldSyntax.tid new file mode 100644 index 000000000..f6072bca4 --- /dev/null +++ b/editions/tw5.com/tiddlers/testcases/HTML/OpenTagBlankLineInBoldSyntax.tid @@ -0,0 +1,22 @@ +created: 20240622144038465 +description: Blank line after open tag in bold syntax +modified: 20240622145114506 +tags: $:/tags/wiki-test-spec +title: TestCases/HTML/OpenTagBlankLineInBoldSyntax +type: text/vnd.tiddlywiki-multiple + +title: Narrative + +A blank line after an open html tag allows block mode punctuation to be recognised even when the html is embedded within inline punctuation (bold here). ++ +title: Output + +''<div> + +* list item one +* list item two +</div>'' ++ +title: ExpectedResult + +<p><strong><div><ul><li>list item one</li><li>list item two</li></ul></div></strong></p> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/testcases/HTML/OpenTagBlankLineInTableSyntax.tid b/editions/tw5.com/tiddlers/testcases/HTML/OpenTagBlankLineInTableSyntax.tid new file mode 100644 index 000000000..0835c47bc --- /dev/null +++ b/editions/tw5.com/tiddlers/testcases/HTML/OpenTagBlankLineInTableSyntax.tid @@ -0,0 +1,22 @@ +created: 20240622144753311 +description: Blank line after open tag in table syntax +modified: 20240622145056299 +tags: $:/tags/wiki-test-spec +title: TestCases/HTML/OpenTagBlankLineInTableSyntax +type: text/vnd.tiddlywiki-multiple + +title: Narrative + +A blank line after an open html tag cannot work when used inside table syntax since each row of a table must be all on one line ++ +title: Output + +|For a blank line after open tag|<div> + +* list is recognised +* but the surrounding table row is not +</div>| ++ +title: ExpectedResult + +<p>|For a blank line after open tag|<div><ul><li>list is recognised</li><li>but the surrounding table row is not</li></ul></div>|</p> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/testcases/HTML/OpenTagNoBlankLine.tid b/editions/tw5.com/tiddlers/testcases/HTML/OpenTagNoBlankLine.tid new file mode 100644 index 000000000..e49fcabfb --- /dev/null +++ b/editions/tw5.com/tiddlers/testcases/HTML/OpenTagNoBlankLine.tid @@ -0,0 +1,34 @@ +created: 20240622143533021 +description: No blank line after open tag +modified: 20240622145145440 +tags: $:/tags/wiki-test-spec +title: TestCases/HTML/OpenTagNoBlankLine +type: text/vnd.tiddlywiki-multiple + +title: Narrative + +Block mode punctuation is not recognised when HTML open tag is not followed by a blank line ++ +title: Output + +<div> +* Open tag without a blank line means +* block mode punctuation (i.e. this list) will +* NOT be recognised. + +Paragraphs are only recognised in block mode. Even with blank lines, new paragraphs are not recognised. + +This also is not a new paragraph. +</div> ++ +title: ExpectedResult + +<p><div> +* Open tag without a blank line means +* block mode punctuation (i.e. this list) will +* NOT be recognised. + +Paragraphs are only recognised in block mode. Even with blank lines, new paragraphs are not recognised. + +This also is not a new paragraph. +</div></p> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/variables/Core Variables.tid b/editions/tw5.com/tiddlers/variables/Core Variables.tid index ab19181eb..3b2fa070b 100644 --- a/editions/tw5.com/tiddlers/variables/Core Variables.tid +++ b/editions/tw5.com/tiddlers/variables/Core Variables.tid @@ -1,12 +1,13 @@ created: 20150220161908000 -modified: 20150228134138000 +modified: 20240421144847774 +tags: Reference title: Core Variables type: text/vnd.tiddlywiki The following [[variables|Variables]] are built into ~TiddlyWiki's core: -<<list-links "[tag[Core Variables]] -[tag[Configuration Variables]]">> +<<list-links filter:"[tag[Core Variables]] -[tag[Configuration Variables]]" class:"multi-columns">> The core will also use various configuration variables and macros if you define them: -<<list-links "[tag[Configuration Variables]]">> +<<list-links filter:"[tag[Configuration Variables]]" class:"multi-columns">> diff --git a/editions/tw5.com/tiddlers/variables/Variables.tid b/editions/tw5.com/tiddlers/variables/Variables.tid index 116f3c9a0..43387eb4f 100644 --- a/editions/tw5.com/tiddlers/variables/Variables.tid +++ b/editions/tw5.com/tiddlers/variables/Variables.tid @@ -1,6 +1,6 @@ created: 20141002133113496 -modified: 20230422150445336 -tags: Concepts Reference WikiText +modified: 20240422084347375 +tags: Concepts WikiText title: Variables type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 1.tid b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 1.tid index 57aee6673..ccc085e05 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 1.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 1.tid @@ -1,26 +1,15 @@ created: 20200131142401129 -modified: 20211113230406823 +modified: 20240602154417754 tags: ActionCreateTiddlerWidget title: ActionCreateTiddlerWidget Example 1 type: text/vnd.tiddlywiki -\define testCreate() -<$action-createtiddler /> -\end - -This example will create "New Tiddler", "New Tiddler 1", " New Tiddler 2" and so on - -``` -\define testCreate() -<$action-createtiddler /> -\end +<$testcase> +<$data title=Description text="Default widget with no attributes"/> +<$data title=Narrative text='The button in this example uses the $action-createtiddler widget to create "New Tiddler", "New Tiddler 1", " New Tiddler 2" and so on'/> +<$data title=Output text="""\procedure testCreate() <$action-createtiddler /> <$button actions=<<testCreate>> > Create Tiddler -</$button> -``` - -<$button actions=<<testCreate>> > -<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/> -Create Tiddler -</$button> - Clicking this button, will also open the Right sidebar: Recent tab +</$button>"""/> +</$testcase> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 2.tid b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 2.tid index 336972a16..a9d204e75 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 2.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 2.tid @@ -1,28 +1,20 @@ created: 20200131144828713 -modified: 20211113011036840 +modified: 20240602160133371 tags: ActionCreateTiddlerWidget title: ActionCreateTiddlerWidget Example 2 type: text/vnd.tiddlywiki -\define testCreate() -<$action-createtiddler $basetitle={{$:/language/DefaultNewTiddlerTitle}} $overwrite="yes"/> -\end +<$testcase> +<$data title=Description text="Transcluded base title"/> +<$data title=Narrative text="""The $action-createtiddler widget in this example uses the base title defined in [[$:/language/DefaultNewTiddlerTitle]]. -This example will use the base title defined in [[$:/language/DefaultNewTiddlerTitle]]. - -It will overwrite the tiddler, if the button is clicked several times. - -``` -\define testCreate() +It will overwrite the tiddler if the button is clicked several times."""/> +<$data $tiddler="$:/language/DefaultNewTiddlerTitle"/> +<$data title=Output text="""\procedure testCreate() <$action-createtiddler $basetitle={{$:/language/DefaultNewTiddlerTitle}} $overwrite="yes"/> \end <$button actions=<<testCreate>> > Create Tiddler -</$button> -``` - -<$button actions=<<testCreate>> > -<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/> -Create Tiddler -</$button> - Clicking this button, will also open the Right sidebar: Recent tab +</$button>"""/> +</$testcase> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 3.tid b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 3.tid index 2e137e330..a981bfe92 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 3.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 3.tid @@ -1,28 +1,21 @@ created: 20200131145355658 -modified: 20211113011111052 +modified: 20240602155233116 tags: ActionCreateTiddlerWidget title: ActionCreateTiddlerWidget Example 3 type: text/vnd.tiddlywiki -\define testCreate() -<$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template"/> -\end +<$testcase> +<$data title=Description text="Template and custom base title"/> +<$data title=Narrative text="""The $action-createtiddler widget in this example uses the basetitle attribute and template: [[ActionCreateTiddlerWidget Template]]. -This example will uses a base-title and a template: [[ActionCreateTiddlerWidget Template]] - -It will create: "base", "base 1", "base 2" and so on - -``` -\define testCreate() +Clicking the button will create: "base", "base 1", "base 2" and so on +"""/> +<$data $tiddler="ActionCreateTiddlerWidget Template"/> +<$data title=Output text="""\procedure testCreate() <$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template"/> \end <$button actions=<<testCreate>> > Create Tiddler -</$button> -``` - -<$button actions=<<testCreate>> > -<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/> -Create Tiddler -</$button> - Clicking this button will also open the Right sidebar: Recent tab +</$button>"""/> +</$testcase> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 4.tid b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 4.tid index 1335893e5..b633f4359 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 4.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 4.tid @@ -1,28 +1,21 @@ created: 20200131150229551 -modified: 20211113011129601 +modified: 20240602154933113 tags: ActionCreateTiddlerWidget title: ActionCreateTiddlerWidget Example 4 type: text/vnd.tiddlywiki -\define testCreate() -<$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template" aa="new field aa" bb="new field bb" /> -\end - -This example uses a base-title "base" and a template: [[ActionCreateTiddlerWidget Template]]. +<$testcase> +<$data title=Description text="Template with override fields and custom base title"/> +<$data title=Narrative text="""The $action-createtiddler widget in this example uses the basetitle attribute and template: [[ActionCreateTiddlerWidget Template]]. There will be new fields "aa" and "bb" which are added to the new tiddlers. - -``` -\define testCreate() +"""/> +<$data $tiddler="ActionCreateTiddlerWidget Template"/> +<$data title=Output text="""\procedure testCreate() <$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template" aa="new field aa" bb="new field bb" /> \end <$button actions=<<testCreate>> > Create Tiddler -</$button> -``` - -<$button actions=<<testCreate>> > -<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/> -Create Tiddler -</$button> - Clicking this button will also open the Right sidebar: Recent tab +</$button>"""/> +</$testcase> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 5.tid b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 5.tid index 03f719b8b..d0346d781 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 5.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 5.tid @@ -1,32 +1,20 @@ created: 20200131144828713 -modified: 20230111220933412 +modified: 20240602155008453 tags: ActionCreateTiddlerWidget title: ActionCreateTiddlerWidget Example 5 type: text/vnd.tiddlywiki -\define testCreate() +<$testcase> +<$data title=Description text="Child action widget uses the created tiddler title"/> +<$data title=Narrative text="""The $action-createtiddler widget in this example uses the <<.var createTiddler-title>> variable to navigate to the created tiddler"""/> +<$data $tiddler="ActionCreateTiddlerWidget Template"/> +<$data title=Output text="""\procedure testCreate() <$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template"> - <$action-sendmessage $message="tm-edit-tiddler" $param=<<createTiddler-title>>/> -</$action-createtiddler> -\end - -This example will use the base title defined in [[ActionCreateTiddlerWidget Template]]. - -It will create: "base", "base 1", "base 2" and so on, and navigate to this tiddler in draft mode. - -``` -\define testCreate() -<$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template"> - <$action-sendmessage $message="tm-edit-tiddler" $param=<<createTiddler-title>>/> + <$action-navigate $to=<<createTiddler-title>>/> </$action-createtiddler> \end <$button actions=<<testCreate>> > Create Tiddler -</$button> -``` - -<$button actions=<<testCreate>> > -<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/> -Create Tiddler -</$button> - Clicking this button, will also open the Right sidebar: Recent tab +</$button>"""/> +</$testcase> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget.tid b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget.tid index 632b71686..85cb8ade8 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget.tid @@ -1,6 +1,6 @@ caption: action-createtiddler created: 20161020152745942 -modified: 20230115084716196 +modified: 20240602153213986 tags: Widgets ActionWidgets title: ActionCreateTiddlerWidget type: text/vnd.tiddlywiki @@ -37,37 +37,6 @@ The ''action-createtiddler'' widget is invisible. ! Examples -<<< -<$macrocall $name='wikitext-example-without-html' src={{ActionCreateTiddlerWidget Example}}/> -<<< - ---- - -<<< -<$transclude tiddler="ActionCreateTiddlerWidget Example 1" mode=block/> -<<< - ---- - -<<< -{{ActionCreateTiddlerWidget Example 2}} -<<< - ---- - -<<< -{{ActionCreateTiddlerWidget Example 3}} -<<< - ---- - -<<< -{{ActionCreateTiddlerWidget Example 4}} -<<< - ---- - -<<< -{{ActionCreateTiddlerWidget Example 5}} -<<< - +<$list filter="[prefix[ActionCreateTiddlerWidget Example]]"> +<$transclude/> +</$list> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget_Example.tid b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget_Example.tid index 2a431ead9..728ed4576 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget_Example.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget_Example.tid @@ -1,14 +1,24 @@ created: 20161020153426686 -modified: 20211113011019510 +modified: 20240602160452171 tags: ActionCreateTiddlerWidget title: ActionCreateTiddlerWidget Example type: text/vnd.tiddlywiki +<$testcase> +<$data title=Description text="Create a new page control button"/> +<$data title=Narrative text="""Use the $action-createtiddler widget to create and open a new, non-functional page control button tiddler"""/> +<$data title=Output text="""\procedure testCreate() +<$action-createtiddler $basetitle="Homemade Button" tags="$:/tags/PageControls" text={{$:/state/new-button-caption}}> + <$action-navigate $to=<<createTiddler-title>>/> +</$action-createtiddler> +\end + +{{$:/core/ui/SideBarSegments/page-controls}} + Caption for new button: <$edit-text tiddler="$:/state/new-button-caption" tag="input" default=""/> -<$button> -<$action-createtiddler $basetitle="Homemade Button" tags="$:/tags/PageControls" text={{$:/state/new-button-caption}}> -<$action-navigate $to=<<createTiddler-title>>/> -</$action-createtiddler> -Create a new non-functional page control button and open the tiddler -</$button> \ No newline at end of file +<$button actions=<<testCreate>> > +Create Tiddler +</$button>"""/> +<$data title="$:/state/new-button-caption" text="button text "/> +</$testcase> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/CodeblockWidget.tid b/editions/tw5.com/tiddlers/widgets/CodeblockWidget.tid index acdab9ef9..e6e7bd166 100644 --- a/editions/tw5.com/tiddlers/widgets/CodeblockWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/CodeblockWidget.tid @@ -1,6 +1,6 @@ caption: codeblock created: 20151103160200000 -modified: 20160817175325205 +modified: 20240809074611002 tags: Widgets title: CodeBlockWidget type: text/vnd.tiddlywiki @@ -22,7 +22,7 @@ The content of the `<$codeblock>` widget is ignored. The `language` attribute accepts either: -* a Highlight.js language code (see https://highlightjs.org/static/demo/ for a list) +* a Highlight.js language code (see https://highlightjs.org/demo for a list) * a MIME type (eg, `text/html` or `image/svg+xml`) ! Examples diff --git a/editions/tw5.com/tiddlers/widgets/Custom Widgets.tid b/editions/tw5.com/tiddlers/widgets/Custom Widgets.tid index b8c48b2c3..847bdeed9 100644 --- a/editions/tw5.com/tiddlers/widgets/Custom Widgets.tid +++ b/editions/tw5.com/tiddlers/widgets/Custom Widgets.tid @@ -1,6 +1,6 @@ created: 20221007144237585 -modified: 20230921180332436 -tags: Concepts Reference +modified: 20240422084734129 +tags: Concepts title: Custom Widgets type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/widgets/EditTextWidget.tid b/editions/tw5.com/tiddlers/widgets/EditTextWidget.tid index dcfd088fb..609cf36ff 100644 --- a/editions/tw5.com/tiddlers/widgets/EditTextWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/EditTextWidget.tid @@ -75,7 +75,7 @@ eg="""<$edit-text tiddler=<<currentTiddler>> field="heading" size="25" focus="ye eg="""\procedure onInput() <%if [get[temp]match[$:/]] %> <$action-confirm $message="Yes, this is how system tiddler names begin!"/> - <% endif %> + <%endif%> \end Type a new tiddler name, starting with the system prefix `$:/`: <$edit-text inputActions=<<onInput>> field="temp" class="tc-edit-texteditor"/> diff --git a/editions/tw5.com/tiddlers/widgets/EditWidget.tid b/editions/tw5.com/tiddlers/widgets/EditWidget.tid index 2b72aa8ec..6822d4d77 100644 --- a/editions/tw5.com/tiddlers/widgets/EditWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/EditWidget.tid @@ -26,7 +26,7 @@ The content of the `<$edit>` widget is ignored. ! Examples -!! Edit the contents (text field) of a tiddler titled <%if [<now YYYY-0MM-0DD>is[tiddler]] %> <$tiddler tiddler=<<now YYYY-0MM-0DD>> > <$link/></$tiddler> <%else %> with today’s date <% endif %> +!! Edit the contents (text field) of a tiddler titled <%if [<now YYYY-0MM-0DD>is[tiddler]] %> <$tiddler tiddler=<<now YYYY-0MM-0DD>> > <$link/></$tiddler> <%else %> with today’s date <%endif%> <$macrocall $name=".example" n="1" eg="""<$edit tiddler=<<now YYYY-0MM-0DD>> class="tc-edit-texteditor"/> diff --git a/editions/tw5.com/tiddlers/widgets/Widgets.tid b/editions/tw5.com/tiddlers/widgets/Widgets.tid index 66793f47d..1b65189b4 100644 --- a/editions/tw5.com/tiddlers/widgets/Widgets.tid +++ b/editions/tw5.com/tiddlers/widgets/Widgets.tid @@ -1,6 +1,6 @@ created: 20140908130500000 -modified: 20240326164134356 -tags: Concepts Reference +modified: 20240422083334052 +tags: Concepts [[Core Widgets]] title: Widgets type: text/vnd.tiddlywiki @@ -14,6 +14,4 @@ Each class of widget contributes a specific ability to the overall functionality The more specialised widgets use a general-purpose [[widget syntax|Widgets in WikiText]] as their only possible WikiText representation. -The following classes of widget are built into the core: -<<list-links "[tag[Widgets]]" class:"multi-columns">> diff --git a/editions/tw5.com/tiddlers/wikitext/Conditional Shortcut Syntax.tid b/editions/tw5.com/tiddlers/wikitext/Conditional Shortcut Syntax.tid index 8cef3acfb..48ff59757 100644 --- a/editions/tw5.com/tiddlers/wikitext/Conditional Shortcut Syntax.tid +++ b/editions/tw5.com/tiddlers/wikitext/Conditional Shortcut Syntax.tid @@ -11,40 +11,40 @@ Within an "if" or "elseif" clause, the variable `condition` contains the value o A simple example: <$macrocall $name='wikitext-example-without-html' -src='<% if [{$:/info/url/protocol}match[file:]] %> +src='<%if [{$:/info/url/protocol}match[file:]] %> Loaded from a file URI -<% else %> +<%else%> Not loaded from a file URI -<% endif %> +<%endif%> '/> -One or more `<% elseif %>` clauses may be included before the `<% else %>` clause: +One or more `<%elseif%>` clauses may be included before the `<%else%>` clause: <$macrocall $name='wikitext-example-without-html' -src='<% if [{$:/info/url/protocol}match[file:]] %> +src='<%if [{$:/info/url/protocol}match[file:]] %> Loaded from a file URI -<% elseif [{$:/info/url/protocol}match[https:]] %> +<%elseif [{$:/info/url/protocol}match[https:]] %> Loaded from an HTTPS URI -<% elseif [{$:/info/url/protocol}match[http:]] %> +<%elseif [{$:/info/url/protocol}match[http:]] %> Loaded from an HTTP URI -<% else %> +<%else%> Loaded from an unknown protocol -<% endif %> +<%endif%> '/> The conditional shortcut syntax can be nested: <$macrocall $name='wikitext-example-without-html' src='\procedure test(animal) -<% if [<animal>match[Elephant]] %> +<%if [<animal>match[Elephant]] %> It is an elephant -<% else %> - <% if [<animal>match[Giraffe]] %> +<%else%> + <%if [<animal>match[Giraffe]] %> It is a giraffe - <% else %> + <%else%> It is completely unknown - <% endif %> -<% endif %> + <%endif%> +<%endif%> \end <<test "Giraffe">> @@ -56,7 +56,7 @@ src='\procedure test(animal) Notes: -* Clauses are parsed in inline mode by default. Force block mode parsing by following the opening `<% if %>`, `<% elseif %>` or `<% else %>` with two line breaks +* Clauses are parsed in inline mode by default. Force block mode parsing by following the opening `<%if %>`, `<%elseif%>` or `<%else%>` with two line breaks * Widgets and HTML elements must be within a single conditional clause; it is not possible to start an element in one conditional clause and end it in another * The conditional shortcut syntax cannot contain pragmas such as procedure definitions diff --git a/editions/tw5.com/tiddlers/wikitext/Utility Classes.tid b/editions/tw5.com/tiddlers/wikitext/Utility Classes.tid index 4a291e34b..b61246960 100644 --- a/editions/tw5.com/tiddlers/wikitext/Utility Classes.tid +++ b/editions/tw5.com/tiddlers/wikitext/Utility Classes.tid @@ -13,7 +13,7 @@ type: text/vnd.tiddlywiki |`tc-max-width-80`|Sets the width of a block-element to use 80% of the maximum container width. This setting is useful with the `tc-center` class | |`tc-edit-max-width `|Expands [[TextWidget]]s to use the maximum available width. See [[ControlPanel -> Info -> Basics|$:/core/ui/ControlPanel/Basics]]| |`tc-first-link-nowrap` |Ensures that any links in the first table column will never wrap to the next line | - +|`tc-clearfix`|<<.from-version "5.3.6">> This class can be used to prevent elements, that have a `class="tc-float-right"` from overflowing their container elements. tc-clearfix is already assigned to all major ViewTemplate and EditTemplate elements. So it only needs to be used where the default does not work out of the box.| !! Table Utility Classes |`tc-table-no-border` |Removes the borders of a table | diff --git a/editions/tw5.com/tiddlers/wikitext/parser/WikiText parser mode_ HTML examples.tid b/editions/tw5.com/tiddlers/wikitext/parser/WikiText parser mode_ HTML examples.tid index fc068e44e..8d5483108 100644 --- a/editions/tw5.com/tiddlers/wikitext/parser/WikiText parser mode_ HTML examples.tid +++ b/editions/tw5.com/tiddlers/wikitext/parser/WikiText parser mode_ HTML examples.tid @@ -1,38 +1,20 @@ created: 20220122153235162 -modified: 20220122180508134 +modified: 20240713165558596 tags: [[WikiText parser mode transitions]] title: WikiText parser mode: HTML examples type: text/vnd.tiddlywiki -<<wikitext-example-without-html "<div> - -* blank line after open tag allows -* block mode punctuation (i.e. this list) to -* be recognised -</div> -">> +<<testcase TestCases/HTML/OpenTagBlankLine>> --- The open tag blank line "trick" also works inside of punctuation only recognised in inline mode (such as [[Formatting in WikiText]]): -<<wikitext-example-without-html "''<div> - -* list item one -* list item two -</div>''">> +<<testcase TestCases/HTML/OpenTagBlankLineInBoldSyntax>> --- -<<wikitext-example-without-html "<div> -* Open tag without a blank line means -* block mode punctuation (i.e. this list) will -* NOT be recognised. - -Paragraphs are only recognised in block mode. Even with blank lines, new paragraphs are not recognised. - -This also is not a new paragraph. -</div>">> +<<testcase TestCases/HTML/OpenTagNoBlankLine>> --- @@ -42,11 +24,7 @@ Adding a blank link after an open tag within a table cell causes the row to span <<wikitext-example-without-html "|table row|all on|one line|is recognised|">> -<<wikitext-example-without-html "|For a blank line after open tag|<div> - -* list is recognised -* but the surrounding table row is not -</div>|">> +<<testcase TestCases/HTML/OpenTagBlankLineInTableSyntax>> --- @@ -58,15 +36,4 @@ Note that <<.wlink MacroCallWidget>> does not have a similar <<.attr mode>> attr --- -The less convenient `<table>`, `<tr>`, `<td>` html tags can be used as a foolproof way to get [[block mode|Block Mode WikiText]] punctuation recognised inside of table cells. - -<<wikitext-example-without-html "<table> -<tr><td> - -* list item one -* list item two -</td><td> - -|nested|table| -</td></tr> -</table>">> \ No newline at end of file +<<testcase TestCases/HTML/BlockModeInHTMLTable>> \ No newline at end of file diff --git a/languages/pl-PL/Buttons.multids b/languages/pl-PL/Buttons.multids index 911559337..07d44db5a 100644 --- a/languages/pl-PL/Buttons.multids +++ b/languages/pl-PL/Buttons.multids @@ -79,6 +79,7 @@ NewMarkdown/Caption: nowy Markdown tiddler NewMarkdown/Hint: Stwórz nowego tiddlera o typie Markdown NewTiddler/Caption: nowy tiddler NewTiddler/Hint: Stwórz nowego tiddlera +OpenControlPanel/Hint: Otwórz panel kontrolny OpenWindow/Caption: otwórz w nowym oknie OpenWindow/Hint: Otwórz tego tiddlera w nowym oknie Palette/Caption: paleta @@ -103,6 +104,8 @@ ShowSideBar/Caption: pokaż menu boczne ShowSideBar/Hint: Pokaż menu boczne TagManager/Caption: menedżer tagów TagManager/Hint: Otwórz menedżer tagów +TestCaseImport/Caption: importuj tiddlery +TestCaseImport/Hint: Importuj tiddlery Timestamp/Caption: aktualizacje czasu Timestamp/Hint: Wybierz czy zmiany mają aktualizować czas Timestamp/On/Caption: zmiany czasu są włączone @@ -129,6 +132,7 @@ Excise/Caption/Replace/Link: link Excise/Caption/Replace/Transclusion: transkluzja Excise/Caption/Tag: Otaguj nowego tiddlera nazwą tego Excise/Caption/TiddlerExists: Uwaga: tiddler już istnieje +Excise/DefaultTitle: Nowe Wycięcie Excise/Hint: Wytnij zaznaczony tekst i wstaw go do nowego tidlera Heading1/Caption: nagłówek 1 Heading1/Hint: Zmień zaznaczony tekst na nagłówek 1. stopnia diff --git a/languages/pl-PL/ControlPanel.multids b/languages/pl-PL/ControlPanel.multids index 2ee8983c2..220de0267 100644 --- a/languages/pl-PL/ControlPanel.multids +++ b/languages/pl-PL/ControlPanel.multids @@ -198,6 +198,12 @@ Settings/TitleLinks/Yes/Description: Wyświetlaj nazwy jako linki Settings/MissingLinks/Caption: Wiki Linki Settings/MissingLinks/Hint: Wybierz czy linkować do nieistniejących jeszcze tiddlerów Settings/MissingLinks/Description: Włacz linowanie do nieistniejących tiddlerów +SocialCard/Caption: Karta Mediów Społecznościowych +SocialCard/Domain/Prompt: Domena wyświetlana przy linku (np, ''tiddlywiki.com'') +SocialCard/Hint: Informacje wykorzysytwane przez media społecznościowe i komunikatury by wyświetlić kartę z podglądem link do tej TiddlyWiki przy wklejeniu linka +SocialCard/PreviewUrl/Prompt: Pełen adres do obrazka podglądku dla tej TiddlyWiki +SocialCard/PreviewUrl/Preview: Podgląd obrazka: +SocialCard/Url/Prompt: Pełen adres do tej TiddlyWiki StoryTiddler/Caption: Widok Tiddlera StoryTiddler/Hint: Ta kaskada określa szablon używany podczas wyświetlania tiddlera w Story River. StoryView/Caption: Widok Story River @@ -206,6 +212,12 @@ Stylesheets/Caption: Style: Stylesheets/Expand/Caption: Rozwiń Wszystko Stylesheets/Hint: To jest wyrenderowany CSS obecnych tiddlerów otagowanych jako <<tag "$:/tags/Stylesheet">> Stylesheets/Restore/Caption: Przywróć +TestCases/Caption: Przypadki Testowe +TestCases/Hint: Przypadki testowe służą do nauki oraz testowania systemu +TestCases/All/Caption: Wszystkie Przypadki Testowe +TestCases/All/Hint: Wszystkie Przypadki Testowe +TestCases/Failed/Caption: Nieudane Przypadki Testowe +TestCases/Failed/Hint: Tylko Nieudane Przypadki Testowe Theme/Caption: Motyw Theme/Prompt: Obecny motyw: TiddlerFields/Caption: Pola tiddlerów @@ -229,3 +241,7 @@ ViewTemplateBody/Caption: Treść Wyświetlanego Tiddlera ViewTemplateBody/Hint: Ta kaskada określa szablon wyświetlania treści tiddlera (czyli jego tekstu, w przeciwieństwie do kaskady 'Widok Tiddlera'). ViewTemplateTitle/Caption: Tytuł Wyświetlanego Tiddlera ViewTemplateTitle/Hint: Ta kaskada określa szablon wyświetlania tytułu tiddlera. +ViewTemplateSubtitle/Caption: Podtytuł Wyświetlanego Tiddlera +ViewTemplateSubtitle/Hint: Ta kaskada określa szablon wyświetlania podtytułu tiddlera. +ViewTemplateTags/Caption: Tagi Wyświetlanego Tiddlera +ViewTemplateTags/Hint: Ta kaskada określa szablon wyświetlania tagów tiddlera. \ No newline at end of file diff --git a/languages/pl-PL/Docs/PaletteColours.multids b/languages/pl-PL/Docs/PaletteColours.multids index 2fe037cfb..be660c954 100644 --- a/languages/pl-PL/Docs/PaletteColours.multids +++ b/languages/pl-PL/Docs/PaletteColours.multids @@ -65,6 +65,13 @@ sidebar-tab-foreground-selected: Tekst wybranej zakładki w menu bocznym sidebar-tab-foreground: Tekst zakładki w menu bocznym sidebar-tiddler-link-foreground-hover: Tekst po najechaniu linku do tiddlera w menu bocznym sidebar-tiddler-link-foreground: Tekst linka do tiddlera w menu bocznym +stability-stable: Odznaka dla stanu wtyczki "stabilna" (stable) +stability-experimental: Odznaka dla stanu wtyczki "eksperymentalna" (experimental) +stability-deprecated: Odznaka dla stanu wtyczki "wycofana" (deprecated) +stability-legacy: Odznaka dla stanu wtyczki "stara" (legacy) +testcase-accent-level-1: Akcent kolorystyczny niezagnieżdzonego przypadku testowego +testcase-accent-level-2: Akcent kolorystyczny pojedynczo zagnieżdzonego przypadku testowego +testcase-accent-level-3: Akcent kolorystyczny podwójnie zagnieżdzonego przypadku testowego site-title-foreground: Tekst nazwy strony static-alert-foreground: Tekst statycznego alertu tab-background-selected: Tło wybranej zakładki diff --git a/languages/pl-PL/EditTemplate.multids b/languages/pl-PL/EditTemplate.multids index ca3590d4d..6d581fd52 100644 --- a/languages/pl-PL/EditTemplate.multids +++ b/languages/pl-PL/EditTemplate.multids @@ -26,6 +26,7 @@ Tags/ClearInput/Caption: wyczyść Tags/ClearInput/Hint: Wyczyść tagi Tags/Dropdown/Caption: lista tagów Tags/Dropdown/Hint: Pokaż listę tagów +Tags/EmptyMessage: (brak wyników) Title/BadCharacterWarning: Uwaga: unikaj używania któregokolwiek z tych znaków w nazwach tiddlerów: <<bad-chars>> Title/Exists/Prompt: Docelowy tiddler już istnieje Title/Relink/Prompt: Zaktualizuj ''<$text text=<<fromTitle>>/>'' na ''<$text text=<<toTitle>>/>'' w //tagach// i //listach// pól innych tiddlerów diff --git a/languages/pl-PL/Fields.multids b/languages/pl-PL/Fields.multids index 6b1fe1c41..cab393782 100644 --- a/languages/pl-PL/Fields.multids +++ b/languages/pl-PL/Fields.multids @@ -29,6 +29,7 @@ name: Czytelna nazwa powiązana z tiddlerem wtyczki parent-plugin: Określa nadrzędną wtyczkę plugin-priority: Numeryczna wartość określająca tiddlera wtyczki plugin-type: Typ tiddlera wtyczki +stability: Stan rozwoju wtyczki: wycofany (deprecated), eksperymentalny (experimental), stabilny (stable), stary (legacy) revision: Numer rewizji tiddlera przechowywany na serwerze released: Data wydania TiddlyWiki source: URL źródłowy powiązany z tiddlerem diff --git a/languages/pl-PL/Misc.multids b/languages/pl-PL/Misc.multids index 211798bc8..9e26d5897 100644 --- a/languages/pl-PL/Misc.multids +++ b/languages/pl-PL/Misc.multids @@ -42,6 +42,7 @@ Error/RetrievingSkinny: Bład przy pobieraniu listy tiddlerów Error/SavingToTWEdit: Bład przy zapisywaniu do TWEdit Error/WhileSaving: Bład przy zapisywaniu Error/XMLHttpRequest: Kod błedu XMLHttpRequest +Error/ZoominTextNode: Story View Error: It appears you tried to interact with a tiddler that displays in a custom container. This is most likely caused by using `$:/tags/StoryTiddlerTemplateFilter` with a template that contains text or whitespace at the start. Please use the pragma `\whitespace trim` and ensure the whole contents of the tiddler is wrapped in a single HTML element. The text that caused this issue: InternalJavaScriptError/Title: Wewnętrzny bład JavaScript InternalJavaScriptError/Hint: Ups, to się nie powinno zdarzyć. Zalecamy ponowne uruchomienie TiddlyWiki poprzez odświeżenie strony w przeglądarce. LayoutSwitcher/Description: Otwórzy wybór motywu @@ -70,6 +71,7 @@ OfficialPluginLibrary: Oficjalna Biblioteka Wtyczek ~TiddlyWiki OfficialPluginLibrary/Hint: Oficjalna biblioteka wtyczek ~TiddlyWiki z tiddlywiki.com. Wtyczki, motywi i paczki językowe są utrzymywane przez główny zespół TiddlyWiki. PageTemplate/Description: domyślny motyw ~TiddlyWiki PageTemplate/Name: Domyślny szablon strony +PluginReloadWarning: Zapisz {{$:/core/ui/Buttons/save-wiki}} i odśwież {{$:/core/ui/Buttons/refresh}} ~TiddlyWiki by zastosować zmiany we wtyczkach używajacych ~JavaScriptu RecentChanges/DateFormat: 0DD-0MM-YYYY Shortcuts/Input/AdvancedSearch/Hint: Otwórzy panel zaawansowanego wyszukiwania z poziomu menu bocznego Shortcuts/Input/Accept/Hint: Zaakceptuj zaznaczenia diff --git a/languages/pl-PL/Search.multids b/languages/pl-PL/Search.multids index dd635338d..a9a77ac18 100644 --- a/languages/pl-PL/Search.multids +++ b/languages/pl-PL/Search.multids @@ -6,6 +6,8 @@ Filter/Hint: Szukaj przy pomocy [[wyrażenia filtrującego|https://tiddlywiki.co Filter/Matches: //<small>trafienia: <<resultCount>></small>// Matches: //<small>trafienia: <<resultCount>></small>// Matches/All: Wszystkie trafienia +Matches/NoMatch: //Brak trafień// +Matches/NoResult: //Brak wyników// Matches/Title: Trafienia w nazwach: Search: Szukaj Search/TooShort: Zbyt krótki tekst wyszukiwania diff --git a/languages/pl-PL/Snippets/FunctionDefinition.tid b/languages/pl-PL/Snippets/FunctionDefinition.tid new file mode 100644 index 000000000..5f6436f46 --- /dev/null +++ b/languages/pl-PL/Snippets/FunctionDefinition.tid @@ -0,0 +1,7 @@ +title: $:/language/Snippets/FunctionDefinition +tags: $:/tags/TextEditor/Snippet +caption: Definicja funkcji + +\function f.name(param1,param2:"default value") [<param1>!is[blank]else<param2>] + +<<f.name>> \ No newline at end of file diff --git a/languages/pl-PL/Snippets/ProcedureDefinition.tid b/languages/pl-PL/Snippets/ProcedureDefinition.tid new file mode 100644 index 000000000..a74204f58 --- /dev/null +++ b/languages/pl-PL/Snippets/ProcedureDefinition.tid @@ -0,0 +1,7 @@ +title: $:/language/Snippets/ProcedureDefinition +tags: $:/tags/TextEditor/Snippet +caption: Definicja procedury + +\procedure procName(param1:"default value",param2) +Wstaw tekstu tutaj. +\end \ No newline at end of file diff --git a/languages/pl-PL/Types/text_vnd.tiddlywiki_multiple.tid b/languages/pl-PL/Types/text_vnd.tiddlywiki_multiple.tid new file mode 100644 index 000000000..678b748ea --- /dev/null +++ b/languages/pl-PL/Types/text_vnd.tiddlywiki_multiple.tid @@ -0,0 +1,6 @@ + +title: $:/language/Docs/Types/text/vnd.tiddlywiki-multiple +description: Zbiorczy tiddler +name: text/vnd.tiddlywiki-multiple +group: Developer +group-sort: 2 \ No newline at end of file diff --git a/licenses/cla-individual.md b/licenses/cla-individual.md index c05d5906f..ecabb96fd 100644 --- a/licenses/cla-individual.md +++ b/licenses/cla-individual.md @@ -585,3 +585,7 @@ Michael McDermott, @michaeljmcd, 2024-07-09 @webplusai, 2024/07/23 Val Packett, @valpackett, 2024/07/26 + +@wolfsprite, 2024/08/09 + +@JDIGIO0213, 2024/08/29 diff --git a/plugins/tiddlywiki/blog/templates/tiddler.tid b/plugins/tiddlywiki/blog/templates/tiddler.tid index 32e625861..074e89c22 100644 --- a/plugins/tiddlywiki/blog/templates/tiddler.tid +++ b/plugins/tiddlywiki/blog/templates/tiddler.tid @@ -1,8 +1,8 @@ title: $:/plugins/tiddlywiki/blog/templates/tiddler -<div class="tc-tiddler-frame tc-tiddler-view-frame"> +<div class="tc-tiddler-frame tc-tiddler-view-frame tc-clearfix"> -<div class="tc-tiddler-title"> +<div class="tc-tiddler-title tc-clearfix"> <div class="tc-titlebar"> diff --git a/plugins/tiddlywiki/browser-storage/startup.js b/plugins/tiddlywiki/browser-storage/startup.js index e06d7bf48..2d7287971 100644 --- a/plugins/tiddlywiki/browser-storage/startup.js +++ b/plugins/tiddlywiki/browser-storage/startup.js @@ -54,6 +54,13 @@ exports.startup = function() { $tw.wiki.addTiddler({title: ENABLED_TITLE, text: "no"}); $tw.browserStorage.clearLocalStorage(); }); + // Seperate clear cookie and disable action + $tw.rootWidget.addEventListener("tm-delete-browser-storage",function(event) { + $tw.browserStorage.clearLocalStorage(); + }); + $tw.rootWidget.addEventListener("tm-disable-browser-storage",function(event) { + $tw.wiki.addTiddler({title: ENABLED_TITLE, text: "no"}); + }); // Helpers for protecting storage from eviction var setPersistedState = function(state) { $tw.wiki.addTiddler({title: PERSISTED_STATE_TITLE, text: state}); diff --git a/plugins/tiddlywiki/codemirror/ui/controlpanel/codemirror.tid b/plugins/tiddlywiki/codemirror/ui/controlpanel/codemirror.tid index f0e16ddee..29cf88f4c 100644 --- a/plugins/tiddlywiki/codemirror/ui/controlpanel/codemirror.tid +++ b/plugins/tiddlywiki/codemirror/ui/controlpanel/codemirror.tid @@ -13,9 +13,9 @@ list-after: $:/core/ui/ControlPanel/Settings/TiddlyWiki <$list filter="[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Settings/CodeMirror]]"> -<div style="border-top:1px solid #eee;"> +<div class="tc-control-panel-setting" data-setting-title=<<currentTiddler>> > -!! <$link><$transclude field="caption"/></$link> +!!.tc-control-panel-accent <$link><$transclude field="caption"/></$link> <$transclude/> diff --git a/plugins/tiddlywiki/geospatial/tests/widgets/geomap-empty-layer.tid b/plugins/tiddlywiki/geospatial/tests/widgets/geomap-empty-layer.tid new file mode 100644 index 000000000..1a8cdb686 --- /dev/null +++ b/plugins/tiddlywiki/geospatial/tests/widgets/geomap-empty-layer.tid @@ -0,0 +1,19 @@ +title: $:/plugins/tiddlywiki/geospatial/tests/widgets/geomap-empty-layer +description: Map using geolayer without json and lat/long attributes +import: $:/plugins/tiddlywiki/geospatial +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Narrative + +Verify exception reported in [[8452|https://github.com/TiddlyWiki/TiddlyWiki5/issues/8452]] is not thrown when the geolayer widget has no attributes ++ +title: Output + +<$geomap startPosition="bounds"> +<$geolayer/> +</$geomap> ++ +title: ExpectedResult + +<p><div style="width:100%;height:600px;"></div></p> \ No newline at end of file diff --git a/plugins/tiddlywiki/geospatial/widgets/geomap.js b/plugins/tiddlywiki/geospatial/widgets/geomap.js index 9d9dfccd6..ba2957db2 100644 --- a/plugins/tiddlywiki/geospatial/widgets/geomap.js +++ b/plugins/tiddlywiki/geospatial/widgets/geomap.js @@ -262,10 +262,12 @@ GeomapWidget.prototype.refreshMap = function() { var bounds = null; $tw.utils.each(this.renderedLayers,function(layer) { var featureBounds = layer.layer.getBounds(); - if(bounds) { - bounds.extend(featureBounds); - } else { - bounds = featureBounds; + if(featureBounds.isValid()) { + if(bounds) { + bounds.extend(featureBounds); + } else { + bounds = featureBounds; + } } }); if(bounds) { diff --git a/plugins/tiddlywiki/github-fork-ribbon/usage.tid b/plugins/tiddlywiki/github-fork-ribbon/usage.tid index 2c1388da0..c91566b69 100644 --- a/plugins/tiddlywiki/github-fork-ribbon/usage.tid +++ b/plugins/tiddlywiki/github-fork-ribbon/usage.tid @@ -6,11 +6,11 @@ title: $:/plugins/tiddlywiki/github-fork-ribbon/usage \end \procedure ribbonCreateActions() -<% if [[$:/github-ribbon]!is[tiddler]] %> +<%if [[$:/github-ribbon]!is[tiddler]] %> <$action-setfield $tiddler="$:/github-ribbon" $field="text" $value=<<ribbonCode>> tags="$:/tags/PageTemplate" code-body="yes" /> -<% endif %> +<%endif%> <$action-navigate $to="$:/github-ribbon" /> \end @@ -18,9 +18,9 @@ title: $:/plugins/tiddlywiki/github-fork-ribbon/usage <$button actions=<<ribbonCreateActions>> > <%if [[$:/github-ribbon]!is[tiddler]] %> Create -<% else %> +<%else%> Show -<% endif %> ~$:/github-ribbon +<%endif%> ~$:/github-ribbon </$button> \end diff --git a/plugins/tiddlywiki/help/help.tid b/plugins/tiddlywiki/help/help.tid index eca5ffaa7..f29d9dbdf 100644 --- a/plugins/tiddlywiki/help/help.tid +++ b/plugins/tiddlywiki/help/help.tid @@ -8,22 +8,22 @@ description: {{$:/language/Buttons/Help/Hint}} \whitespace trim <$list filter="[[$:/config/ShowHelp]get[text]] +[else[no]match[yes]]" variable="ignore"> <$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="[<tv-config-toolbar-icons>match[yes]]"> +<%if [<tv-config-toolbar-icons>match[yes]] %> {{$:/core/images/help}} -</$list> -<$list filter="[<tv-config-toolbar-text>match[yes]]"> +<%endif%> +<%if [<tv-config-toolbar-text>match[yes]] %> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Help/Caption}}/></span> -</$list> +<%endif%> </$button> </$list> <$list filter="[[$:/config/ShowHelp]get[text]] +[else[no]!match[yes]]" variable="ignore"> <$button set="$:/config/ShowHelp" setTo="yes" tooltip={{$:/language/Buttons/Help/Hint}} aria-label={{$:/language/Buttons/Help/Caption}} class=<<tv-config-toolbar-class>>> -<$list filter="[<tv-config-toolbar-icons>match[yes]]"> +<%if [<tv-config-toolbar-icons>match[yes]] %> {{$:/core/images/help}} -</$list> -<$list filter="[<tv-config-toolbar-text>match[yes]]"> +<%endif%> +<%if [<tv-config-toolbar-text>match[yes]] %> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Help/Caption}}/></span> -</$list> +<%endif%> </$button> </$list> \end diff --git a/plugins/tiddlywiki/markdown-legacy/new-markdown.tid b/plugins/tiddlywiki/markdown-legacy/new-markdown.tid index 507c265a5..8d8f587d8 100755 --- a/plugins/tiddlywiki/markdown-legacy/new-markdown.tid +++ b/plugins/tiddlywiki/markdown-legacy/new-markdown.tid @@ -7,10 +7,10 @@ list-after: $:/core/ui/Buttons/new-tiddler \whitespace trim <$button tooltip={{$:/language/Buttons/NewMarkdown/Hint}} aria-label={{$:/language/Buttons/NewMarkdown/Caption}} class=<<tv-config-toolbar-class>>> <$action-sendmessage $message="tm-new-tiddler" type="text/markdown"/> -<$list filter="[<tv-config-toolbar-icons>match[yes]]"> +<%if [<tv-config-toolbar-icons>match[yes]] %> {{$:/plugins/tiddlywiki/markdown-legacy/images/new-markdown-button}} -</$list> -<$list filter="[<tv-config-toolbar-text>match[yes]]"> +<%endif%> +<%if [<tv-config-toolbar-text>match[yes]] %> <span class="tc-btn-text"><$text text={{$:/language/Buttons/NewMarkdown/Caption}}/></span> -</$list> +<%endif%> </$button> diff --git a/plugins/tiddlywiki/markdown/config.tid b/plugins/tiddlywiki/markdown/config.tid deleted file mode 100755 index c3fb14c0d..000000000 --- a/plugins/tiddlywiki/markdown/config.tid +++ /dev/null @@ -1,80 +0,0 @@ -title: $:/plugins/tiddlywiki/markdown/config - -! Plugin Configuration - -|!Config |!Default |!Description | -|[[breaks|$:/config/markdown/breaks]]|`false`|markdown-it library config: Convert '\n' in paragraphs into `<br>` | -|[[linkify|$:/config/markdown/linkify]]|`false`|markdown-it library config: Autoconvert URL-like text to links | -|[[renderWikiText|$:/config/markdown/renderWikiText]]|`true`|After Markdown is parsed, should any text elements be handed off to the ~WikiText parser for further processing? | -|[[renderWikiTextPragma|$:/config/markdown/renderWikiTextPragma]]|<code><$view tiddler="$:/plugins/tiddlywiki/markdown" subtiddler="$:/config/markdown/renderWikiTextPragma" mode="inline"/></code>|When handing off to the ~WikiText parser, what parser rules should it follow? | -|[[typographer|$:/config/markdown/typographer]]|`false`|markdown-it library config: Enable some language-neutral replacement + quotes beautification | -|[[quotes|$:/config/markdown/quotes]]|`“”‘’`|markdown-it library config: Double + single quotes replacement pairs, when `typographer` is enabled | - -''IMPORTANT:'' You must reload your wiki for changes to take effect. - -<h2 style="margin-top:1.5em">~WikiText Pragma</h2> - -The value of [[renderWikiTextPragma|$:/config/markdown/renderWikiTextPragma]] has been carefully tuned to properly integrate markdown with ~TiddlyWiki. Changing this setting may produce unexpected results, but the inclusion of the following parser rules should be fine: - -; image -: embed images using ~TiddlyWiki's image syntax: - -<p style="margin-left:1em"> - -``` -[img[An explanatory tooltip|TiddlerTitle]] - -[img width=23 class="tc-image" [https://tiddlywiki.com/fractalveg.jpg]] -``` -</p> - -; prettylink -: create links the ~TiddlyWiki way: - -<p style="margin-left:1em"> - -``` -[[TiddlerTitle]] - -[[Displayed Link Title|Tiddler Title]] - -[[TW5|https://tiddlywiki.com/]] -``` -</p> - -; prettyextlink -: create external links using the following syntax: - -<p style="margin-left:1em"> - -``` -[ext[Open file|index.html]] - -[ext[Open file|../README.md]] -``` -</p> - -; wikilink -: auto-link ~CamelCase titles - -; syslink -: auto-link system tiddlers - -<h2 style="margin-top:1.5em">Typographical Replacements</h2> - -When [[typographer|$:/config/markdown/typographer]] is enabled, markdown-it will provide these typographical replacements: - -``` -(c) (C) → © -(tm) (TM) → ™ -(r) (R) → ® -+- → ± -... → … -?.... → ?.. -!.... → !.. -????? → ??? -!!!!! → !!! -,, → , --- → – ---- → — -``` \ No newline at end of file diff --git a/plugins/tiddlywiki/markdown/new-markdown.tid b/plugins/tiddlywiki/markdown/new-markdown.tid index 192543d77..404046360 100755 --- a/plugins/tiddlywiki/markdown/new-markdown.tid +++ b/plugins/tiddlywiki/markdown/new-markdown.tid @@ -7,10 +7,10 @@ list-after: $:/core/ui/Buttons/new-tiddler \whitespace trim <$button tooltip={{$:/language/Buttons/NewMarkdown/Hint}} aria-label={{$:/language/Buttons/NewMarkdown/Caption}} class=<<tv-config-toolbar-class>>> <$action-sendmessage $message="tm-new-tiddler" type="text/markdown"/> -<$list filter="[<tv-config-toolbar-icons>match[yes]]"> +<%if [<tv-config-toolbar-icons>match[yes]] %> {{$:/plugins/tiddlywiki/markdown/images/new-markdown-button}} -</$list> -<$list filter="[<tv-config-toolbar-text>match[yes]]"> +<%endif%> +<%if [<tv-config-toolbar-text>match[yes]] %> <span class="tc-btn-text"><$text text={{$:/language/Buttons/NewMarkdown/Caption}}/></span> -</$list> +<%endif%> </$button> diff --git a/plugins/tiddlywiki/markdown/plugin.info b/plugins/tiddlywiki/markdown/plugin.info index cf5ecea3a..37211a69e 100755 --- a/plugins/tiddlywiki/markdown/plugin.info +++ b/plugins/tiddlywiki/markdown/plugin.info @@ -2,6 +2,6 @@ "title": "$:/plugins/tiddlywiki/markdown", "name": "Markdown", "description": "Markdown parser based on markdown-it", - "list": "readme config syntax license", + "list": "readme settings syntax license", "stability": "STABILITY_2_STABLE" } diff --git a/plugins/tiddlywiki/markdown/readme.tid b/plugins/tiddlywiki/markdown/readme.tid index 1859fd36e..f924ddec8 100755 --- a/plugins/tiddlywiki/markdown/readme.tid +++ b/plugins/tiddlywiki/markdown/readme.tid @@ -29,4 +29,73 @@ var md = $tw.Wiki.parsers["text/markdown"].prototype.md; md.use(plugin1) .use(plugin2, opts, ...); +``` + +! Plugin Configuration + +<h2 style="margin-top:1.5em">~WikiText Pragma</h2> + +The value of [[renderWikiTextPragma|$:/config/markdown/renderWikiTextPragma]] has been carefully tuned to properly integrate markdown with ~TiddlyWiki. Changing this setting may produce unexpected results, but the inclusion of the following parser rules should be fine: + +; image +: embed images using ~TiddlyWiki's image syntax: + +<p style="margin-left:1em"> + +``` +[img[An explanatory tooltip|TiddlerTitle]] + +[img width=23 class="tc-image" [https://tiddlywiki.com/fractalveg.jpg]] +``` +</p> + +; prettylink +: create links the ~TiddlyWiki way: + +<p style="margin-left:1em"> + +``` +[[TiddlerTitle]] + +[[Displayed Link Title|Tiddler Title]] + +[[TW5|https://tiddlywiki.com/]] +``` +</p> + +; prettyextlink +: create external links using the following syntax: + +<p style="margin-left:1em"> + +``` +[ext[Open file|index.html]] + +[ext[Open file|../README.md]] +``` +</p> + +; wikilink +: auto-link ~CamelCase titles + +; syslink +: auto-link system tiddlers + +<h2 style="margin-top:1.5em">Typographical Replacements</h2> + +When [[typographer|$:/config/markdown/typographer]] is enabled, markdown-it will provide these typographical replacements: + +``` +(c) (C) → © +(tm) (TM) → ™ +(r) (R) → ® ++- → ± +... → … +?.... → ?.. +!.... → !.. +????? → ??? +!!!!! → !!! +,, → , +-- → – +--- → — ``` \ No newline at end of file diff --git a/plugins/tiddlywiki/markdown/settings.tid b/plugins/tiddlywiki/markdown/settings.tid new file mode 100644 index 000000000..85f419466 --- /dev/null +++ b/plugins/tiddlywiki/markdown/settings.tid @@ -0,0 +1,19 @@ +title: $:/plugins/tiddlywiki/markdown/settings +tags: $:/tags/ControlPanel/SettingsTab +caption: Markdown + +These settings let you customise the behaviour of Markdown. See [[plugin|$:/plugins/tiddlywiki/markdown]] readme tab for more information. + +''IMPORTANT:'' You must reload your wiki for changes to take effect. + +<$list filter="[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Settings/Markdown]]"> + +<div class="tc-control-panel-setting" data-setting-title=<<currentTiddler>> > + +!!.tc-control-panel-accent <$link><$transclude field="caption"/></$link> + +<$transclude/> + +</div> + +</$list> \ No newline at end of file diff --git a/plugins/tiddlywiki/markdown/settings/breaks.tid b/plugins/tiddlywiki/markdown/settings/breaks.tid new file mode 100644 index 000000000..95ebc47a8 --- /dev/null +++ b/plugins/tiddlywiki/markdown/settings/breaks.tid @@ -0,0 +1,9 @@ +title: $:/plugins/tiddlywiki/markdown/settings/breaks +tags: $:/tags/ControlPanel/Settings/Markdown +caption: Breaks + +markdown-it library config: Convert `\n` in paragraphs into `<br>` + +<$checkbox tiddler="$:/config/markdown/breaks" field="text" checked="true" unchecked="false"> + [[Breaks|$:/config/markdown/breaks]] +</$checkbox> \ No newline at end of file diff --git a/plugins/tiddlywiki/markdown/settings/linkify.tid b/plugins/tiddlywiki/markdown/settings/linkify.tid new file mode 100644 index 000000000..c43928ccf --- /dev/null +++ b/plugins/tiddlywiki/markdown/settings/linkify.tid @@ -0,0 +1,9 @@ +title: $:/plugins/tiddlywiki/markdown/settings/linkify +tags: $:/tags/ControlPanel/Settings/Markdown +caption: Linkify + +markdown-it library config: Autoconvert URL-like text to links + +<$checkbox tiddler="$:/config/markdown/linkify" field="text" checked="true" unchecked="false"> + [[Linkify|$:/config/markdown/linkify]] +</$checkbox> \ No newline at end of file diff --git a/plugins/tiddlywiki/markdown/settings/quotes.tid b/plugins/tiddlywiki/markdown/settings/quotes.tid new file mode 100644 index 000000000..b4247ede6 --- /dev/null +++ b/plugins/tiddlywiki/markdown/settings/quotes.tid @@ -0,0 +1,8 @@ +title: $:/plugins/tiddlywiki/markdown/settings/quotes +tags: $:/tags/ControlPanel/Settings/Markdown +caption: Quotes replacement +list-after: $:/plugins/tiddlywiki/markdown/settings/typographer + +markdown-it library config: Double + single quotes replacement pairs, when [[typographer|$:/config/markdown/typographer]] is enabled. + +|[[Quotes replacement|$:/config/markdown/quotes]]|<$edit-text tiddler="$:/config/markdown/quotes" tag="input"/> | \ No newline at end of file diff --git a/plugins/tiddlywiki/markdown/settings/renderWikiText.tid b/plugins/tiddlywiki/markdown/settings/renderWikiText.tid new file mode 100644 index 000000000..9b2073c10 --- /dev/null +++ b/plugins/tiddlywiki/markdown/settings/renderWikiText.tid @@ -0,0 +1,9 @@ +title: $:/plugins/tiddlywiki/markdown/settings/renderWikiText +tags: $:/tags/ControlPanel/Settings/Markdown +caption: Enable WikiText + +After Markdown is parsed, should any text elements be handed off to the ~WikiText parser for further processing? + +<$checkbox tiddler="$:/config/markdown/renderWikiText" field="text" checked="true" unchecked="false"> + [[Enable WikiText|$:/config/markdown/renderWikiText]] +</$checkbox> \ No newline at end of file diff --git a/plugins/tiddlywiki/markdown/settings/renderWikiTextPragma.tid b/plugins/tiddlywiki/markdown/settings/renderWikiTextPragma.tid new file mode 100644 index 000000000..12b4ceefb --- /dev/null +++ b/plugins/tiddlywiki/markdown/settings/renderWikiTextPragma.tid @@ -0,0 +1,7 @@ +title: $:/plugins/tiddlywiki/markdown/settings/renderWikiTextPragma +tags: $:/tags/ControlPanel/Settings/Markdown +caption: Enabled WikiText parser rules + +When handing off to the ~WikiText parser, what parser rules should it follow? + +|[[Enabled WikiText parser rules|$:/config/markdown/renderWikiTextPragma]]|<$edit tiddler="$:/config/markdown/renderWikiTextPragma" class="tc-edit-texteditor" autoHeight="yes"/> | \ No newline at end of file diff --git a/plugins/tiddlywiki/markdown/settings/typographer.tid b/plugins/tiddlywiki/markdown/settings/typographer.tid new file mode 100644 index 000000000..5b9153dae --- /dev/null +++ b/plugins/tiddlywiki/markdown/settings/typographer.tid @@ -0,0 +1,9 @@ +title: $:/plugins/tiddlywiki/markdown/settings/typographer +tags: $:/tags/ControlPanel/Settings/Markdown +caption: Typographer + +markdown-it library config: Enable some language-neutral replacement + quotes beautification + +<$checkbox tiddler="$:/config/markdown/typographer" field="text" checked="true" unchecked="false"> + [[Typographer|$:/config/markdown/typographer]] +</$checkbox> \ No newline at end of file diff --git a/plugins/tiddlywiki/menubar/keyboardshortcuts-menubar-search.tid b/plugins/tiddlywiki/menubar/keyboardshortcuts-menubar-search.tid new file mode 100644 index 000000000..cb5fefb55 --- /dev/null +++ b/plugins/tiddlywiki/menubar/keyboardshortcuts-menubar-search.tid @@ -0,0 +1,5 @@ +key: ((menubar-search)) +tags: $:/tags/KeyboardShortcut +title: $:/core/ui/KeyboardShortcuts/menubar-search + +<$action-sendmessage $message="tm-focus-selector" $param=".tc-menubar input"/> diff --git a/plugins/tiddlywiki/menubar/shortcutinfo-menubar-search.tid b/plugins/tiddlywiki/menubar/shortcutinfo-menubar-search.tid new file mode 100644 index 000000000..9f7b0bb0c --- /dev/null +++ b/plugins/tiddlywiki/menubar/shortcutinfo-menubar-search.tid @@ -0,0 +1,4 @@ +tags: +title: $:/config/ShortcutInfo/menubar-search + +Select the menubar search field diff --git a/plugins/tiddlywiki/qrcode/ViewToolbarButton/Button.tid b/plugins/tiddlywiki/qrcode/ViewToolbarButton/Button.tid index 2a6335545..7ac85af19 100644 --- a/plugins/tiddlywiki/qrcode/ViewToolbarButton/Button.tid +++ b/plugins/tiddlywiki/qrcode/ViewToolbarButton/Button.tid @@ -8,50 +8,28 @@ description: Generate QR code for this tiddler \whitespace trim <span class="tc-popup-keep"> <$button popup=<<qualify "$:/state/popup/qrcode">> tooltip={{$:/plugins/tiddlywiki/qrcode/ViewToolbarButton!!description}} aria-label={{$:/plugins/tiddlywiki/qrcode/ViewToolbarButton!!short-caption}} class=<<tv-config-toolbar-class>> class=<<tv-config-toolbar-class>> selectedClass="tc-selected"> -<$list filter="[<tv-config-toolbar-icons>match[yes]]"> +<%if [<tv-config-toolbar-icons>match[yes]] %> {{$:/plugins/tiddlywiki/qrcode/icon}} -</$list> -<$list filter="[<tv-config-toolbar-text>match[yes]]"> +<%endif%> +<%if [<tv-config-toolbar-text>match[yes]] %> <span class="tc-btn-text"> <$text text={{$:/plugins/tiddlywiki/qrcode/ViewToolbarButton!!short-caption}}/> </span> -</$list> +<%endif%> </$button> </span> <$reveal state=<<qualify "$:/state/popup/qrcode">> type="popup" position="below" animate="yes"> + <div class="tc-drop-down"> -<div class="tc-drop-down"> - -{{$:/plugins/tiddlywiki/qrcode/ViewToolbarButton||description}} - -<$set name="tv-config-toolbar-icons" value="yes"> - -<$set name="tv-config-toolbar-text" value="yes"> - -<$set name="tv-config-toolbar-class" value="tc-btn-invisible"> - -<$set name="targetTiddler" value=<<currentTiddler>>> - -<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbarButton/QRcode]!has[draft.of]]"> - -<$button popup=<<qualify "$:/state/popup/qrcode/type">> class="tc-btn-invisible" selectedClass="tc-selected"> - -<$action-sendmessage $message="tm-modal" $param=<<currentTiddler>> currentTiddler=<<targetTiddler>>/> - -<$transclude field="caption" mode="inline"/> - -</$button> - -</$list> - -</$set> - -</$set> - -</$set> - -</$set> - -</div> + {{$:/plugins/tiddlywiki/qrcode/ViewToolbarButton||description}} + <$let tv-config-toolbar-icons="yes" tv-config-toolbar-text="yes" tv-config-toolbar-class="tc-btn-invisible" targetTiddler=<<currentTiddler>>> + <$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbarButton/QRcode]!has[draft.of]]"> + <$button popup=<<qualify "$:/state/popup/qrcode/type">> class="tc-btn-invisible" selectedClass="tc-selected"> + <$action-sendmessage $message="tm-modal" $param=<<currentTiddler>> currentTiddler=<<targetTiddler>>/> + <$transclude field="caption" mode="inline"/> + </$button> + </$list> + </$let> + </div> </$reveal> diff --git a/plugins/tiddlywiki/text-slicer/ui/slice-toolbar-button.tid b/plugins/tiddlywiki/text-slicer/ui/slice-toolbar-button.tid index ef53223d2..0a9b41414 100644 --- a/plugins/tiddlywiki/text-slicer/ui/slice-toolbar-button.tid +++ b/plugins/tiddlywiki/text-slicer/ui/slice-toolbar-button.tid @@ -6,18 +6,18 @@ description: Slice this text tiddler by headings and lists \whitespace trim -\define hint() +\procedure hint() Slice this text tiddler into chunks \end <$list filter="[<currentTiddler>!is[image]!is[binary]]" variable="ignore"> <$button tooltip=<<hint>> aria-label=<<hint>> class=<<tv-config-toolbar-class>>> <$action-sendmessage $message="tm-modal" $param="$:/plugins/tiddlywiki/text-slicer/ui/slice-modal" currentTiddler=<<currentTiddler>>/> -<$list filter="[<tv-config-toolbar-icons>match[yes]]"> +<%if [<tv-config-toolbar-icons>match[yes]] %> {{$:/plugins/tiddlywiki/text-slicer/images/text-slicer-icon}} -</$list> -<$list filter="[<tv-config-toolbar-text>match[yes]]"> +<%endif%> +<%if [<tv-config-toolbar-text>match[yes]] %> <span class="tc-btn-text">Slice tiddler</span> -</$list> +<%endif%> </$button> </$list> diff --git a/plugins/tiddlywiki/tiddlyweb/save-wiki-button.tid b/plugins/tiddlywiki/tiddlyweb/save-wiki-button.tid index ed4c042c7..63ddfc19e 100644 --- a/plugins/tiddlywiki/tiddlyweb/save-wiki-button.tid +++ b/plugins/tiddlywiki/tiddlyweb/save-wiki-button.tid @@ -9,12 +9,12 @@ $:/config/PageControlButtons/Visibility/$(listItem)$ \end <$button popup=<<qualify "$:/state/popup/save-wiki">> tooltip="Status of synchronisation with server" aria-label="Server status" class=<<tv-config-toolbar-class>> selectedClass="tc-selected"> <span class="tc-dirty-indicator"> -<$list filter="[<tv-config-toolbar-icons>match[yes]]"> +<%if [<tv-config-toolbar-icons>match[yes]] %> {{$:/plugins/tiddlywiki/tiddlyweb/icon/cloud}} -</$list> -<$list filter="[<tv-config-toolbar-text>match[yes]]"> +<%endif%> +<%if [<tv-config-toolbar-text>match[yes]] %> <span class="tc-btn-text"><$text text="Server status"/></span> -</$list> +<%endif%> </span> </$button> <$reveal state=<<qualify "$:/state/popup/save-wiki">> type="popup" position="belowleft" animate="yes"> diff --git a/plugins/tiddlywiki/tour/simplified-tiddler-with-tags.tid b/plugins/tiddlywiki/tour/simplified-tiddler-with-tags.tid index 9adf981e1..c2c14a7b0 100644 --- a/plugins/tiddlywiki/tour/simplified-tiddler-with-tags.tid +++ b/plugins/tiddlywiki/tour/simplified-tiddler-with-tags.tid @@ -81,8 +81,8 @@ color:$(foregroundColor)$; \end <$let storyTiddler=<<currentTiddler>>> - <div class="tc-tiddler-frame tc-tiddler-view-frame tc-tiddler-exists tc-tiddler-shadow " role="article"> - <div class="tc-tiddler-title"> + <div class="tc-tiddler-frame tc-tiddler-view-frame tc-tiddler-exists tc-tiddler-shadow tc-clearfix" role="article"> + <div class="tc-tiddler-title tc-clearfix"> <div class="tc-titlebar"> <span class="tc-tiddler-controls"> <$list filter="[<tour-simplified-tiddler-close-button>match[yes]]" variable="ignore"> @@ -94,12 +94,12 @@ color:$(foregroundColor)$; </span> </div> </div> - <div class="tc-tags-wrapper"> + <div class="tc-tags-wrapper tc-clearfix"> <$list filter="[all[current]tags[]sort[title]]" storyview="pop"> <<simplified-tag "$:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/">> </$list> </div> - <div class="tc-tiddler-body"> + <div class="tc-tiddler-body tc-clearfix"> <$transclude field="text" mode="block"/> </div> </div> diff --git a/plugins/tiddlywiki/tour/simplified-tiddler.tid b/plugins/tiddlywiki/tour/simplified-tiddler.tid index 22a146b9a..302903bee 100644 --- a/plugins/tiddlywiki/tour/simplified-tiddler.tid +++ b/plugins/tiddlywiki/tour/simplified-tiddler.tid @@ -3,7 +3,7 @@ title: $:/plugins/tiddlywiki/tour/simplified-tiddler \whitespace trim <$let storyTiddler=<<currentTiddler>>> <div class="tc-tiddler-frame tc-tiddler-view-frame tc-tiddler-exists tc-tiddler-shadow " role="article"> - <div class="tc-tiddler-title"> + <div class="tc-tiddler-title tc-clearfix"> <div class="tc-titlebar"> <span class="tc-tiddler-controls"> <$list filter="[<tour-simplified-tiddler-close-button>match[yes]]" variable="ignore"> @@ -15,7 +15,7 @@ title: $:/plugins/tiddlywiki/tour/simplified-tiddler </span> </div> </div> - <div class="tc-tiddler-body"> + <div class="tc-tiddler-body tc-clearfix"> <$transclude field="text" mode="block"/> </div> </div> diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index ff64ea23e..4a4867c0b 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -1350,10 +1350,6 @@ canvas.tc-edit-bitmapeditor { display: block; } -.tc-tiddler-body { - clear: both; -} - .tc-single-tiddler-window .tc-tiddler-body, .tc-tiddler-frame .tc-tiddler-body { font-size: {{$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize}}; @@ -2773,6 +2769,30 @@ a.tc-tiddlylink.tc-plugin-info:hover > .tc-plugin-info-chunk .tc-plugin-info-sta float: right; } +/* Float tc-clearfix. Needs to be used by elements that allow float:right in their content. +** So the floating element does not overflow +*/ + +.tc-clearfix:after { + content: ""; + clear: both; + display: table; +} + +/* Fix overflow in table and toc */ +.tc-tiddler-body .tc-tabbed-table-of-contents { + overflow-x: auto; +} + +.tc-tiddler-body > table { + display: block; + overflow: auto; +} +.tc-tiddler-body > table tbody { + display: table; + width: 100%; +} + /* ** Chooser */ @@ -3524,3 +3544,4 @@ span.tc-translink > a:first-child { .tc-tiny-v-gap-bottom { margin-bottom: 3px; } +
<$edit-text field="color" tag="input" type="color"/><$transclude $variable="color-picker-button"/> {{||$:/core/ui/TagTemplate}} <$count filter="[all[current]tagging[]]"/> diff --git a/core/ui/TestCaseTemplate.tid b/core/ui/TestCaseTemplate.tid index 8761abdd5..d6fccb956 100644 --- a/core/ui/TestCaseTemplate.tid +++ b/core/ui/TestCaseTemplate.tid @@ -13,6 +13,7 @@ title: $:/core/ui/TestCaseTemplate testActions="Actions" testHideIfPass=<> > + <$data $filter={{!!import}}/> <$data $compound-filter={{!!import-compound}}/> <$data $compound-tiddler=<>/> <%if [{!!description}!is[blank]] %><$data title="Description" text={{!!description}}/><%endif%> diff --git a/core/ui/ViewTemplate/body.tid b/core/ui/ViewTemplate/body.tid index 34e6aaa38..e4f03ec0e 100644 --- a/core/ui/ViewTemplate/body.tid +++ b/core/ui/ViewTemplate/body.tid @@ -3,7 +3,7 @@ tags: $:/tags/ViewTemplate \import [all[shadows+tiddlers]tag[$:/tags/Macro/View/Body]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global/View/Body]!is[draft]] -<$reveal tag="div" class="tc-tiddler-body" type="nomatch" stateTitle=<> text="hide" retain="yes" animate="yes"> +<$reveal tag="div" class="tc-tiddler-body tc-clearfix" type="nomatch" stateTitle=<> text="hide" retain="yes" animate="yes"> <$transclude tiddler={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateBodyFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/body/default]] }}} /> diff --git a/core/ui/ViewTemplate/body/code.tid b/core/ui/ViewTemplate/body/code.tid index 9d2250395..380df84b7 100644 --- a/core/ui/ViewTemplate/body/code.tid +++ b/core/ui/ViewTemplate/body/code.tid @@ -1,4 +1,8 @@ title: $:/core/ui/ViewTemplate/body/code +<%if [is[missing]] :and[!is[shadow]] %> +<$transclude tiddler="$:/language/MissingTiddler/Hint"/> +<%else%> <$transclude $variable="copy-to-clipboard-above-right" src={{{ [get[text]] }}} /> <$codeblock code={{{ [get[text]] }}} language={{{ [get[type]else[text/vnd.tiddlywiki]] }}}/> +<%endif%> \ No newline at end of file diff --git a/core/ui/ViewTemplate/subtitle/default.tid b/core/ui/ViewTemplate/subtitle/default.tid index 3885dc779..99042c95e 100644 --- a/core/ui/ViewTemplate/subtitle/default.tid +++ b/core/ui/ViewTemplate/subtitle/default.tid @@ -2,7 +2,7 @@ title: $:/core/ui/ViewTemplate/subtitle/default \whitespace trim <$reveal type="nomatch" stateTitle=<> text="hide" tag="div" retain="yes" animate="yes"> -
+
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate/Subtitle]!has[draft.of]]" variable="subtitleTiddler"> <$transclude tiddler=<> mode="inline"/><$list-join>  diff --git a/core/ui/ViewTemplate/title.tid b/core/ui/ViewTemplate/title.tid index 225ea4351..b2cf1bd8e 100644 --- a/core/ui/ViewTemplate/title.tid +++ b/core/ui/ViewTemplate/title.tid @@ -4,7 +4,7 @@ tags: $:/tags/ViewTemplate \whitespace trim \define title-styles() fill:$(foregroundColor)$; -
+
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] :filter[lookup[$:/config/ViewToolbarButtons/Visibility/]!match[hide]]" diff --git a/core/ui/ViewToolbar/clone.tid b/core/ui/ViewToolbar/clone.tid index 434418106..a4066fc00 100644 --- a/core/ui/ViewToolbar/clone.tid +++ b/core/ui/ViewToolbar/clone.tid @@ -4,13 +4,18 @@ caption: {{$:/core/images/clone-button}} {{$:/language/Buttons/Clone/Caption}} description: {{$:/language/Buttons/Clone/Hint}} \whitespace trim -<$button message="tm-new-tiddler" param=<> tooltip={{$:/language/Buttons/Clone/Hint}} aria-label={{$:/language/Buttons/Clone/Caption}} class=<>> -<$list filter="[match[yes]]"> -{{$:/core/images/clone-button}} - -<$list filter="[match[yes]]"> - -<$text text={{$:/language/Buttons/Clone/Caption}}/> - - +<$button message="tm-new-tiddler" + param=<> + tooltip={{$:/language/Buttons/Clone/Hint}} + aria-label={{$:/language/Buttons/Clone/Hint}} + class=<> +> + <%if [match[yes]] %> + {{$:/core/images/clone-button}} + <%endif%> + <%if [match[yes]] %> + + <$text text={{$:/language/Buttons/Clone/Caption}}/> + + <%endif%> \ No newline at end of file diff --git a/core/ui/ViewToolbar/close-others.tid b/core/ui/ViewToolbar/close-others.tid index 57fbf222c..19d996fda 100644 --- a/core/ui/ViewToolbar/close-others.tid +++ b/core/ui/ViewToolbar/close-others.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/CloseOthers/Hint}} \whitespace trim <$button message="tm-close-other-tiddlers" param=<> tooltip={{$:/language/Buttons/CloseOthers/Hint}} aria-label={{$:/language/Buttons/CloseOthers/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/close-others-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/CloseOthers/Caption}}/> - +<%endif%> \ No newline at end of file diff --git a/core/ui/ViewToolbar/close.tid b/core/ui/ViewToolbar/close.tid index bd1fbe0ee..fcc53cef0 100644 --- a/core/ui/ViewToolbar/close.tid +++ b/core/ui/ViewToolbar/close.tid @@ -4,13 +4,17 @@ caption: {{$:/core/images/close-button}} {{$:/language/Buttons/Close/Caption}} description: {{$:/language/Buttons/Close/Hint}} \whitespace trim -<$button message="tm-close-tiddler" tooltip={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class=<>> -<$list filter="[match[yes]]"> -{{$:/core/images/close-button}} - -<$list filter="[match[yes]]"> - -<$text text={{$:/language/Buttons/Close/Caption}}/> - - +<$button message="tm-close-tiddler" + tooltip={{$:/language/Buttons/Close/Hint}} + aria-label={{$:/language/Buttons/Close/Caption}} + class=<> +> + <%if [match[yes]] %> + {{$:/core/images/close-button}} + <%endif%> + <%if [match[yes]] %> + + <$text text={{$:/language/Buttons/Close/Caption}}/> + + <%endif%> \ No newline at end of file diff --git a/core/ui/ViewToolbar/edit.tid b/core/ui/ViewToolbar/edit.tid index f0ab31e4e..730fd6ed5 100644 --- a/core/ui/ViewToolbar/edit.tid +++ b/core/ui/ViewToolbar/edit.tid @@ -4,13 +4,17 @@ caption: {{$:/core/images/edit-button}} {{$:/language/Buttons/Edit/Caption}} description: {{$:/language/Buttons/Edit/Hint}} \whitespace trim -<$button message="tm-edit-tiddler" tooltip={{$:/language/Buttons/Edit/Hint}} aria-label={{$:/language/Buttons/Edit/Caption}} class=<>> -<$list filter="[match[yes]]"> -{{$:/core/images/edit-button}} - -<$list filter="[match[yes]]"> - -<$text text={{$:/language/Buttons/Edit/Caption}}/> - - +<$button message="tm-edit-tiddler" + tooltip={{$:/language/Buttons/Edit/Hint}} + aria-label={{$:/language/Buttons/Edit/Hint}} + class=<> +> + <%if [match[yes]] %> + {{$:/core/images/edit-button}} + <%endif%> + <%if [match[yes]] %> + + <$text text={{$:/language/Buttons/Edit/Caption}}/> + + <%endif%> \ No newline at end of file diff --git a/core/ui/ViewToolbar/export-tiddler.tid b/core/ui/ViewToolbar/export-tiddler.tid index 8c39de856..9bb3d8853 100644 --- a/core/ui/ViewToolbar/export-tiddler.tid +++ b/core/ui/ViewToolbar/export-tiddler.tid @@ -3,7 +3,4 @@ tags: $:/tags/ViewToolbar caption: {{$:/core/images/export-button}} {{$:/language/Buttons/ExportTiddler/Caption}} description: {{$:/language/Buttons/ExportTiddler/Hint}} -\define makeExportFilter() -[[$(currentTiddler)$]] -\end -<$macrocall $name="exportButton" exportFilter=<> lingoBase="$:/language/Buttons/ExportTiddler/" baseFilename=<>/> \ No newline at end of file +<$transclude $variable="exportButton" exportFilter=`[[$(currentTiddler)$]]` lingoBase="$:/language/Buttons/ExportTiddler/" baseFilename=<>/> \ No newline at end of file diff --git a/core/ui/ViewToolbar/fold-others.tid b/core/ui/ViewToolbar/fold-others.tid index 244977509..8734eaf33 100644 --- a/core/ui/ViewToolbar/fold-others.tid +++ b/core/ui/ViewToolbar/fold-others.tid @@ -6,12 +6,12 @@ description: {{$:/language/Buttons/FoldOthers/Hint}} \whitespace trim <$button tooltip={{$:/language/Buttons/FoldOthers/Hint}} aria-label={{$:/language/Buttons/FoldOthers/Caption}} class=<>> <$action-sendmessage $message="tm-fold-other-tiddlers" $param=<> foldedStatePrefix="$:/state/folded/"/> -<$list filter="[match[yes]]" variable="listItem"> +<%if [match[yes]] %> {{$:/core/images/fold-others-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/FoldOthers/Caption}}/> - +<%endif%> \ No newline at end of file diff --git a/core/ui/ViewToolbar/fold.tid b/core/ui/ViewToolbar/fold.tid index fd3363688..3c99c6ad6 100644 --- a/core/ui/ViewToolbar/fold.tid +++ b/core/ui/ViewToolbar/fold.tid @@ -7,26 +7,26 @@ description: {{$:/language/Buttons/Fold/Hint}} <$reveal type="nomatch" stateTitle=<> text="hide" default="show"> <$button tooltip={{$:/language/Buttons/Fold/Hint}} aria-label={{$:/language/Buttons/Fold/Caption}} class=<>> <$action-sendmessage $message="tm-fold-tiddler" $param=<> foldedState=<>/> -<$list filter="[match[yes]]" variable="listItem"> +<%if [match[yes]] %> {{$:/core/images/fold-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Fold/Caption}}/> - +<%endif%> <$reveal type="match" stateTitle=<> text="hide" default="show"> <$button tooltip={{$:/language/Buttons/Unfold/Hint}} aria-label={{$:/language/Buttons/Unfold/Caption}} class=<>> <$action-sendmessage $message="tm-fold-tiddler" $param=<> foldedState=<>/> -<$list filter="[match[yes]]" variable="listItem"> +<%if [match[yes]] %> {{$:/core/images/unfold-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Unfold/Caption}}/> - +<%endif%> diff --git a/core/ui/ViewToolbar/info.tid b/core/ui/ViewToolbar/info.tid index 02fd9abd7..95245d909 100644 --- a/core/ui/ViewToolbar/info.tid +++ b/core/ui/ViewToolbar/info.tid @@ -4,31 +4,30 @@ caption: {{$:/core/images/info-button}} {{$:/language/Buttons/Info/Caption}} description: {{$:/language/Buttons/Info/Hint}} \whitespace trim -\define button-content() -\whitespace trim -<$list filter="[match[yes]]"> +\procedure button-content() +<%if [match[yes]] %> {{$:/core/images/info-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Info/Caption}}/> - +<%endif%> \end <$reveal state="$:/config/TiddlerInfo/Mode" type="match" text="popup"> <$button popup=<> tooltip={{$:/language/Buttons/Info/Hint}} aria-label={{$:/language/Buttons/Info/Caption}} class=<> selectedClass="tc-selected"> -<$macrocall $name="button-content" mode="inline"/> +<$transclude $variable="button-content" $mode="inline"/> <$reveal state="$:/config/TiddlerInfo/Mode" type="match" text="sticky"> <$reveal state=<> type="match" text="" default=""> <$button set=<> setTo="yes" tooltip={{$:/language/Buttons/Info/Hint}} aria-label={{$:/language/Buttons/Info/Caption}} class=<> selectedClass="tc-selected"> -<$macrocall $name="button-content" mode="inline"/> +<$transclude $variable="button-content" $mode="inline"/> <$reveal state=<> type="nomatch" text="" default=""> <$button set=<> setTo="" tooltip={{$:/language/Buttons/Info/Hint}} aria-label={{$:/language/Buttons/Info/Caption}} class=<> selectedClass="tc-selected"> -<$macrocall $name="button-content" mode="inline"/> +<$transclude $variable="button-content" $mode="inline"/> \ No newline at end of file diff --git a/core/ui/ViewToolbar/more-tiddler-actions.tid b/core/ui/ViewToolbar/more-tiddler-actions.tid index e7e75a79b..4528a4eee 100644 --- a/core/ui/ViewToolbar/more-tiddler-actions.tid +++ b/core/ui/ViewToolbar/more-tiddler-actions.tid @@ -4,7 +4,6 @@ caption: {{$:/core/images/down-arrow}} {{$:/language/Buttons/More/Caption}} description: {{$:/language/Buttons/More/Hint}} \whitespace trim -\define config-title() $:/config/ViewToolbarButtons/Visibility/$(listItem)$ <$button popup=<> tooltip={{$:/language/Buttons/More/Hint}} @@ -12,33 +11,29 @@ description: {{$:/language/Buttons/More/Hint}} class=<> selectedClass="tc-selected" > - <$list filter="[match[yes]]"> + <%if [match[yes]] %> {{$:/core/images/down-arrow}} - - <$list filter="[match[yes]]"> + <%endif%> + <%if [match[yes]] %> <$text text={{$:/language/Buttons/More/Caption}}/> - + <%endif%> <$reveal state=<> type="popup" position="belowleft" animate="yes">
- <$set name="tv-config-toolbar-icons" value="yes"> - <$set name="tv-config-toolbar-text" value="yes"> - <$set name="tv-config-toolbar-class" value="tc-btn-invisible"> - <$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]" - variable="listItem" + <$let tv-config-toolbar-icons="yes" tv-config-toolbar-text="yes" tv-config-toolbar-class="tc-btn-invisible"> + <$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]" + variable="listItem" + > + <$reveal type="match" state=`$:/config/ViewToolbarButtons/Visibility/$(listItem)$` text="hide"> + <$set name="tv-config-toolbar-class" + filter="[] [encodeuricomponent[]addprefix[tc-btn-]]" > - <$reveal type="match" state=<> text="hide"> - <$set name="tv-config-toolbar-class" - filter="[] [encodeuricomponent[]addprefix[tc-btn-]]" - > - <$transclude tiddler=<> mode="inline"/> - - - - - - + <$transclude tiddler=<> mode="inline"/> + + + +
\ No newline at end of file diff --git a/core/ui/ViewToolbar/new-here.tid b/core/ui/ViewToolbar/new-here.tid index 31e8e4158..15afe2628 100644 --- a/core/ui/ViewToolbar/new-here.tid +++ b/core/ui/ViewToolbar/new-here.tid @@ -4,23 +4,21 @@ caption: {{$:/core/images/new-here-button}} {{$:/language/Buttons/NewHere/Captio description: {{$:/language/Buttons/NewHere/Hint}} \whitespace trim -\define newHereActions() -\whitespace trim +\procedure newHereActions() <$set name="tags" filter="[] [enlist{$:/config/NewTiddler/Tags}]"> <$action-sendmessage $message="tm-new-tiddler" tags=<>/> \end -\define newHereButton() -\whitespace trim +\procedure newHereButton() <$button actions=<> tooltip={{$:/language/Buttons/NewHere/Hint}} aria-label={{$:/language/Buttons/NewHere/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/new-here-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/NewHere/Caption}}/> - +<%endif%> \end <> diff --git a/core/ui/ViewToolbar/new-journal-here.tid b/core/ui/ViewToolbar/new-journal-here.tid index b64ba7ed7..2df7a2a4e 100644 --- a/core/ui/ViewToolbar/new-journal-here.tid +++ b/core/ui/ViewToolbar/new-journal-here.tid @@ -4,29 +4,21 @@ caption: {{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournalH description: {{$:/language/Buttons/NewJournalHere/Hint}} \whitespace trim -\define journalButtonTags() -[[$(currentTiddlerTag)$]] $(journalTags)$ -\end -\define journalButton() -\whitespace trim +\procedure journalButton() <$button tooltip={{$:/language/Buttons/NewJournalHere/Hint}} aria-label={{$:/language/Buttons/NewJournalHere/Caption}} class=<>> -<$wikify name="journalTitle" text="""<$macrocall $name="now" format=<>/>"""> -<$action-sendmessage $message="tm-new-tiddler" title=<> tags=<>/> -<$list filter="[match[yes]]"> +<$wikify name="journalTitle" text="""<$transclude $variable="now" format=<>/>"""> +<$action-sendmessage $message="tm-new-tiddler" title=<> tags=`[[$(currentTiddlerTag)$]] $(journalTags)$`/> +<%if [match[yes]] %> {{$:/core/images/new-journal-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/NewJournalHere/Caption}}/> - +<%endif%> \end -<$set name="journalTitleTemplate" value={{$:/config/NewJournal/Title}}> -<$set name="journalTags" value={{$:/config/NewJournal/Tags}}> -<$set name="currentTiddlerTag" value=<>> +<$let journalTitleTemplate={{$:/config/NewJournal/Title}} journalTags={{$:/config/NewJournal/Tags}} currentTiddlerTag=<>> <> - - - + diff --git a/core/ui/ViewToolbar/open-window.tid b/core/ui/ViewToolbar/open-window.tid index d8ef85c83..24e2efcca 100644 --- a/core/ui/ViewToolbar/open-window.tid +++ b/core/ui/ViewToolbar/open-window.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/OpenWindow/Hint}} \whitespace trim <$button message="tm-open-window" tooltip={{$:/language/Buttons/OpenWindow/Hint}} aria-label={{$:/language/Buttons/OpenWindow/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/open-window}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/OpenWindow/Caption}}/> - +<%endif%> \ No newline at end of file diff --git a/core/ui/ViewToolbar/permalink.tid b/core/ui/ViewToolbar/permalink.tid index 5d0677eed..4e9868b43 100644 --- a/core/ui/ViewToolbar/permalink.tid +++ b/core/ui/ViewToolbar/permalink.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/Permalink/Hint}} \whitespace trim <$button message="tm-permalink" tooltip={{$:/language/Buttons/Permalink/Hint}} aria-label={{$:/language/Buttons/Permalink/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/permalink-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Permalink/Caption}}/> - +<%endif%> \ No newline at end of file diff --git a/core/ui/ViewToolbar/permaview.tid b/core/ui/ViewToolbar/permaview.tid index 4a655b970..1ab129eed 100644 --- a/core/ui/ViewToolbar/permaview.tid +++ b/core/ui/ViewToolbar/permaview.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/Permaview/Hint}} \whitespace trim <$button message="tm-permaview" tooltip={{$:/language/Buttons/Permaview/Hint}} aria-label={{$:/language/Buttons/Permaview/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/permaview-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Permaview/Caption}}/> - +<%endif%> \ No newline at end of file diff --git a/core/wiki/allfields.tid b/core/wiki/allfields.tid index f148640d4..8f59a317f 100644 --- a/core/wiki/allfields.tid +++ b/core/wiki/allfields.tid @@ -1,13 +1,30 @@ title: $:/snippets/allfields -\define renderfield(title) -
''<$text text=<<__title__>>/>''://{{$:/language/Docs/Fields/$title$}}//