From b7f674c51a151e6bc687a1e0a23e58d28414e12a Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 3 Apr 2014 20:49:16 +0100 Subject: [PATCH 01/11] First pass at refactoring filter execution This is the beginning of addressing #523. --- core/modules/filters.js | 36 +++++++--- core/modules/filters/all.js | 45 +++++++++++++ core/modules/filters/all/current.js | 26 +++++++ core/modules/filters/all/missing.js | 22 ++++++ core/modules/filters/all/orphans.js | 22 ++++++ core/modules/filters/all/shadows.js | 26 +++++++ core/modules/filters/all/tiddlers.js | 26 +++++++ core/modules/filters/backlinks.js | 15 +---- core/modules/filters/each.js | 15 +---- core/modules/filters/eachday.js | 15 +---- core/modules/filters/field.js | 67 +++++++++++-------- core/modules/filters/fields.js | 20 +----- core/modules/filters/has.js | 24 ++----- core/modules/filters/indexes.js | 21 ++---- core/modules/filters/is/current.js | 33 +++------ core/modules/filters/is/image.js | 25 +++---- core/modules/filters/is/missing.js | 28 +++----- core/modules/filters/is/orphan.js | 19 ++---- core/modules/filters/is/shadow.js | 31 +++------ core/modules/filters/is/system.js | 25 +++---- core/modules/filters/is/tiddler.js | 25 +++---- core/modules/filters/limit.js | 18 ++--- core/modules/filters/links.js | 15 +---- core/modules/filters/list.js | 26 ++----- core/modules/filters/listed.js | 15 +---- core/modules/filters/listops.js | 60 +++++++++-------- core/modules/filters/modules.js | 20 ++---- core/modules/filters/next.js | 15 +---- core/modules/filters/plugintiddlers.js | 33 +++------ core/modules/filters/prefix.js | 25 +++---- core/modules/filters/previous.js | 19 ++---- core/modules/filters/removeprefix.js | 18 +---- core/modules/filters/sameday.js | 32 +++------ core/modules/filters/shadowsource.js | 24 ++----- core/modules/filters/sort.js | 13 ++-- core/modules/filters/tag.js | 27 ++------ core/modules/filters/tagging.js | 15 +---- core/modules/filters/tags.js | 16 +---- core/modules/filters/title.js | 29 ++------ core/modules/filters/untagged.js | 28 +++----- core/modules/startup.js | 2 +- core/modules/syncer.js | 7 +- core/modules/wiki.js | 46 +++++++------ core/ui/AdvancedSearch.tid | 2 +- core/ui/AdvancedSearch/Filter.tid | 2 +- core/ui/AdvancedSearch/Shadows.tid | 2 +- core/ui/ControlPanel.tid | 2 +- core/ui/ControlPanel/Advanced.tid | 2 +- core/ui/ControlPanel/Appearance.tid | 2 +- core/ui/ControlPanel/Basics.tid | 2 +- core/ui/EditTemplate.tid | 2 +- core/ui/EditTemplate/controls.tid | 2 +- core/ui/EditTemplate/fields.tid | 2 +- core/ui/EditTemplate/tags.tid | 2 +- core/ui/EditTemplate/type.tid | 2 +- core/ui/Filters/Missing.tid | 2 +- core/ui/Filters/Orphans.tid | 2 +- core/ui/Filters/OverriddenShadowTiddlers.tid | 2 +- core/ui/Filters/ShadowTiddlers.tid | 2 +- core/ui/Filters/SystemTags.tid | 2 +- core/ui/MissingTemplate.tid | 2 +- core/ui/MoreSideBar/Missing.tid | 2 +- core/ui/MoreSideBar/Orphans.tid | 2 +- core/ui/MoreSideBar/Shadows.tid | 2 +- core/ui/MoreSideBar/Tags.tid | 2 +- core/ui/PageStylesheet.tid | 2 +- core/ui/PageTemplate.tid | 2 +- core/ui/PageTemplate/alerts.tid | 2 +- core/ui/PageTemplate/sidebar.tid | 2 +- core/ui/PageTemplate/topleftbar.tid | 2 +- core/ui/PageTemplate/toprightbar.tid | 2 +- core/ui/SideBar/More.tid | 2 +- core/ui/SideBarLists.tid | 2 +- core/ui/TagEditTemplate.tid | 2 +- core/ui/TagManager.tid | 4 +- core/ui/TagTemplate.tid | 2 +- core/ui/TiddlerFields.tid | 2 +- core/ui/TiddlerInfo.tid | 2 +- core/ui/TiddlerInfo/Advanced.tid | 2 +- core/ui/TiddlerInfo/Advanced/PluginInfo.tid | 4 +- core/ui/TiddlerInfo/Advanced/ShadowInfo.tid | 8 +-- core/ui/TiddlerInfo/Listed.tid | 2 +- core/ui/TiddlerInfo/References.tid | 2 +- core/ui/TiddlerInfo/Tagging.tid | 2 +- core/ui/ViewTemplate.tid | 2 +- core/ui/ViewTemplate/classic.tid | 2 +- core/ui/ViewTemplate/tags.tid | 2 +- core/ui/ViewTemplate/title.tid | 6 +- core/wiki/modules.tid | 2 +- core/wiki/paletteeditor.tid | 6 +- core/wiki/paletteswitcher.tid | 2 +- editions/test/tiddlers/tests/test-filters.js | 14 ++-- .../tiddlers/concepts/ShadowTiddlers.tid | 2 +- .../tw5.com/tiddlers/concepts/SystemTags.tid | 2 +- .../tiddlers/widgets/ScrollableWidget.tid | 2 +- .../tiddlywiki/tiddlyweb/download-offline.tid | 2 +- 96 files changed, 536 insertions(+), 669 deletions(-) create mode 100644 core/modules/filters/all.js create mode 100644 core/modules/filters/all/current.js create mode 100644 core/modules/filters/all/missing.js create mode 100644 core/modules/filters/all/orphans.js create mode 100644 core/modules/filters/all/shadows.js create mode 100644 core/modules/filters/all/tiddlers.js diff --git a/core/modules/filters.js b/core/modules/filters.js index a3f5676bb..729307c8b 100644 --- a/core/modules/filters.js +++ b/core/modules/filters.js @@ -3,7 +3,7 @@ title: $:/core/modules/filters.js type: application/javascript module-type: wikimethod -Adds tiddler filtering to the $tw.Wiki object. +Adds tiddler filtering methods to the $tw.Wiki object. \*/ (function(){ @@ -149,11 +149,16 @@ exports.getFilterOperators = function() { return this.filterOperators; }; -exports.filterTiddlers = function(filterString,currTiddlerTitle,tiddlerList) { +exports.filterTiddlers = function(filterString,currTiddlerTitle,source) { var fn = this.compileFilter(filterString); - return fn.call(this,tiddlerList,currTiddlerTitle); + return fn.call(this,source,currTiddlerTitle); }; +/* +Compile a filter into a function with the signature fn(source,currTiddlerTitle) where: +source: an iterator function for the source tiddlers, called source(iterator), where iterator is called as iterator(tiddler,title) +currTiddlerTitle: the optional name of the current tiddler +*/ exports.compileFilter = function(filterString) { var filterParseTree; try { @@ -175,10 +180,15 @@ exports.compileFilter = function(filterString) { var accumulator = source, results = []; $tw.utils.each(operation.operators,function(operator) { - var operatorFunction = filterOperators[operator.operator] || filterOperators.field || function(source,operator,operations) { - return ["Filter Error: unknown operator '" + operator.operator + "'"]; - }, - operand = operator.operand; + var operand = operator.operand, + operatorFunction; + if(!operator.operator) { + operatorFunction = filterOperators.title; + } else if(!filterOperators[operator.operator]) { + operatorFunction = filterOperators.field; + } else { + operatorFunction = filterOperators[operator.operator]; + } if(operator.indirect) { operand = self.getTextReference(operator.operand,"",currTiddlerTitle); } @@ -192,7 +202,7 @@ exports.compileFilter = function(filterString) { wiki: self, currTiddlerTitle: currTiddlerTitle }); - accumulator = results; + accumulator = self.makeTiddlerIterator(results); }); return results; }; @@ -210,16 +220,20 @@ exports.compileFilter = function(filterString) { case "+": // This operation is applied to the main results so far return function(results,source,currTiddlerTitle) { // This replaces all the elements of the array, but keeps the actual array so that references to it are preserved - source = results.slice(0); + source = self.makeTiddlerIterator(results); results.splice(0,results.length); $tw.utils.pushTop(results,operationSubFunction(source,currTiddlerTitle)); }; } })()); }); - // Return a function that applies the operations to a source array/hashmap of tiddler titles + // Return a function that applies the operations to a source iterator of tiddler titles return $tw.perf.measure("filter",function filterFunction(source,currTiddlerTitle) { - source = source || self.getAllTitles(); + if(!source) { + source = self.each; + } else if(typeof source === "object") { // Array or hashmap + source = self.makeTiddlerIterator(source); + } var results = []; $tw.utils.each(operationFunctions,function(operationFunction) { operationFunction(results,source,currTiddlerTitle); diff --git a/core/modules/filters/all.js b/core/modules/filters/all.js new file mode 100644 index 000000000..f8601d057 --- /dev/null +++ b/core/modules/filters/all.js @@ -0,0 +1,45 @@ +/*\ +title: $:/core/modules/filters/all.js +type: application/javascript +module-type: filteroperator + +Filter operator for selecting tiddlers + +[all[tiddlers+shadows]] + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +var allFilterOperators; + +function getAllFilterOperators() { + if(!allFilterOperators) { + allFilterOperators = {}; + $tw.modules.applyMethods("allfilteroperator",allFilterOperators); + } + return allFilterOperators; +} + +/* +Export our filter function +*/ +exports.all = function(source,operator,options) { + // Get our suboperators + var allFilterOperators = getAllFilterOperators(); + // Cycle through the suboperators accumulating their results + var results = [], + subops = operator.operand.split("+"); + for(var t=0; t 0 && match < list.length) { results.push(list[match]); } - } - // Iterate through the source tiddlers - if($tw.utils.isArray(source)) { - $tw.utils.each(source,function(title) { - checkTiddler(title); - }); - } else { - $tw.utils.each(source,function(element,title) { - checkTiddler(title); - }); - } + }); return results; }; diff --git a/core/modules/filters/plugintiddlers.js b/core/modules/filters/plugintiddlers.js index 31db287b9..22219a930 100644 --- a/core/modules/filters/plugintiddlers.js +++ b/core/modules/filters/plugintiddlers.js @@ -16,30 +16,15 @@ Filter operator for returning the titles of the shadow tiddlers within a plugin Export our filter function */ exports.plugintiddlers = function(source,operator,options) { - var results = [], - pushShadows; - switch(operator.operand) { - default: - pushShadows = function(title) { - var pluginInfo = options.wiki.getPluginInfo(title); - if(pluginInfo) { - $tw.utils.each(pluginInfo.tiddlers,function(fields,title) { - results.push(title); - }); - } - }; - break; - } - // Iterate through the source tiddlers - if($tw.utils.isArray(source)) { - $tw.utils.each(source,function(title) { - pushShadows(title); - }); - } else { - $tw.utils.each(source,function(element,title) { - pushShadows(title); - }); - } + var results = []; + source(function(tiddler,title) { + var pluginInfo = options.wiki.getPluginInfo(title); + if(pluginInfo) { + $tw.utils.each(pluginInfo.tiddlers,function(fields,title) { + results.push(title); + }); + } + }); results.sort(); return results; }; diff --git a/core/modules/filters/prefix.js b/core/modules/filters/prefix.js index 13c5055c6..470dbfd1a 100644 --- a/core/modules/filters/prefix.js +++ b/core/modules/filters/prefix.js @@ -17,24 +17,17 @@ Export our filter function */ exports.prefix = function(source,operator,options) { var results = []; - // Function to check an individual title - function checkTiddler(title) { - var match = title.substr(0,operator.operand.length).toLowerCase() === operator.operand.toLowerCase(); - if(operator.prefix === "!") { - match = !match; - } - if(match) { - results.push(title); - } - } - // Iterate through the source tiddlers - if($tw.utils.isArray(source)) { - $tw.utils.each(source,function(title) { - checkTiddler(title); + if(operator.prefix === "!") { + source(function(tiddler,title) { + if(title.substr(0,operator.operand.length).toLowerCase() !== operator.operand.toLowerCase()) { + results.push(title); + } }); } else { - $tw.utils.each(source,function(element,title) { - checkTiddler(title); + source(function(tiddler,title) { + if(title.substr(0,operator.operand.length).toLowerCase() === operator.operand.toLowerCase()) { + results.push(title); + } }); } return results; diff --git a/core/modules/filters/previous.js b/core/modules/filters/previous.js index cc536b8af..ed975458c 100644 --- a/core/modules/filters/previous.js +++ b/core/modules/filters/previous.js @@ -18,25 +18,14 @@ Export our filter function exports.previous = function(source,operator,options) { var results = [], list = options.wiki.getTiddlerList(operator.operand); - - function checkTiddler(title) { + source(function(tiddler,title) { var match = list.indexOf(title); - // decrement match and then test if result is in range + // increment match and then test if result is in range match--; - if( match >= 0 ) { + if(match >= 0) { results.push(list[match]); } - } - // Iterate through the source tiddlers - if($tw.utils.isArray(source)) { - $tw.utils.each(source,function(title) { - checkTiddler(title); - }); - } else { - $tw.utils.each(source,function(element,title) { - checkTiddler(title); - }); - } + }); return results; }; diff --git a/core/modules/filters/removeprefix.js b/core/modules/filters/removeprefix.js index 3b62015f5..b7f5c5cf4 100644 --- a/core/modules/filters/removeprefix.js +++ b/core/modules/filters/removeprefix.js @@ -17,23 +17,11 @@ Export our filter function */ exports.removeprefix = function(source,operator,options) { var results = []; - // Function to check an individual title - function checkTiddler(title) { - var match = title.substr(0,operator.operand.length).toLowerCase() === operator.operand.toLowerCase(); - if(match) { + source(function(tiddler,title) { + if(title.substr(0,operator.operand.length).toLowerCase() === operator.operand.toLowerCase()) { results.push(title.substr(operator.operand.length)); } - } - // Iterate through the source tiddlers - if($tw.utils.isArray(source)) { - $tw.utils.each(source,function(title) { - checkTiddler(title); - }); - } else { - $tw.utils.each(source,function(element,title) { - checkTiddler(title); - }); - } + }); return results; }; diff --git a/core/modules/filters/sameday.js b/core/modules/filters/sameday.js index bdacf733c..1a4571b02 100644 --- a/core/modules/filters/sameday.js +++ b/core/modules/filters/sameday.js @@ -17,34 +17,18 @@ Export our filter function */ exports.sameday = function(source,operator,options) { var results = [], - isSameDay = function(dateField,dateString) { - var date1 = (new Date(dateField)).setHours(0,0,0,0), - date2 = (new Date($tw.utils.parseDate(dateString))).setHours(0,0,0,0); - return date1 === date2; + targetDate = (new Date($tw.utils.parseDate(operator.operand))).setHours(0,0,0,0); + // Function to convert a date/time to a date integer + var isSameDay = function(dateField) { + return (new Date(dateField)).setHours(0,0,0,0) === targetDate; }; - // Function to check an individual title - function checkTiddler(title) { - var tiddler = options.wiki.getTiddler(title); - if(tiddler) { - var match = isSameDay(tiddler.fields.modified,operator.operand); - if(operator.prefix === "!") { - match = !match; - } - if(match) { + source(function(tiddler,title) { + if(tiddler && tiddler.fields.modified) { + if(isSameDay(tiddler.fields.modified)) { results.push(title); } } - } - // Iterate through the source tiddlers - if($tw.utils.isArray(source)) { - $tw.utils.each(source,function(title) { - checkTiddler(title); - }); - } else { - $tw.utils.each(source,function(element,title) { - checkTiddler(title); - }); - } + }); return results; }; diff --git a/core/modules/filters/shadowsource.js b/core/modules/filters/shadowsource.js index d34a51b91..88ae4132e 100644 --- a/core/modules/filters/shadowsource.js +++ b/core/modules/filters/shadowsource.js @@ -16,23 +16,13 @@ Filter operator for returning the source plugins for shadow tiddlers Export our filter function */ exports.shadowsource = function(source,operator,options) { - var results = [], - pushShadowSource = function(title) { - var source = options.wiki.getShadowSource(title); - if(source) { - $tw.utils.pushTop(results,source); - } - }; - // Iterate through the source tiddlers - if($tw.utils.isArray(source)) { - $tw.utils.each(source,function(title) { - pushShadowSource(title); - }); - } else { - $tw.utils.each(source,function(element,title) { - pushShadowSource(title); - }); - } + var results = []; + source(function(tiddler,title) { + var source = options.wiki.getShadowSource(title); + if(source) { + $tw.utils.pushTop(results,source); + } + }); results.sort(); return results; }; diff --git a/core/modules/filters/sort.js b/core/modules/filters/sort.js index 26a240886..93503e0f9 100644 --- a/core/modules/filters/sort.js +++ b/core/modules/filters/sort.js @@ -40,15 +40,10 @@ exports.nsortcs = function(source,operator,options) { }; var prepare_results = function (source) { - var results; - if($tw.utils.isArray(source)) { - results = source; - } else { - results = []; - $tw.utils.each(source,function(element,title) { - results.push(title); - }); - } + var results = []; + source(function(tiddler,title) { + results.push(title); + }); return results; } diff --git a/core/modules/filters/tag.js b/core/modules/filters/tag.js index 7ae4f9191..408d7f98f 100644 --- a/core/modules/filters/tag.js +++ b/core/modules/filters/tag.js @@ -17,31 +17,18 @@ Export our filter function */ exports.tag = function(source,operator,options) { var results = []; - // Function to check an individual title - function checkTiddler(title) { - var tiddler = options.wiki.getTiddler(title); - if(tiddler) { - var match = tiddler.hasTag(operator.operand); - if(operator.prefix === "!") { - match = !match; - } - if(match) { + if(operator.prefix === "!") { + source(function(tiddler,title) { + if(tiddler && !tiddler.hasTag(operator.operand)) { results.push(title); } - } - } - // Iterate through the source tiddlers - if($tw.utils.isArray(source)) { - $tw.utils.each(source,function(title) { - checkTiddler(title); }); } else { - $tw.utils.each(source,function(element,title) { - checkTiddler(title); + source(function(tiddler,title) { + if(tiddler && tiddler.hasTag(operator.operand)) { + results.push(title); + } }); - } - // Sort the results if we are matching a tag - if(operator.prefix !== "!") { results = options.wiki.sortByList(results,operator.operand); } return results; diff --git a/core/modules/filters/tagging.js b/core/modules/filters/tagging.js index 237b05eb7..a7fea68ec 100644 --- a/core/modules/filters/tagging.js +++ b/core/modules/filters/tagging.js @@ -17,20 +17,9 @@ Export our filter function */ exports.tagging = function(source,operator,options) { var results = []; - // Function to check an individual title - function checkTiddler(title) { + source(function(tiddler,title) { $tw.utils.pushTop(results,options.wiki.getTiddlersWithTag(title)); - } - // Iterate through the source tiddlers - if($tw.utils.isArray(source)) { - $tw.utils.each(source,function(title) { - checkTiddler(title); - }); - } else { - $tw.utils.each(source,function(element,title) { - checkTiddler(title); - }); - } + }); return results; }; diff --git a/core/modules/filters/tags.js b/core/modules/filters/tags.js index 9b6513e48..1203aff60 100644 --- a/core/modules/filters/tags.js +++ b/core/modules/filters/tags.js @@ -17,23 +17,11 @@ Export our filter function */ exports.tags = function(source,operator,options) { var results = []; - // Function to check an individual title - function checkTiddler(title) { - var tiddler = options.wiki.getTiddler(title); + source(function(tiddler,title) { if(tiddler && tiddler.fields.tags) { $tw.utils.pushTop(results,tiddler.fields.tags); } - } - // Iterate through the source tiddlers - if($tw.utils.isArray(source)) { - $tw.utils.each(source,function(title) { - checkTiddler(title); - }); - } else { - $tw.utils.each(source,function(element,title) { - checkTiddler(title); - }); - } + }); return results; }; diff --git a/core/modules/filters/title.js b/core/modules/filters/title.js index 234859992..88ac6f132 100644 --- a/core/modules/filters/title.js +++ b/core/modules/filters/title.js @@ -17,35 +17,14 @@ Export our filter function */ exports.title = function(source,operator,options) { var results = []; - // Function to check an individual title - function checkTiddler(title) { - var tiddler = options.wiki.getTiddler(title); - if(tiddler) { - var match = tiddler.fields[operator.operator] === operator.operand; - if(operator.prefix === "!") { - match = !match; - } - if(match) { + if(operator.prefix === "!") { + source(function(tiddler,title) { + if(tiddler && tiddler.fields.title !== operator.operand) { results.push(title); } - } - } - // Iterate through the source tiddlers - if($tw.utils.isArray(source)) { - $tw.utils.each(source,function(title) { - checkTiddler(title); }); } else { - // If we're filtering a hashmap we change the behaviour to pass through missing tiddlers - if(operator.prefix !== "!") { - results.push(operator.operand); - } else { - $tw.utils.each(source,function(element,title) { - if(title !== operator.operand) { - checkTiddler(title); - } - }); - } + results.push(operator.operand); } return results; }; diff --git a/core/modules/filters/untagged.js b/core/modules/filters/untagged.js index d43de5bb8..31a1d1c4f 100644 --- a/core/modules/filters/untagged.js +++ b/core/modules/filters/untagged.js @@ -17,25 +17,19 @@ Export our filter function */ exports.untagged = function(source,operator,options) { var results = []; - // Function to check an individual title - function checkTiddler(title) { - var tiddler = options.wiki.getTiddler(title), - match = tiddler && $tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length > 0; - if(operator.prefix !== "!") { - match = !match; - } - if(match) { - $tw.utils.pushTop(results,title); - } - } - // Iterate through the source tiddlers - if($tw.utils.isArray(source)) { - $tw.utils.each(source,function(title) { - checkTiddler(title); + if(operator.prefix === "!") { + source(function(tiddler,title) { + if(tiddler && $tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length > 0) { + $tw.utils.pushTop(results,title); + } }); } else { - $tw.utils.each(source,function(element,title) { - checkTiddler(title); + source(function(tiddler,title) { + if(tiddler) { + if(!tiddler.hasField("tags") || ($tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length === 0)) { + $tw.utils.pushTop(results,title); + } + } }); } return results; diff --git a/core/modules/startup.js b/core/modules/startup.js index ee96047d5..bf4f1be2b 100755 --- a/core/modules/startup.js +++ b/core/modules/startup.js @@ -13,7 +13,7 @@ This is the main application logic for both the client and server "use strict"; // Set to `true` to enable performance instrumentation -var PERFORMANCE_INSTRUMENTATION = false; +var PERFORMANCE_INSTRUMENTATION = true; var widget = require("$:/core/modules/widgets/widget.js"); diff --git a/core/modules/syncer.js b/core/modules/syncer.js index 518198033..838c9092c 100644 --- a/core/modules/syncer.js +++ b/core/modules/syncer.js @@ -268,7 +268,12 @@ Synchronise a set of changes to the server Syncer.prototype.syncToServer = function(changes) { var self = this, now = new Date(), - filteredChanges = this.filterFn.call(this.wiki,changes); + filteredChanges = this.filterFn.call(this.wiki,function(callback) { + $tw.utils.each(changes,function(change,title) { + var tiddler = self.wiki.getTiddler(title); + callback(tiddler,title); + }); + }); $tw.utils.each(changes,function(change,title,object) { // Process the change if it is a deletion of a tiddler we're already syncing, or is on the filtered change list if((change.deleted && $tw.utils.hop(self.tiddlerInfo,title)) || filteredChanges.indexOf(title) !== -1) { diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 1ff98b30d..18b5ea385 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -274,6 +274,23 @@ exports.countTiddlers = function(excludeTag) { return $tw.utils.count(tiddlers); }; +/* +Returns a function iterator(callback) that iterates through the specified titles, and invokes the callback with callback(tiddler,title) +*/ +exports.makeTiddlerIterator = function(titles) { + var self = this; + if(!$tw.utils.isArray(titles)) { + titles = Object.keys(titles); + } else { + titles = titles.slice(0); + } + return function(callback) { + titles.forEach(function(title) { + callback(self.getTiddler(title),title); + }); + }; +}; + /* Sort an array of tiddler titles by a specified field titles: array of titles (sorted in place) @@ -877,7 +894,7 @@ Return an array of tiddler titles that match a search string text: The text string to search for options: see below Options available: - titles: Hashmap or array of tiddler titles to limit search + source: an iterator function for the source tiddlers, called source(iterator), where iterator is called as iterator(tiddler,title) exclude: An array of tiddler titles to exclude from the search invert: If true returns tiddlers that do not contain the specified string caseSensitive: If true forces a case sensitive search @@ -932,28 +949,13 @@ exports.search = function(text,options) { return true; }; // Loop through all the tiddlers doing the search - var results = []; - if($tw.utils.isArray(options.titles)) { - for(t=0; t -<> +<> diff --git a/core/ui/AdvancedSearch/Filter.tid b/core/ui/AdvancedSearch/Filter.tid index c9394a177..f294dfbee 100644 --- a/core/ui/AdvancedSearch/Filter.tid +++ b/core/ui/AdvancedSearch/Filter.tid @@ -12,7 +12,7 @@ caption: {{$:/language/Search/Filter/Caption}}
<$reveal state=<> type="nomatch" text="" default="">
-<$list filter="[is[shadow]tag[$:/tags/Filter]] [!is[shadow]tag[$:/tags/Filter]] +[sort[description]]"><$link to={{!!filter}}><$transclude field="description"/> +<$list filter="[all[tiddlers+shadows]tag[$:/tags/Filter]]"><$link to={{!!filter}}><$transclude field="description"/>
diff --git a/core/ui/AdvancedSearch/Shadows.tid b/core/ui/AdvancedSearch/Shadows.tid index 0f1eb97ef..86bdd7ced 100644 --- a/core/ui/AdvancedSearch/Shadows.tid +++ b/core/ui/AdvancedSearch/Shadows.tid @@ -17,7 +17,7 @@ caption: {{$:/language/Search/Shadows/Caption}} <> -<$list filter="[is[shadow]search{$:/temp/advancedsearch}sort[title]limit[250]]" template="$:/core/ui/ListItemTemplate"/> +<$list filter="[all[shadows]search{$:/temp/advancedsearch}sort[title]limit[250]]" template="$:/core/ui/ListItemTemplate"/>
diff --git a/core/ui/ControlPanel.tid b/core/ui/ControlPanel.tid index f6a4cecbd..f18744ce5 100644 --- a/core/ui/ControlPanel.tid +++ b/core/ui/ControlPanel.tid @@ -1,5 +1,5 @@ title: $:/ControlPanel
-<> +<>
diff --git a/core/ui/ControlPanel/Advanced.tid b/core/ui/ControlPanel/Advanced.tid index 987aa5c65..24448a35c 100644 --- a/core/ui/ControlPanel/Advanced.tid +++ b/core/ui/ControlPanel/Advanced.tid @@ -5,5 +5,5 @@ caption: {{$:/language/ControlPanel/Advanced/Caption}} {{$:/language/ControlPanel/Advanced/Hint}}
-<> +<>
diff --git a/core/ui/ControlPanel/Appearance.tid b/core/ui/ControlPanel/Appearance.tid index 519fc791c..6b9f898df 100644 --- a/core/ui/ControlPanel/Appearance.tid +++ b/core/ui/ControlPanel/Appearance.tid @@ -5,5 +5,5 @@ caption: {{$:/language/ControlPanel/Appearance/Caption}} {{$:/language/ControlPanel/Appearance/Hint}}
-<> +<>
diff --git a/core/ui/ControlPanel/Basics.tid b/core/ui/ControlPanel/Basics.tid index aaed7b190..ca9f45de8 100644 --- a/core/ui/ControlPanel/Basics.tid +++ b/core/ui/ControlPanel/Basics.tid @@ -13,5 +13,5 @@ caption: {{$:/language/ControlPanel/Basics/Caption}} |<> |''<$count filter="[!is[system]]"/>'' | |<> |''<$count filter="[tags[]]"/>'' | |<> |''<$count filter="[is[system]]"/>'' | -|<> |''<$count filter="[is[shadow]]"/>'' | +|<> |''<$count filter="[all[shadows]]"/>'' | |<> |''<$count filter="[is[tiddler]is[shadow]]"/>'' | diff --git a/core/ui/EditTemplate.tid b/core/ui/EditTemplate.tid index 31789fa3a..887cff4c4 100644 --- a/core/ui/EditTemplate.tid +++ b/core/ui/EditTemplate.tid @@ -6,7 +6,7 @@ tw-tiddler-frame tw-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerCl
>> <$set name="storyTiddler" value=<>> <$keyboard key="ctrl+enter" message="tw-save-tiddler"> -<$list filter="[is[shadow]!has[draft.of]tag[$:/tags/EditTemplate]] [!is[shadow]!has[draft.of]tag[$:/tags/EditTemplate]] +[tag[$:/tags/EditTemplate]]" variable="listItem"> +<$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/EditTemplate]]" variable="listItem"> <$transclude tiddler=<>/> diff --git a/core/ui/EditTemplate/controls.tid b/core/ui/EditTemplate/controls.tid index 90cf25e0c..927505e5c 100644 --- a/core/ui/EditTemplate/controls.tid +++ b/core/ui/EditTemplate/controls.tid @@ -1,4 +1,4 @@ title: $:/core/ui/EditTemplate/controls tags: $:/tags/EditTemplate - <$list filter="[is[shadow]!has[draft.of]tag[$:/tags/EditToolbar]] [!is[shadow]!has[draft.of]tag[$:/tags/EditToolbar]] +[tag[$:/tags/EditToolbar]]" variable="listItem"><$transclude tiddler=<>/> + <$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/EditToolbar]]" variable="listItem"><$transclude tiddler=<>/> diff --git a/core/ui/EditTemplate/fields.tid b/core/ui/EditTemplate/fields.tid index 07ffb339a..a3661c2d6 100644 --- a/core/ui/EditTemplate/fields.tid +++ b/core/ui/EditTemplate/fields.tid @@ -3,7 +3,7 @@ tags: $:/tags/EditTemplate \define lingo-base() $:/language/EditTemplate/ <$fieldmangler>
-<$list filter="[is[current]fields[]] -title -tags -text -creator -created -modified -modifier -type -[[draft.title]] -[[draft.of]]" variable="currentField"> +
<>:<$edit-text tiddler=<> field=<> placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}}/><$button message="tw-remove-field" param=<> class="btn-invisible">{{$:/core/images/delete-button}}
<$list filter="[all[current]fields[]] -title -tags -text -creator -created -modified -modifier -type -[[draft.title]] -[[draft.of]]" variable="currentField"> diff --git a/core/ui/EditTemplate/tags.tid b/core/ui/EditTemplate/tags.tid index f35efe057..365678cc3 100644 --- a/core/ui/EditTemplate/tags.tid +++ b/core/ui/EditTemplate/tags.tid @@ -7,7 +7,7 @@ background-color:$(backgroundColor)$; \end
<$fieldmangler> -<$list filter="[is[current]tags[]sort[title]]" storyview="pop" template="$:/core/ui/TagEditTemplate"/> +<$list filter="[all[current]tags[]sort[title]]" storyview="pop" template="$:/core/ui/TagEditTemplate"/>
diff --git a/core/ui/EditTemplate/type.tid b/core/ui/EditTemplate/type.tid index 697116469..c02768d17 100644 --- a/core/ui/EditTemplate/type.tid +++ b/core/ui/EditTemplate/type.tid @@ -8,7 +8,7 @@ tags: $:/tags/EditTemplate <$reveal state=<> type="nomatch" text="" default="">
<$linkcatcher to="!!type"> -<$list filter="[is[shadow]prefix[$:/language/Docs/Types/]] [!is[shadow]prefix[$:/language/Docs/Types/]] +[sort[description]]"><$link to={{!!name}}><$view field="description"/> (<$view field="name"/>) +<$list filter="[all[tiddlers+shadows]prefix[$:/language/Docs/Types/]] +[sort[description]]"><$link to={{!!name}}><$view field="description"/> (<$view field="name"/>)
diff --git a/core/ui/Filters/Missing.tid b/core/ui/Filters/Missing.tid index 9b0fecfac..040a04cb1 100644 --- a/core/ui/Filters/Missing.tid +++ b/core/ui/Filters/Missing.tid @@ -1,5 +1,5 @@ title: $:/core/Filters/Missing tags: $:/tags/Filter -filter: [is[missing]sort[title]] +filter: [all[missing]sort[title]] description: {{$:/language/Filters/Missing}} diff --git a/core/ui/Filters/Orphans.tid b/core/ui/Filters/Orphans.tid index 74a08fd8f..5ec4babeb 100644 --- a/core/ui/Filters/Orphans.tid +++ b/core/ui/Filters/Orphans.tid @@ -1,5 +1,5 @@ title: $:/core/Filters/Orphans tags: $:/tags/Filter -filter: [is[orphan]sort[title]] +filter: [all[orphans]sort[title]] description: {{$:/language/Filters/Orphans}} diff --git a/core/ui/Filters/OverriddenShadowTiddlers.tid b/core/ui/Filters/OverriddenShadowTiddlers.tid index d3da003f7..9a26d369c 100644 --- a/core/ui/Filters/OverriddenShadowTiddlers.tid +++ b/core/ui/Filters/OverriddenShadowTiddlers.tid @@ -1,5 +1,5 @@ title: $:/core/Filters/OverriddenShadowTiddlers tags: $:/tags/Filter -filter: [is[tiddler]is[shadow]] +filter: [is[shadow]] description: {{$:/language/Filters/OverriddenShadowTiddlers}} diff --git a/core/ui/Filters/ShadowTiddlers.tid b/core/ui/Filters/ShadowTiddlers.tid index dd86a8a0f..2403f2982 100644 --- a/core/ui/Filters/ShadowTiddlers.tid +++ b/core/ui/Filters/ShadowTiddlers.tid @@ -1,5 +1,5 @@ title: $:/core/Filters/ShadowTiddlers tags: $:/tags/Filter -filter: [is[shadow]sort[title]] +filter: [all[shadows]sort[title]] description: {{$:/language/Filters/ShadowTiddlers}} diff --git a/core/ui/Filters/SystemTags.tid b/core/ui/Filters/SystemTags.tid index 44b05039b..25ad3b3a2 100644 --- a/core/ui/Filters/SystemTags.tid +++ b/core/ui/Filters/SystemTags.tid @@ -1,5 +1,5 @@ title: $:/core/Filters/SystemTags tags: $:/tags/Filter -filter: [tags[]is[system]] [is[shadow]tags[]is[system]] +[sort[title]] +filter: [all[tiddlers+shadows]tags[]is[system]sort[title]] description: {{$:/language/Filters/SystemTags}} diff --git a/core/ui/MissingTemplate.tid b/core/ui/MissingTemplate.tid index 850aa7fe6..5e2d36bd7 100644 --- a/core/ui/MissingTemplate.tid +++ b/core/ui/MissingTemplate.tid @@ -8,7 +8,7 @@ title: $:/core/ui/MissingTemplate
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
-<$list filter="[is[current]backlinks[]sort[title]]" template="$:/core/ui/ListItemTemplate"/> +<$list filter="[all[current]backlinks[]sort[title]]" template="$:/core/ui/ListItemTemplate"/>
diff --git a/core/ui/MoreSideBar/Missing.tid b/core/ui/MoreSideBar/Missing.tid index ebed7d96a..b8382da6a 100644 --- a/core/ui/MoreSideBar/Missing.tid +++ b/core/ui/MoreSideBar/Missing.tid @@ -2,4 +2,4 @@ title: $:/core/ui/MoreSideBar/Missing tags: $:/tags/MoreSideBar caption: {{$:/language/SideBar/Missing/Caption}} -<$list filter="[is[missing]sort[title]]" template="$:/core/ui/MissingTemplate"/> +<$list filter="[all[missing]sort[title]]" template="$:/core/ui/MissingTemplate"/> diff --git a/core/ui/MoreSideBar/Orphans.tid b/core/ui/MoreSideBar/Orphans.tid index 56ffae4b6..9485e887f 100644 --- a/core/ui/MoreSideBar/Orphans.tid +++ b/core/ui/MoreSideBar/Orphans.tid @@ -2,4 +2,4 @@ title: $:/core/ui/MoreSideBar/Orphans tags: $:/tags/MoreSideBar caption: {{$:/language/SideBar/Orphans/Caption}} -<$list filter="[is[orphan]sort[title]]" template="$:/core/ui/ListItemTemplate"/> +<$list filter="[all[orphans]sort[title]]" template="$:/core/ui/ListItemTemplate"/> diff --git a/core/ui/MoreSideBar/Shadows.tid b/core/ui/MoreSideBar/Shadows.tid index 041d1091d..d7ca78493 100644 --- a/core/ui/MoreSideBar/Shadows.tid +++ b/core/ui/MoreSideBar/Shadows.tid @@ -2,4 +2,4 @@ title: $:/core/ui/MoreSideBar/Shadows tags: $:/tags/MoreSideBar caption: {{$:/language/SideBar/Shadows/Caption}} -<$list filter="[is[shadow]sort[title]]" template="$:/core/ui/ListItemTemplate"/> +<$list filter="[all[shadows]sort[title]]" template="$:/core/ui/ListItemTemplate"/> diff --git a/core/ui/MoreSideBar/Tags.tid b/core/ui/MoreSideBar/Tags.tid index e0aaafea8..db1eb0d74 100644 --- a/core/ui/MoreSideBar/Tags.tid +++ b/core/ui/MoreSideBar/Tags.tid @@ -7,7 +7,7 @@ caption: {{$:/language/SideBar/Tags/Caption}} <$list filter="[tags[]!is[system]sort[title]]"> -<$transclude tiddler="$:/core/ui/TagTemplate"/> <$count filter="[is[current]tagging[]]"/> +<$transclude tiddler="$:/core/ui/TagTemplate"/> <$count filter="[all[current]tagging[]]"/> diff --git a/core/ui/PageStylesheet.tid b/core/ui/PageStylesheet.tid index 1742e71e0..3825778e7 100644 --- a/core/ui/PageStylesheet.tid +++ b/core/ui/PageStylesheet.tid @@ -47,6 +47,6 @@ background-image: -ms-linear-gradient($gradient$); <$macrocall $name="makedatauri" type={{$title$!!type}} text={{$title$}}/> \end -<$list filter="[is[shadow]tag[$:/tags/stylesheet]] [!is[shadow]tag[$:/tags/stylesheet]]"> +<$list filter="[all[tiddlers+shadows]tag[$:/tags/stylesheet]]"> <$transclude/> diff --git a/core/ui/PageTemplate.tid b/core/ui/PageTemplate.tid index 82dd7d1e2..febb56866 100644 --- a/core/ui/PageTemplate.tid +++ b/core/ui/PageTemplate.tid @@ -4,7 +4,7 @@ title: $:/core/ui/PageTemplate <$dropzone> -<$list filter="[is[shadow]!has[draft.of]tag[$:/tags/PageTemplate]] [!is[shadow]!has[draft.of]tag[$:/tags/PageTemplate]] +[tag[$:/tags/PageTemplate]]" variable="listItem"> +<$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/PageTemplate]]" variable="listItem"> <$transclude tiddler=<>/> diff --git a/core/ui/PageTemplate/alerts.tid b/core/ui/PageTemplate/alerts.tid index 006871282..3fe0a497f 100644 --- a/core/ui/PageTemplate/alerts.tid +++ b/core/ui/PageTemplate/alerts.tid @@ -3,6 +3,6 @@ tags: $:/tags/PageTemplate
-<$list filter="[is[shadow]!has[draft.of]tag[$:/tags/Alert]] [!is[shadow]!has[draft.of]tag[$:/tags/Alert]] +[sort[modified]]" template="$:/core/ui/AlertTemplate" storyview="pop"/> +<$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/Alert]]" template="$:/core/ui/AlertTemplate" storyview="pop"/>
diff --git a/core/ui/PageTemplate/sidebar.tid b/core/ui/PageTemplate/sidebar.tid index 7a01a3abe..d559f3204 100644 --- a/core/ui/PageTemplate/sidebar.tid +++ b/core/ui/PageTemplate/sidebar.tid @@ -12,7 +12,7 @@ tags: $:/tags/PageTemplate
-<$list filter="[is[shadow]!has[draft.of]tag[$:/tags/PageControls]] [!is[shadow]!has[draft.of]tag[$:/tags/PageControls]] +[tag[$:/tags/PageControls]]" variable="listItem"><$transclude tiddler=<>/> +<$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/PageControls]]" variable="listItem"><$transclude tiddler=<>/>
diff --git a/core/ui/PageTemplate/topleftbar.tid b/core/ui/PageTemplate/topleftbar.tid index 4ad37e974..7b6ac0fa9 100644 --- a/core/ui/PageTemplate/topleftbar.tid +++ b/core/ui/PageTemplate/topleftbar.tid @@ -2,5 +2,5 @@ title: $:/core/ui/PageTemplate/topleftbar tags: $:/tags/PageTemplate -<$list filter="[is[shadow]!has[draft.of]tag[$:/tags/TopLeftBar]] [!is[shadow]!has[draft.of]tag[$:/tags/TopLeftBar]] +[tag[$:/tags/TopLeftBar]]" variable="listItem"><$transclude tiddler=<>/> +<$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/TopLeftBar]]" variable="listItem"><$transclude tiddler=<>/> diff --git a/core/ui/PageTemplate/toprightbar.tid b/core/ui/PageTemplate/toprightbar.tid index a1dc77564..306c6a64c 100644 --- a/core/ui/PageTemplate/toprightbar.tid +++ b/core/ui/PageTemplate/toprightbar.tid @@ -2,5 +2,5 @@ title: $:/core/ui/PageTemplate/toprightbar tags: $:/tags/PageTemplate -<$list filter="[is[shadow]!has[draft.of]tag[$:/tags/TopRightBar]] [!is[shadow]!has[draft.of]tag[$:/tags/TopRightBar]] +[tag[$:/tags/TopRightBar]]" variable="listItem"><$transclude tiddler=<>/> +<$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/TopRightBar]]" variable="listItem"><$transclude tiddler=<>/> diff --git a/core/ui/SideBar/More.tid b/core/ui/SideBar/More.tid index d66b6129d..951f03f63 100644 --- a/core/ui/SideBar/More.tid +++ b/core/ui/SideBar/More.tid @@ -3,5 +3,5 @@ tags: $:/tags/SideBar caption: {{$:/language/SideBar/More/Caption}}
-<> +<>
diff --git a/core/ui/SideBarLists.tid b/core/ui/SideBarLists.tid index 747d66799..5e901a86e 100644 --- a/core/ui/SideBarLists.tid +++ b/core/ui/SideBarLists.tid @@ -26,7 +26,7 @@ title: $:/core/ui/SideBarLists <$reveal state="$:/temp/search" type="match" text=""> -<> +<>
diff --git a/core/ui/TagEditTemplate.tid b/core/ui/TagEditTemplate.tid index 73a834903..81335a65b 100644 --- a/core/ui/TagEditTemplate.tid +++ b/core/ui/TagEditTemplate.tid @@ -11,6 +11,6 @@ background-color:$(backgroundColor)$; <$reveal state=<> type="popup" position="below" animate="yes">
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
-<$list filter="[is[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/> +<$list filter="[all[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/>
\ No newline at end of file diff --git a/core/ui/TagManager.tid b/core/ui/TagManager.tid index ce4102fc3..504380130 100644 --- a/core/ui/TagManager.tid +++ b/core/ui/TagManager.tid @@ -7,7 +7,7 @@ title: $:/TagManager <$reveal state=<> type="nomatch" text="" default=""> <$linkcatcher to="$title$!!icon">
-<$list filter="[is[shadow]is[image]] [!is[shadow]is[image]] [is[shadow]tag[$:/tags/Image]] [!is[shadow]tag[$:/tags/Image]] +[sort[title]]"> +<$list filter="[all[tiddlers+shadows]is[image]] [all[tiddlers+shadows]tag[$:/tags/Image]] +[sort[title]]"> <$link to={{!!title}}> <$view field="title"/> @@ -28,7 +28,7 @@ title: $:/TagManager <$list filter="[tags[]!is[system]sort[title]]">
- + diff --git a/core/ui/TagTemplate.tid b/core/ui/TagTemplate.tid index 8aa2436b1..0767a5d69 100644 --- a/core/ui/TagTemplate.tid +++ b/core/ui/TagTemplate.tid @@ -11,7 +11,7 @@ background-color:$(backgroundColor)$; <$reveal state=<> type="popup" position="below" animate="yes">
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
-<$list filter="[is[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/> +<$list filter="[all[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/>
diff --git a/core/ui/TiddlerFields.tid b/core/ui/TiddlerFields.tid index f73d028be..4419e1f91 100644 --- a/core/ui/TiddlerFields.tid +++ b/core/ui/TiddlerFields.tid @@ -2,6 +2,6 @@ title: $:/core/ui/TiddlerFields
<>:<$edit-text tiddler=<> field=<> placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}}/><$button message="tw-remove-field" param=<> class="btn-invisible">{{$:/core/images/delete-button}}
<$transclude tiddler="$:/core/ui/TagTemplate"/><$count filter="[is[current]tagging[]]"/><$count filter="[all[current]tagging[]]"/> <$edit-text field="color" tag="input" type="color"/> <$macrocall $name="iconEditor" title={{!!title}}/>
-<$list filter="[is[current]fields[]sort[title]] -text" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/> +<$list filter="[all[current]fields[]sort[title]] -text" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/>
diff --git a/core/ui/TiddlerInfo.tid b/core/ui/TiddlerInfo.tid index 1a3da0183..cc0992554 100644 --- a/core/ui/TiddlerInfo.tid +++ b/core/ui/TiddlerInfo.tid @@ -1,3 +1,3 @@ title: $:/core/ui/TiddlerInfo -<> +<> diff --git a/core/ui/TiddlerInfo/Advanced.tid b/core/ui/TiddlerInfo/Advanced.tid index 50955086c..25f6a34cd 100644 --- a/core/ui/TiddlerInfo/Advanced.tid +++ b/core/ui/TiddlerInfo/Advanced.tid @@ -2,7 +2,7 @@ title: $:/core/ui/TiddlerInfo/Advanced tags: $:/tags/TiddlerInfo caption: {{$:/language/TiddlerInfo/Advanced/Caption}} -<$list filter="[is[shadow]!has[draft.of]tag[$:/tags/TiddlerInfo/Advanced]] [!is[shadow]!has[draft.of]tag[$:/tags/TiddlerInfo/Advanced]] +[tag[$:/tags/TiddlerInfo/Advanced]]" variable="listItem"> +<$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/TiddlerInfo/Advanced]]" variable="listItem"> <$transclude tiddler=<>/> diff --git a/core/ui/TiddlerInfo/Advanced/PluginInfo.tid b/core/ui/TiddlerInfo/Advanced/PluginInfo.tid index 1bc68066a..9d487c19f 100644 --- a/core/ui/TiddlerInfo/Advanced/PluginInfo.tid +++ b/core/ui/TiddlerInfo/Advanced/PluginInfo.tid @@ -2,13 +2,13 @@ title: $:/core/ui/TiddlerInfo/Advanced/PluginInfo tags: $:/tags/TiddlerInfo/Advanced \define lingo-base() $:/language/TiddlerInfo/Advanced/PluginInfo/ -<$list filter="[is[current]has[plugin-type]]"> +<$list filter="[all[current]has[plugin-type]]"> ! <> <>
    -<$list filter="[is[current]plugintiddlers[]sort[title]]" emptyMessage=<>> +<$list filter="[all[current]plugintiddlers[]sort[title]]" emptyMessage=<>>
  • <$link to={{!!title}}> <$view field="title"/> diff --git a/core/ui/TiddlerInfo/Advanced/ShadowInfo.tid b/core/ui/TiddlerInfo/Advanced/ShadowInfo.tid index f084769a7..8d2874d4b 100644 --- a/core/ui/TiddlerInfo/Advanced/ShadowInfo.tid +++ b/core/ui/TiddlerInfo/Advanced/ShadowInfo.tid @@ -6,17 +6,17 @@ tags: $:/tags/TiddlerInfo/Advanced ! <> -<$list filter="[is[current]!is[shadow]]"> +<$list filter="[all[current]!is[shadow]]"> <> -<$list filter="[is[current]is[shadow]]"> +<$list filter="[all[current]is[shadow]]"> <> -<$list filter="[is[current]shadowsource[]]"> +<$list filter="[all[current]shadowsource[]]"> <$set name="pluginTiddler" value=<>> <> @@ -24,7 +24,7 @@ tags: $:/tags/TiddlerInfo/Advanced -<$list filter="[is[current]is[shadow]is[tiddler]]"> +<$list filter="[all[current]is[shadow]is[tiddler]]"> <> diff --git a/core/ui/TiddlerInfo/Listed.tid b/core/ui/TiddlerInfo/Listed.tid index dda59abf5..c47ca8698 100644 --- a/core/ui/TiddlerInfo/Listed.tid +++ b/core/ui/TiddlerInfo/Listed.tid @@ -3,4 +3,4 @@ tags: $:/tags/TiddlerInfo caption: {{$:/language/TiddlerInfo/Listed/Caption}} \define lingo-base() $:/language/TiddlerInfo/ -<$list filter="[is[current]listed[]!is[system]]" emptyMessage=<> template="$:/core/ui/ListItemTemplate"/> +<$list filter="[all[current]listed[]!is[system]]" emptyMessage=<> template="$:/core/ui/ListItemTemplate"/> diff --git a/core/ui/TiddlerInfo/References.tid b/core/ui/TiddlerInfo/References.tid index a19c95064..8838c290b 100644 --- a/core/ui/TiddlerInfo/References.tid +++ b/core/ui/TiddlerInfo/References.tid @@ -3,5 +3,5 @@ tags: $:/tags/TiddlerInfo caption: {{$:/language/TiddlerInfo/References/Caption}} \define lingo-base() $:/language/TiddlerInfo/ -<$list filter="[is[current]backlinks[]sort[title]]" emptyMessage=<> template="$:/core/ui/ListItemTemplate"> +<$list filter="[all[current]backlinks[]sort[title]]" emptyMessage=<> template="$:/core/ui/ListItemTemplate"> diff --git a/core/ui/TiddlerInfo/Tagging.tid b/core/ui/TiddlerInfo/Tagging.tid index 6d17019aa..04f514479 100644 --- a/core/ui/TiddlerInfo/Tagging.tid +++ b/core/ui/TiddlerInfo/Tagging.tid @@ -3,4 +3,4 @@ tags: $:/tags/TiddlerInfo caption: {{$:/language/TiddlerInfo/Tagging/Caption}} \define lingo-base() $:/language/TiddlerInfo/ -<$list filter="[is[current]tagging[]]" emptyMessage=<> template="$:/core/ui/ListItemTemplate"/> +<$list filter="[all[current]tagging[]]" emptyMessage=<> template="$:/core/ui/ListItemTemplate"/> diff --git a/core/ui/ViewTemplate.tid b/core/ui/ViewTemplate.tid index 3dab44e39..10066b900 100644 --- a/core/ui/ViewTemplate.tid +++ b/core/ui/ViewTemplate.tid @@ -3,6 +3,6 @@ title: $:/core/ui/ViewTemplate \define frame-classes() tw-tiddler-frame tw-tiddler-view-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ \end -<$set name="storyTiddler" value=<>><$set name="tiddlerInfoState" value=<>><$tiddler tiddler=<>>
    >><$list filter="[is[shadow]!has[draft.of]tag[$:/tags/ViewTemplate]] [!is[shadow]!has[draft.of]tag[$:/tags/ViewTemplate]] +[tag[$:/tags/ViewTemplate]]" variable="listItem"><$transclude tiddler=<>/> +<$set name="storyTiddler" value=<>><$set name="tiddlerInfoState" value=<>><$tiddler tiddler=<>>
    >><$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/ViewTemplate]]" variable="listItem"><$transclude tiddler=<>/>
    diff --git a/core/ui/ViewTemplate/classic.tid b/core/ui/ViewTemplate/classic.tid index 036312d2b..8e0c69f0c 100644 --- a/core/ui/ViewTemplate/classic.tid +++ b/core/ui/ViewTemplate/classic.tid @@ -2,7 +2,7 @@ title: $:/core/ui/ViewTemplate/classic tags: $:/tags/ViewTemplate $:/tags/EditTemplate \define lingo-base() $:/language/ClassicWarning/ -<$list filter="[is[current]type[text/x-tiddlywiki]]"> +<$list filter="[all[current]type[text/x-tiddlywiki]]">
    <> diff --git a/core/ui/ViewTemplate/tags.tid b/core/ui/ViewTemplate/tags.tid index 8f2d1519c..9f3adbb56 100644 --- a/core/ui/ViewTemplate/tags.tid +++ b/core/ui/ViewTemplate/tags.tid @@ -1,4 +1,4 @@ title: $:/core/ui/ViewTemplate/tags tags: $:/tags/ViewTemplate -
    <$list filter="[is[current]tags[]sort[title]]" template="$:/core/ui/TagTemplate" storyview="pop"/>
    +
    <$list filter="[all[current]tags[]sort[title]]" template="$:/core/ui/TagTemplate" storyview="pop"/>
    diff --git a/core/ui/ViewTemplate/title.tid b/core/ui/ViewTemplate/title.tid index 815df492b..b7f861e2e 100644 --- a/core/ui/ViewTemplate/title.tid +++ b/core/ui/ViewTemplate/title.tid @@ -7,19 +7,19 @@ fill:$(foregroundColor)$;
    -<$list filter="[is[shadow]!has[draft.of]tag[$:/tags/ViewToolbar]] [!is[shadow]!has[draft.of]tag[$:/tags/ViewToolbar]] +[tag[$:/tags/ViewToolbar]]" variable="listItem"><$transclude tiddler=<>/> +<$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/ViewToolbar]]" variable="listItem"><$transclude tiddler=<>/> <$set name="foregroundColor" value={{!!color}}> >> <$transclude tiddler={{!!icon}}/> -<$list filter="[is[current]removeprefix[$:/]]"> +<$list filter="[all[current]removeprefix[$:/]]"> $:/<$text text=<>/> -<$list filter="[is[current]!prefix[$:/]]"> +<$list filter="[all[current]!prefix[$:/]]"> <$view field="title"/> diff --git a/core/wiki/modules.tid b/core/wiki/modules.tid index 708e78d4e..fac2ef7d6 100644 --- a/core/wiki/modules.tid +++ b/core/wiki/modules.tid @@ -9,7 +9,7 @@ title: $:/snippets/modules <$macrocall $name="describeModuleType" type=<>/> -
      <$list filter="[is[current]modules[]]">
    • <$link><> +
        <$list filter="[all[current]modules[]]">
      • <$link><>
      diff --git a/core/wiki/paletteeditor.tid b/core/wiki/paletteeditor.tid index c8b571527..609194832 100644 --- a/core/wiki/paletteeditor.tid +++ b/core/wiki/paletteeditor.tid @@ -8,12 +8,12 @@ title: $:/snippets/paletteeditor <> <$link to={{$:/palette}}><$macrocall $name="currentTiddler" $output="text/plain"/> -<$list filter="[is[current]is[shadow]is[tiddler]]" variable="listItem"> +<$list filter="[all[current]is[shadow]is[tiddler]]" variable="listItem"> <> <$button message="tw-delete-tiddler" param={{$:/palette}}><> -<$list filter="[is[current]is[shadow]!is[tiddler]]" variable="listItem"> +<$list filter="[all[current]is[shadow]!is[tiddler]]" variable="listItem"> <> @@ -21,7 +21,7 @@ title: $:/snippets/paletteeditor -<$list filter="[is[current]indexes[]]" variable="colourName"> +<$list filter="[all[current]indexes[]]" variable="colourName">
      ''<$macrocall $name="describePaletteColour" colour=<>/>''
      diff --git a/core/wiki/paletteswitcher.tid b/core/wiki/paletteswitcher.tid index 1f56ec57e..792fac738 100644 --- a/core/wiki/paletteswitcher.tid +++ b/core/wiki/paletteswitcher.tid @@ -4,7 +4,7 @@ title: $:/snippets/paletteswitcher <> <$view tiddler={{$:/palette}} field="name"/> <$linkcatcher to="$:/palette"> -
      <$list filter="[is[shadow]tag[$:/tags/Palette]] [!is[shadow]tag[$:/tags/Palette]] +[sort[description]]">
      <$link to={{!!title}}>
      <$reveal state="$:/palette" type="match" text={{!!title}}>•<$reveal state="$:/palette" type="nomatch" text={{!!title}}>  ''<$view field="name" format="text"/>'' - <$view field="description" format="text"/>
      <$transclude tiddler="$:/snippets/currpalettepreview"/>
      +
      <$list filter="[all[tiddlers+shadows]tag[$:/tags/Palette]sort[description]]">
      <$link to={{!!title}}>
      <$reveal state="$:/palette" type="match" text={{!!title}}>•<$reveal state="$:/palette" type="nomatch" text={{!!title}}>  ''<$view field="name" format="text"/>'' - <$view field="description" format="text"/>
      <$transclude tiddler="$:/snippets/currpalettepreview"/>
      \ No newline at end of file diff --git a/editions/test/tiddlers/tests/test-filters.js b/editions/test/tiddlers/tests/test-filters.js index c59a21a4e..8a3915661 100644 --- a/editions/test/tiddlers/tests/test-filters.js +++ b/editions/test/tiddlers/tests/test-filters.js @@ -144,7 +144,7 @@ describe("Filter tests", function() { expect(wiki.filterTiddlers("[!tag[one]sort[title]]").join(",")).toBe("$:/TiddlerTwo,a fourth tiddler,one"); expect(wiki.filterTiddlers("[prefix[Tidd]tag[one]sort[title]]").join(",")).toBe("Tiddler Three,TiddlerOne"); expect(wiki.filterTiddlers("[!is[shadow]tag[two]sort[title]]").join(",")).toBe("$:/TiddlerTwo,Tiddler Three"); - expect(wiki.filterTiddlers("[is[shadow]tag[two]sort[title]]").join(",")).toBe("$:/TiddlerFive"); + expect(wiki.filterTiddlers("[all[shadows]tag[two]sort[title]]").join(",")).toBe("$:/TiddlerFive"); }); it("should handle the tags operator", function() { @@ -156,7 +156,7 @@ describe("Filter tests", function() { expect(wiki.filterTiddlers("[[one]tagging[]sort[title]]").join(",")).toBe("Tiddler Three,TiddlerOne"); expect(wiki.filterTiddlers("[[one]tagging[]]").join(",")).toBe("Tiddler Three,TiddlerOne"); expect(wiki.filterTiddlers("[[two]tagging[]sort[title]]").join(",")).toBe("$:/TiddlerFive,$:/TiddlerTwo,Tiddler Three"); - expect(wiki.filterTiddlers("[is[current]tagging[]sort[title]]","one").join(",")).toBe("Tiddler Three,TiddlerOne"); + expect(wiki.filterTiddlers("[all[current]tagging[]sort[title]]","one").join(",")).toBe("Tiddler Three,TiddlerOne"); }); it("should handle the untagged operator", function() { @@ -166,12 +166,12 @@ describe("Filter tests", function() { it("should handle the links operator", function() { expect(wiki.filterTiddlers("[!is[shadow]links[]sort[title]]").join(",")).toBe("a fourth tiddler,one,Tiddler Three,TiddlerSix,TiddlerTwo,TiddlerZero"); - expect(wiki.filterTiddlers("[is[shadow]links[]sort[title]]").join(",")).toBe("TiddlerOne"); + expect(wiki.filterTiddlers("[all[shadows]links[]sort[title]]").join(",")).toBe("TiddlerOne"); }); it("should handle the backlinks operator", function() { expect(wiki.filterTiddlers("[!is[shadow]backlinks[]sort[title]]").join(",")).toBe("a fourth tiddler,one"); - expect(wiki.filterTiddlers("[is[shadow]backlinks[]sort[title]]").join(",")).toBe("Tiddler Three"); + expect(wiki.filterTiddlers("[all[shadows]backlinks[]sort[title]]").join(",")).toBe("Tiddler Three"); }); it("should handle the has operator", function() { @@ -187,7 +187,7 @@ describe("Filter tests", function() { it("should handle the list operator", function() { expect(wiki.filterTiddlers("[list[TiddlerSeventh]sort[title]]").join(",")).toBe("a fourth tiddler,MissingTiddler,Tiddler Three,TiddlerOne"); - expect(wiki.filterTiddlers("[tag[one]list[TiddlerSeventh]sort[title]]").join(",")).toBe("Tiddler Three,TiddlerOne"); + expect(wiki.filterTiddlers("[tag[one]list[TiddlerSeventh]sort[title]]").join(",")).toBe("a fourth tiddler,MissingTiddler,Tiddler Three,TiddlerOne"); }); it("should handle the next operator", function() { @@ -232,12 +232,12 @@ describe("Filter tests", function() { }); it("should handle the '[is[shadow]]' operator", function() { - expect(wiki.filterTiddlers("[is[shadow]sort[title]]").join(",")).toBe("$:/TiddlerFive,Tiddler8,TiddlerSeventh,TiddlerSix"); + expect(wiki.filterTiddlers("[all[shadows]sort[title]]").join(",")).toBe("$:/TiddlerFive,Tiddler8,TiddlerSeventh,TiddlerSix"); expect(wiki.filterTiddlers("[!is[shadow]sort[title]]").join(",")).toBe("$:/TiddlerTwo,a fourth tiddler,one,Tiddler Three,TiddlerOne"); }); it("should handle the '[is[missing]]' operator", function() { - expect(wiki.filterTiddlers("[is[missing]]").join(",")).toBe("TiddlerZero,TiddlerTwo"); + expect(wiki.filterTiddlers("[all[missing]]").join(",")).toBe("TiddlerZero,TiddlerTwo"); expect(wiki.filterTiddlers("[!is[missing]sort[title]]").join(",")).toBe("$:/TiddlerTwo,a fourth tiddler,one,Tiddler Three,TiddlerOne"); expect(wiki.filterTiddlers("[[TiddlerOne]is[missing]]").join(",")).toBe(""); expect(wiki.filterTiddlers("[[TiddlerZero]is[missing]]").join(",")).toBe("TiddlerZero"); diff --git a/editions/tw5.com/tiddlers/concepts/ShadowTiddlers.tid b/editions/tw5.com/tiddlers/concepts/ShadowTiddlers.tid index 94c22a7fd..a67d99cec 100644 --- a/editions/tw5.com/tiddlers/concepts/ShadowTiddlers.tid +++ b/editions/tw5.com/tiddlers/concepts/ShadowTiddlers.tid @@ -8,4 +8,4 @@ ShadowTiddlers can be overridden with an ordinary tiddler of the same name. If t The current shadow tiddlers are: -<$list filter="[is[shadow]sort[title]]"/> +<$list filter="[all[shadows]sort[title]]"/> diff --git a/editions/tw5.com/tiddlers/concepts/SystemTags.tid b/editions/tw5.com/tiddlers/concepts/SystemTags.tid index 45eb83bc1..72085dea9 100644 --- a/editions/tw5.com/tiddlers/concepts/SystemTags.tid +++ b/editions/tw5.com/tiddlers/concepts/SystemTags.tid @@ -22,4 +22,4 @@ System tags are used to give special behaviour to tiddlers: These are the system tags in use in this wiki: -{{{ [is[shadow]tags[]prefix[$:/]] [!is[shadow]tags[]prefix[$:/]] +[sort[title]] }}} +{{{ [all[tiddlers+shadows]tags[]prefix[$:/]] +[sort[title]] }}} diff --git a/editions/tw5.com/tiddlers/widgets/ScrollableWidget.tid b/editions/tw5.com/tiddlers/widgets/ScrollableWidget.tid index eeaa107d0..e9ebeebe1 100644 --- a/editions/tw5.com/tiddlers/widgets/ScrollableWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/ScrollableWidget.tid @@ -36,7 +36,7 @@ This wiki text shows how to display a list within the scrollable widget: < <$list filter='[!is[system]]'> -<$view field='title'/>: <$list filter='[is[current]links[]sort[title]]' storyview='pop'> +<$view field='title'/>: <$list filter='[all[current]links[]sort[title]]' storyview='pop'> <$link><$view field='title'/> diff --git a/plugins/tiddlywiki/tiddlyweb/download-offline.tid b/plugins/tiddlywiki/tiddlyweb/download-offline.tid index 5ff2e848e..377a4130c 100644 --- a/plugins/tiddlywiki/tiddlyweb/download-offline.tid +++ b/plugins/tiddlywiki/tiddlyweb/download-offline.tid @@ -1,6 +1,6 @@ title: $:/editions/clientserver/download-offline \define saveTiddlerFilter() -[is[tiddler]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/tiddlywiki/tiddlyweb]] +[sort[title]] +[all[tiddlers+shadows]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/tiddlywiki/tiddlyweb]] +[sort[title]] \end {{$:/core/templates/tiddlywiki5.html}} From 272a4bbe61146d3e6d9cb0cb2d9ffb0caac38296 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sat, 5 Apr 2014 17:31:36 +0100 Subject: [PATCH 02/11] Filtering optimisations --- boot/boot.js | 25 ++++++++++++------------- core/modules/filters/all/shadows.js | 6 +----- core/modules/filters/all/tiddlers.js | 6 +----- core/modules/utils/utils.js | 27 ++++++++++++++++++++------- 4 files changed, 34 insertions(+), 30 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index e4a814d8f..0be9aa274 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -73,13 +73,11 @@ Iterate through all the own properties of an object or array. Callback is invoke $tw.utils.each = function(object,callback) { var f; if(object) { - if($tw.utils.isArray(object)) { - for(f=0; f=0; t--) { + p = value.indexOf(array[t]); + if(p !== -1) { + array.splice(t,1); + } + } + } } + // Push the values on top of the main array + array.push.apply(array,value); } - // Push the values on top of the main array - array.push.apply(array,value); } else { p = array.indexOf(value); if(p !== -1) { From 4d91a7762e444f3e9fa9ec599503b804ab04a4f5 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sat, 5 Apr 2014 17:37:58 +0100 Subject: [PATCH 03/11] Optimise link widget Handle the classes better, and stop using a default tooltip (parsing the tooltip was a performance hog) --- core/modules/widgets/link.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/modules/widgets/link.js b/core/modules/widgets/link.js index e2a9be6bb..3885ea08f 100755 --- a/core/modules/widgets/link.js +++ b/core/modules/widgets/link.js @@ -56,17 +56,18 @@ LinkWidget.prototype.renderLink = function(parent,nextSibling) { // Create our element var domNode = this.document.createElement("a"); // Assign classes - $tw.utils.addClass(domNode,"tw-tiddlylink"); + var classes = ["tw-tiddlylink"]; if(this.isShadow) { - $tw.utils.addClass(domNode,"tw-tiddlylink-shadow"); + classes.push("tw-tiddlylink-shadow"); } if(this.isMissing && !this.isShadow) { - $tw.utils.addClass(domNode,"tw-tiddlylink-missing"); + classes.push("tw-tiddlylink-missing"); } else { if(!this.isMissing) { - $tw.utils.addClass(domNode,"tw-tiddlylink-resolves"); + classes.push("tw-tiddlylink-resolves"); } } + domNode.setAttribute("class",classes.join(" ")); // Set an href var wikiLinkTemplateMacro = this.getVariable("tw-wikilink-template"), wikiLinkTemplate = wikiLinkTemplateMacro ? wikiLinkTemplateMacro.trim() : "#$uri_encoded$", @@ -74,7 +75,8 @@ LinkWidget.prototype.renderLink = function(parent,nextSibling) { wikiLinkText = wikiLinkText.replace("$uri_doubleencoded$",encodeURIComponent(encodeURIComponent(this.to))); domNode.setAttribute("href",wikiLinkText); // Set the tooltip - var tooltipWikiText = this.tooltip || this.getVariable("tw-wikilink-tooltip",{defaultValue: "<$transclude field='tooltip'><$transclude field='title'/>"}); + // HACK: Performance issues with re-parsing the tooltip prevent us defaulting the tooltip to "<$transclude field='tooltip'><$transclude field='title'/>" + var tooltipWikiText = this.tooltip || this.getVariable("tw-wikilink-tooltip"); if(tooltipWikiText) { var tooltipText = this.wiki.renderText("text/plain","text/vnd.tiddlywiki",tooltipWikiText,{ parseAsInline: true, From c7b4febae34042fd863d0e81c392c1dd487212bd Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sun, 6 Apr 2014 11:50:16 +0100 Subject: [PATCH 04/11] Optimise ordering of filter expressions We get a significant speed improvement of >10% by rearranging filter operators to bring to the front the operators likely to reduce the size working list. --- core/ui/AdvancedSearch.tid | 2 +- core/ui/ControlPanel.tid | 2 +- core/ui/ControlPanel/Advanced.tid | 2 +- core/ui/ControlPanel/Appearance.tid | 2 +- core/ui/EditTemplate.tid | 2 +- core/ui/EditTemplate/controls.tid | 2 +- core/ui/PageTemplate.tid | 2 +- core/ui/PageTemplate/alerts.tid | 2 +- core/ui/PageTemplate/sidebar.tid | 2 +- core/ui/PageTemplate/topleftbar.tid | 2 +- core/ui/PageTemplate/toprightbar.tid | 2 +- core/ui/SideBar/More.tid | 2 +- core/ui/SideBarLists.tid | 2 +- core/ui/TiddlerInfo.tid | 2 +- core/ui/TiddlerInfo/Advanced.tid | 2 +- core/ui/ViewTemplate.tid | 2 +- core/ui/ViewTemplate/title.tid | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/core/ui/AdvancedSearch.tid b/core/ui/AdvancedSearch.tid index bb112a0f6..b85a58fb8 100644 --- a/core/ui/AdvancedSearch.tid +++ b/core/ui/AdvancedSearch.tid @@ -1,5 +1,5 @@ title: $:/AdvancedSearch diff --git a/core/ui/ControlPanel.tid b/core/ui/ControlPanel.tid index f18744ce5..e91ec2444 100644 --- a/core/ui/ControlPanel.tid +++ b/core/ui/ControlPanel.tid @@ -1,5 +1,5 @@ title: $:/ControlPanel
      -<> +<>
      diff --git a/core/ui/ControlPanel/Advanced.tid b/core/ui/ControlPanel/Advanced.tid index 24448a35c..e73a62894 100644 --- a/core/ui/ControlPanel/Advanced.tid +++ b/core/ui/ControlPanel/Advanced.tid @@ -5,5 +5,5 @@ caption: {{$:/language/ControlPanel/Advanced/Caption}} {{$:/language/ControlPanel/Advanced/Hint}}
      -<> +<>
      diff --git a/core/ui/ControlPanel/Appearance.tid b/core/ui/ControlPanel/Appearance.tid index 6b9f898df..d52d75360 100644 --- a/core/ui/ControlPanel/Appearance.tid +++ b/core/ui/ControlPanel/Appearance.tid @@ -5,5 +5,5 @@ caption: {{$:/language/ControlPanel/Appearance/Caption}} {{$:/language/ControlPanel/Appearance/Hint}}
      -<> +<>
      diff --git a/core/ui/EditTemplate.tid b/core/ui/EditTemplate.tid index 887cff4c4..b2ca9703f 100644 --- a/core/ui/EditTemplate.tid +++ b/core/ui/EditTemplate.tid @@ -6,7 +6,7 @@ tw-tiddler-frame tw-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerCl
      >> <$set name="storyTiddler" value=<>> <$keyboard key="ctrl+enter" message="tw-save-tiddler"> -<$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/EditTemplate]]" variable="listItem"> +<$list filter="[all[tiddlers+shadows]tag[$:/tags/EditTemplate]!has[draft.of]]" variable="listItem"> <$transclude tiddler=<>/> diff --git a/core/ui/EditTemplate/controls.tid b/core/ui/EditTemplate/controls.tid index 927505e5c..82d5eaa5c 100644 --- a/core/ui/EditTemplate/controls.tid +++ b/core/ui/EditTemplate/controls.tid @@ -1,4 +1,4 @@ title: $:/core/ui/EditTemplate/controls tags: $:/tags/EditTemplate - <$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/EditToolbar]]" variable="listItem"><$transclude tiddler=<>/> + <$list filter="[all[tiddlers+shadows]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<>/> diff --git a/core/ui/PageTemplate.tid b/core/ui/PageTemplate.tid index febb56866..ad5833cdd 100644 --- a/core/ui/PageTemplate.tid +++ b/core/ui/PageTemplate.tid @@ -4,7 +4,7 @@ title: $:/core/ui/PageTemplate <$dropzone> -<$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/PageTemplate]]" variable="listItem"> +<$list filter="[all[tiddlers+shadows]tag[$:/tags/PageTemplate]!has[draft.of]]" variable="listItem"> <$transclude tiddler=<>/> diff --git a/core/ui/PageTemplate/alerts.tid b/core/ui/PageTemplate/alerts.tid index 3fe0a497f..e8bed8ecf 100644 --- a/core/ui/PageTemplate/alerts.tid +++ b/core/ui/PageTemplate/alerts.tid @@ -3,6 +3,6 @@ tags: $:/tags/PageTemplate
      -<$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/Alert]]" template="$:/core/ui/AlertTemplate" storyview="pop"/> +<$list filter="[all[tiddlers+shadows]tag[$:/tags/Alert]!has[draft.of]]" template="$:/core/ui/AlertTemplate" storyview="pop"/>
      diff --git a/core/ui/PageTemplate/sidebar.tid b/core/ui/PageTemplate/sidebar.tid index d559f3204..67f74e67f 100644 --- a/core/ui/PageTemplate/sidebar.tid +++ b/core/ui/PageTemplate/sidebar.tid @@ -12,7 +12,7 @@ tags: $:/tags/PageTemplate
      -<$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/PageControls]]" variable="listItem"><$transclude tiddler=<>/> +<$list filter="[all[tiddlers+shadows]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem"><$transclude tiddler=<>/>
      diff --git a/core/ui/PageTemplate/topleftbar.tid b/core/ui/PageTemplate/topleftbar.tid index 7b6ac0fa9..ee5cf7d8a 100644 --- a/core/ui/PageTemplate/topleftbar.tid +++ b/core/ui/PageTemplate/topleftbar.tid @@ -2,5 +2,5 @@ title: $:/core/ui/PageTemplate/topleftbar tags: $:/tags/PageTemplate -<$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/TopLeftBar]]" variable="listItem"><$transclude tiddler=<>/> +<$list filter="[all[tiddlers+shadows]tag[$:/tags/TopLeftBar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<>/> diff --git a/core/ui/PageTemplate/toprightbar.tid b/core/ui/PageTemplate/toprightbar.tid index 306c6a64c..ebe35c9d2 100644 --- a/core/ui/PageTemplate/toprightbar.tid +++ b/core/ui/PageTemplate/toprightbar.tid @@ -2,5 +2,5 @@ title: $:/core/ui/PageTemplate/toprightbar tags: $:/tags/PageTemplate -<$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/TopRightBar]]" variable="listItem"><$transclude tiddler=<>/> +<$list filter="[all[tiddlers+shadows]tag[$:/tags/TopRightBar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<>/> diff --git a/core/ui/SideBar/More.tid b/core/ui/SideBar/More.tid index 951f03f63..e46088578 100644 --- a/core/ui/SideBar/More.tid +++ b/core/ui/SideBar/More.tid @@ -3,5 +3,5 @@ tags: $:/tags/SideBar caption: {{$:/language/SideBar/More/Caption}}
      -<> +<>
      diff --git a/core/ui/SideBarLists.tid b/core/ui/SideBarLists.tid index 5e901a86e..327b572ea 100644 --- a/core/ui/SideBarLists.tid +++ b/core/ui/SideBarLists.tid @@ -26,7 +26,7 @@ title: $:/core/ui/SideBarLists <$reveal state="$:/temp/search" type="match" text=""> -<> +<>
      diff --git a/core/ui/TiddlerInfo.tid b/core/ui/TiddlerInfo.tid index cc0992554..bd80da6c5 100644 --- a/core/ui/TiddlerInfo.tid +++ b/core/ui/TiddlerInfo.tid @@ -1,3 +1,3 @@ title: $:/core/ui/TiddlerInfo -<> +<> diff --git a/core/ui/TiddlerInfo/Advanced.tid b/core/ui/TiddlerInfo/Advanced.tid index 25f6a34cd..d2428e2b7 100644 --- a/core/ui/TiddlerInfo/Advanced.tid +++ b/core/ui/TiddlerInfo/Advanced.tid @@ -2,7 +2,7 @@ title: $:/core/ui/TiddlerInfo/Advanced tags: $:/tags/TiddlerInfo caption: {{$:/language/TiddlerInfo/Advanced/Caption}} -<$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/TiddlerInfo/Advanced]]" variable="listItem"> +<$list filter="[all[tiddlers+shadows]tag[$:/tags/TiddlerInfo/Advanced]!has[draft.of]]" variable="listItem"> <$transclude tiddler=<>/> diff --git a/core/ui/ViewTemplate.tid b/core/ui/ViewTemplate.tid index 10066b900..73c99d69d 100644 --- a/core/ui/ViewTemplate.tid +++ b/core/ui/ViewTemplate.tid @@ -3,6 +3,6 @@ title: $:/core/ui/ViewTemplate \define frame-classes() tw-tiddler-frame tw-tiddler-view-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ \end -<$set name="storyTiddler" value=<>><$set name="tiddlerInfoState" value=<>><$tiddler tiddler=<>>
      >><$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/ViewTemplate]]" variable="listItem"><$transclude tiddler=<>/> +<$set name="storyTiddler" value=<>><$set name="tiddlerInfoState" value=<>><$tiddler tiddler=<>>
      >><$list filter="[all[tiddlers+shadows]tag[$:/tags/ViewTemplate]!has[draft.of]]" variable="listItem"><$transclude tiddler=<>/>
      diff --git a/core/ui/ViewTemplate/title.tid b/core/ui/ViewTemplate/title.tid index b7f861e2e..b5edeab27 100644 --- a/core/ui/ViewTemplate/title.tid +++ b/core/ui/ViewTemplate/title.tid @@ -7,7 +7,7 @@ fill:$(foregroundColor)$;
      -<$list filter="[all[tiddlers+shadows]!has[draft.of]tag[$:/tags/ViewToolbar]]" variable="listItem"><$transclude tiddler=<>/> +<$list filter="[all[tiddlers+shadows]tag[$:/tags/ViewToolbar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<>/> <$set name="foregroundColor" value={{!!color}}> >> From 8a7d0f53d380e9ca93ee34d8ad05090d511e95c4 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sun, 6 Apr 2014 22:36:51 +0100 Subject: [PATCH 05/11] Add a sourceURL to the end of eval'd code This, miraculously, lets Chrome dev tools list tiddler modules in the script tag by their proper titles. Which lets you set breakpoints within them!!!!! https://chromedevtools.googlecode.com/svn-history/r421/trunk/tutorials/b reapoints/index.html#regular --- boot/boot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/boot.js b/boot/boot.js index 0be9aa274..3754ebf3d 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -397,7 +397,7 @@ $tw.utils.evalGlobal = function(code,context,filename) { // Compile the code into a function var fn; if($tw.browser) { - fn = window["eval"](code); + fn = window["eval"](code + "\n\n//# sourceURL=" + filename); } else { fn = vm.runInThisContext(code,filename); } From 1e960ffcac566c742c44b18d6f0e809d4457b249 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sun, 6 Apr 2014 22:43:10 +0100 Subject: [PATCH 06/11] Fix problems with tiddlers called `__proto__` Background: http://www.2ality.com/2012/01/objects-as-maps.html --- boot/boot.js | 6 +++--- core/modules/wiki.js | 34 +++++++++++++++++----------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index 3754ebf3d..09d92f134 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -803,10 +803,10 @@ shadowTiddlers: Array of shadow tiddlers to be added $tw.Wiki = function(options) { options = options || {}; var self = this, - tiddlers = {}, // Hashmap of tiddlers + tiddlers = Object.create(null), // Hashmap of tiddlers pluginTiddlers = [], // Array of tiddlers containing registered plugins, ordered by priority - pluginInfo = {}, // Hashmap of parsed plugin content - shadowTiddlers = options.shadowTiddlers || {}; // Hashmap by title of {source:, tiddler:} + pluginInfo = Object.create(null), // Hashmap of parsed plugin content + shadowTiddlers = options.shadowTiddlers || Object.create(null); // Hashmap by title of {source:, tiddler:} // Add a tiddler to the store this.addTiddler = function(tiddler) { diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 18b5ea385..4eed2d69c 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -57,7 +57,7 @@ exports.setTextReference = function(textRef,value,currTiddlerTitle) { title = tr.title || currTiddlerTitle; // Check if it is a reference to a tiddler field if(tr.index) { - var data = this.getTiddlerData(title,{}); + var data = this.getTiddlerData(title,Object.create(null)); data[tr.index] = value; this.setTiddlerData(title,data,this.getModificationFields()); } else { @@ -79,7 +79,7 @@ exports.deleteTextReference = function(textRef,currTiddlerTitle) { title = tr.title || currTiddlerTitle; tiddler = this.getTiddler(title); if(tiddler && $tw.utils.hop(tiddler.fields,tr.field)) { - fields = {}; + fields = Object.create(null); fields[tr.field] = undefined; this.addTiddler(new $tw.Tiddler(tiddler,fields,this.getModificationFields())); } @@ -122,11 +122,11 @@ This method should be called after the changes it describes have been made to th */ exports.enqueueTiddlerEvent = function(title,isDeleted) { // Record the touch in the list of changed tiddlers - this.changedTiddlers = this.changedTiddlers || {}; - this.changedTiddlers[title] = this.changedTiddlers[title] || {}; + this.changedTiddlers = this.changedTiddlers || Object.create(null); + this.changedTiddlers[title] = this.changedTiddlers[title] || Object.create(null); this.changedTiddlers[title][isDeleted ? "deleted" : "modified"] = true; // Increment the change count - this.changeCount = this.changeCount || {}; + this.changeCount = this.changeCount || Object.create(null); if($tw.utils.hop(this.changeCount,title)) { this.changeCount[title]++; } else { @@ -138,7 +138,7 @@ exports.enqueueTiddlerEvent = function(title,isDeleted) { var self = this; $tw.utils.nextTick(function() { var changes = self.changedTiddlers; - self.changedTiddlers = {}; + self.changedTiddlers = Object.create(null); self.eventsTriggered = false; self.dispatchEvent("change",changes); }); @@ -147,7 +147,7 @@ exports.enqueueTiddlerEvent = function(title,isDeleted) { }; exports.getChangeCount = function(title) { - this.changeCount = this.changeCount || {}; + this.changeCount = this.changeCount || Object.create(null); if($tw.utils.hop(this.changeCount,title)) { return this.changeCount[title]; } else { @@ -223,7 +223,7 @@ exports.getCreationFields = function() { Return a hashmap of the fields that should be set when a tiddler is modified */ exports.getModificationFields = function() { - var fields = {}, + var fields = Object.create(null), modifier = this.getTiddlerText(USER_NAME_TITLE); fields.modified = new Date(); if(modifier) { @@ -239,7 +239,7 @@ excludeTag: tag to exclude includeSystem: whether to include system tiddlers (defaults to false) */ exports.getTiddlers = function(options) { - options = options || {}; + options = options || Object.create(null); var self = this, sortField = options.sortField || "title", tiddlers = [], t, titles = []; @@ -448,7 +448,7 @@ Get a hashmap by tag of arrays of tiddler titles exports.getTagMap = function() { var self = this; return this.getGlobalCache("tagmap",function() { - var tags = {}, + var tags = Object.create(null), storeTags = function(tagArray,title) { if(tagArray) { for(var index=0; index Date: Sun, 6 Apr 2014 22:49:20 +0100 Subject: [PATCH 07/11] Fix problem with fields called "__proto__" --- boot/boot.js | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index 09d92f134..e1be3cbab 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -32,8 +32,8 @@ if(!$tw) { $tw = require("./bootprefix.js").bootprefix(); } -$tw.utils = $tw.utils || {}; -$tw.boot = $tw.boot || {}; +$tw.utils = $tw.utils || Object.create(null); +$tw.boot = $tw.boot || Object.create(null); /////////////////////////// Standard node.js libraries @@ -280,7 +280,7 @@ $tw.utils.parseStringArray = function(value) { // Parse a block of name:value fields. The `fields` object is used as the basis for the return value $tw.utils.parseFields = function(text,fields) { - fields = fields || {}; + fields = fields || Object.create(null); text.split(/\r?\n/mg).forEach(function(line) { if(line.charAt(0) !== "#") { var p = line.indexOf(":"); @@ -385,7 +385,7 @@ $tw.utils.registerFileType = function(type,encoding,extension,flags) { Run code globally with specified context variables in scope */ $tw.utils.evalGlobal = function(code,context,filename) { - var contextCopy = $tw.utils.extend({},context); + var contextCopy = $tw.utils.extend(Object.create(null),context); // Get the context variables as a pair of arrays of names and values var contextNames = [], contextValues = []; $tw.utils.each(contextCopy,function(value,name) { @@ -409,7 +409,7 @@ $tw.utils.evalGlobal = function(code,context,filename) { Run code in a sandbox with only the specified context variables in scope */ $tw.utils.evalSandboxed = $tw.browser ? $tw.utils.evalGlobal : function(code,context,filename) { - var sandbox = $tw.utils.extend({},context); + var sandbox = $tw.utils.extend(Object.create(null),context); vm.runInNewContext(code,sandbox,filename); return sandbox.exports; }; @@ -682,7 +682,7 @@ Get all the modules of a particular type in a hashmap by their `name` field */ $tw.modules.getModulesByTypeAsHashmap = function(moduleType,nameField) { nameField = nameField || "name"; - var results = {}; + var results = Object.create(null); $tw.modules.forEachModuleOfType(moduleType,function(title,module) { results[module[nameField]] = module; }); @@ -694,7 +694,7 @@ Apply the exports of the modules of a particular type to a target object */ $tw.modules.applyMethods = function(moduleType,targetObject) { if(!targetObject) { - targetObject = {}; + targetObject = Object.create(null); } $tw.modules.forEachModuleOfType(moduleType,function(title,module) { $tw.utils.each(module,function(element,title,object) { @@ -708,7 +708,7 @@ $tw.modules.applyMethods = function(moduleType,targetObject) { Return an array of classes created from the modules of a specified type. Each module should export the properties to be added to those of the optional base class */ $tw.modules.createClassesFromModules = function(moduleType,subType,baseClass) { - var classes = {}; + var classes = Object.create(null); $tw.modules.forEachModuleOfType(moduleType,function(title,moduleExports) { if(!subType || moduleExports.types[subType]) { var newClass = function() {}; @@ -730,7 +730,7 @@ Construct a tiddler object from a hashmap of tiddler fields. If multiple hasmaps taking precedence to the right */ $tw.Tiddler = function(/* [fields,] fields */) { - this.fields = {}; + this.fields = Object.create(null); for(var c=0; c Date: Sun, 6 Apr 2014 22:49:59 +0100 Subject: [PATCH 08/11] Ensure fieldnames are not wikified `__proto__` was being wikified into underlined text --- core/ui/EditTemplate/fields.tid | 28 +++++++++++++++++++++++++--- core/ui/TiddlerFieldTemplate.tid | 2 +- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/core/ui/EditTemplate/fields.tid b/core/ui/EditTemplate/fields.tid index a3661c2d6..b537389ba 100644 --- a/core/ui/EditTemplate/fields.tid +++ b/core/ui/EditTemplate/fields.tid @@ -2,14 +2,36 @@ title: $:/core/ui/EditTemplate/fields tags: $:/tags/EditTemplate \define lingo-base() $:/language/EditTemplate/ -<$fieldmangler>
      -<$list filter="[all[current]fields[]] -title -tags -text -creator -created -modified -modifier -type -[[draft.title]] -[[draft.of]]" variable="currentField"> +<$fieldmangler> +
      +
      <>:<$edit-text tiddler=<> field=<> placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}}/><$button message="tw-remove-field" param=<> class="btn-invisible">{{$:/core/images/delete-button}}
      + +<$list filter="[all[current]fields[]] -title -tags -text -creator -created -modified -modifier -type -[[draft.title]] -[[draft.of]]" variable="currentField"> + + + +
      +<$text text=<>/>: +<$edit-text tiddler=<> field=<> placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}}/> + +<$button message="tw-remove-field" param=<> class="btn-invisible">{{$:/core/images/delete-button}} +
      -
      <> <$edit-text tiddler="$:/temp/NewFieldName" tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Name/Placeholder}} class="tw-edit-texteditor"/> <$button message="tw-add-field" param={{$:/temp/NewFieldName}} set="$:/temp/NewFieldName" setTo="" class=""><>
      +
      + +<> + +<$edit-text tiddler="$:/temp/NewFieldName" tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Name/Placeholder}} class="tw-edit-texteditor"/> + +<$button message="tw-add-field" param={{$:/temp/NewFieldName}} set="$:/temp/NewFieldName" setTo="" class=""> +<> + + +
      diff --git a/core/ui/TiddlerFieldTemplate.tid b/core/ui/TiddlerFieldTemplate.tid index 0a990810a..048c9b8fb 100644 --- a/core/ui/TiddlerFieldTemplate.tid +++ b/core/ui/TiddlerFieldTemplate.tid @@ -2,7 +2,7 @@ title: $:/core/ui/TiddlerFieldTemplate
      -<> +<$text text=<>/> <$view field=<>/> From 3282bd948f6baa148b7a91085fec95a186200bbf Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 8 Apr 2014 09:36:30 +0100 Subject: [PATCH 09/11] Fix problem with search filter operator --- core/modules/filters/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/filters/search.js b/core/modules/filters/search.js index 698e17246..a0826f44a 100644 --- a/core/modules/filters/search.js +++ b/core/modules/filters/search.js @@ -18,7 +18,7 @@ Export our filter function exports.search = function(source,operator,options) { var invert = operator.prefix === "!"; return options.wiki.search(operator.operand,{ - titles: source, + source: source, invert: invert }); }; From 6d43b4e8dc83299056a94f13076ded8f7c8d6704 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 8 Apr 2014 14:12:27 +0100 Subject: [PATCH 10/11] Update link widget docs --- .../tw5.com/tiddlers/widgets/LinkWidget.tid | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/editions/tw5.com/tiddlers/widgets/LinkWidget.tid b/editions/tw5.com/tiddlers/widgets/LinkWidget.tid index 9e96dc352..efc71052c 100644 --- a/editions/tw5.com/tiddlers/widgets/LinkWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/LinkWidget.tid @@ -11,11 +11,7 @@ The `link` widget generates links to tiddlers. The content of the link widget is rendered within the `` tag. -The default value of the tooltip attribute is `<>`. If that variable is not defined then the following text is used: - -``` -<$transclude field="tooltip"><$transclude field="title"/> -``` +The default value of the tooltip attribute is `<>`. This means that you can control the text of a link tooltip in several ways: @@ -38,6 +34,17 @@ Renders as: Note that the tooltip is rendered with the current tiddler set to the target of the link. +A useful convention is to set the tooltip like this: + +``` +\define tw-wikilink-tooltip() +<$transclude field="tooltip"><$transclude field="title"/> +\end +``` + +This causes the tooltip to be the ''tooltip'' field of the target tiddler. If the field isn't present, then the title is used instead. + + ! CSS Classes * `tw-tiddlylink` - applied to all links From dc5831a8a8c70ff5f068b6ec638ad286b7e56a8e Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 8 Apr 2014 14:12:35 +0100 Subject: [PATCH 11/11] First pass at a release note for 5.0.9 --- .../tw5.com/tiddlers/Release 5.0.9beta.tid | 48 +++++++++++++++++-- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/editions/tw5.com/tiddlers/Release 5.0.9beta.tid b/editions/tw5.com/tiddlers/Release 5.0.9beta.tid index c59d323b0..bc0055350 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.9beta.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.9beta.tid @@ -6,13 +6,33 @@ type: text/vnd.tiddlywiki //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.8-beta...v5.0.9-beta]]// +!! Highlights + +* Improved layout, including a ''hamburger'' icon for dismissing the sidebar +* New ''Filter'' tab in [[$:/AdvancedSearch]] +* Initial implementation of CecilyView +* Overhaul of inconsistencies in TiddlerFilters (see [[Changes to filters in 5.0.9-beta]]) +* + !! Documentation Improvements -* +* Demo of [[Making curved text with SVG]] +* [[Community]] links are now broken up into individual tiddlers +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/a19432541e776bfb63b1b985a60f472e9f1d4352]] overview diagram of [[TiddlyWiki Architecture]] +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/7b57561160173667031b5bc15a4f7553d8514c1c]] documentation from buggyj: [[Developing plugins using Node.js and GitHub]] !! Usability Improvements -* +* Made the dropdown arrow icon [[skinnier|https://github.com/Jermolene/TiddlyWiki5/commit/ec90ac99cf2767b6ff20902d8b01aa1c36778147]] +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/bca1d552803c1839e7385765314f81c5307632b8]] validation of legal characters for fieldnames +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/45a362c2859ed401a0af5ca3bbbc976710bf4acf]] a dropdown for tags in edit mode +* Added blacklisting of unsage HTML [[elements|https://github.com/Jermolene/TiddlyWiki5/commit/ba6edd42c125cb19d955a1cb3f54a2d367cb79dc]] and [[attributes|https://github.com/Jermolene/TiddlyWiki5/commit/ba6edd42c125cb19d955a1cb3f54a2d367cb79dc]] +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/baa8cf3dd098bab0a7a8c78b24747c69bd40889f]] a warning indicator to tiddlers in TiddlyWikiClassic format +* [[Add|https://github.com/Jermolene/TiddlyWiki5/commit/42c67cfeb732fccb10b8ab574c84090dc2471352]] tiddler info ''Advanced'' panel with information about plugins and shadow tiddlers +* [[Improved|https://github.com/Jermolene/TiddlyWiki5/commit/96457d801159958b897f98e22aa9af53b97f0e35]] layout of [[$:/ControlPanel]] ''Plugins'' tab +* [[Enhance|https://github.com/Jermolene/TiddlyWiki5/commit/f48701544eda4f79af86b1ad44340e7182bcf024]] viewing of system tiddlers by fading down the `$:/` prefix +* [[Extend|https://github.com/Jermolene/TiddlyWiki5/commit/dd3ee2a603cba35770a8f109e070f271d72861f8]] [[$:/TagManager]] to allow icons to be assigned to tags +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/87c4839fed789b80e0942014c05175e36aacc157]] support for `list-before` and `list-after` fields for controlling tag ordering (see TiddlerTags for details) !! Scalability Improvements @@ -20,8 +40,28 @@ type: text/vnd.tiddlywiki !! Hackability Improvements -* +* [[Updated|https://github.com/Jermolene/TiddlyWiki5/commit/bdbbf94326f70db0f8ef196270ab9e92bfde10fb]] [[Transclusion in WikiText]] syntax to allow translusion of a template without affecting the current tiddler +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/8a7d0f53d380e9ca93ee34d8ad05090d511e95c4]] `sourceURL` handling to `eval()` so that tiddler modules can be [[properly debugged|https://chromedevtools.googlecode.com/svn-history/r421/trunk/tutorials/b +reapoints/index.html#regular]] in Chrome +* New ScrollableWidget giving better control over scrollable regions +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/d3c0296a87198296cff26aa7ce7bb8274cdcc3f7]] new CSS class `tw-site-title` for the site title +* [[Disable|https://github.com/Jermolene/TiddlyWiki5/commit/e397e4d15951c1395c7752a7563f002ca459206e]] the TiddlyWeb sync adaptor unless the wiki is loaded over HTTP +* Added a [[high resolution timer mechanism|https://github.com/Jermolene/TiddlyWiki5/commit/dcce4879347e4829d75f10248477731b18b829ef]] and a [[performance measurement mechanism|https://github.com/Jermolene/TiddlyWiki5/commit/d402d3c5a619b6b1642ab03c74ff03a864846a0b]] +* Added a [[basic CSV parser|https://github.com/Jermolene/TiddlyWiki5/commit/5a085f792722c74d259464386138c731b2f014cc]] +* Several measures to enforce the TiddlyWiki programming model: +** [[Refactor|https://github.com/Jermolene/TiddlyWiki5/commit/9de17aa206b21df5c4e29e61bba5d6b49aca6c71]] wiki store object to make members be private +** Freeze tiddler object and [[fields|https://github.com/Jermolene/TiddlyWiki5/commit/279626a3e3fbd75d60fc3be49b68a99d8ba0a95d]] tiddler fields to enforce their immutability +* [[Extend|https://github.com/Jermolene/TiddlyWiki5/commit/f649b5b037bfd2e7c48d1ba65ffa37064456523d]] the ButtonWidget to be able to set text references +* [[Add|https://github.com/Jermolene/TiddlyWiki5/commit/afa677b9a0b1dff1239dc1ea08edd210b9736af9]] a class to tiddler frames in view mode +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/50cf9678cb469e443e220b063e2355c844e417e7]] support for [[WidgetMessage: tw-home]] +* [[Hidden|https://github.com/Jermolene/TiddlyWiki5/commit/2608a323ebf3d8a8e925eda6d3a10ebb8f41d383]] system tags from the sidebar ''Tags' tab +* [[Allow|https://github.com/Jermolene/TiddlyWiki5/commit/98872bbe7c62faa4aa209fa421c2989aeef3aaf2]] pasting and import of HTML content +* [[Add|https://github.com/Jermolene/TiddlyWiki5/commit/a5a2c718b1d5671652d01e3567dba1c6795b7521]] support for a tooltip on the LinkWidget !! Bug Fixes -* \ No newline at end of file +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/aa631518152cda5643805c143bf0000bca8d767f]] problem with occasional freezes of the sync mechanism - thanks to buggyj +* Fixed problem with [[tiddlers|https://github.com/Jermolene/TiddlyWiki5/commit/1e960ffcac566c742c44b18d6f0e809d4457b249]] or [[fields|https://github.com/Jermolene/TiddlyWiki5/commit/ea46f85a8a5ad29e8602cbb13667c853903681a6]] called `__proto__` +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/aec618793f41b937676a5a165764dc19d9bbb2b2]] with refreshing the D3 plugin + +