From f0e638ea62a1f3ad6cdb9ccc8aba94b9e45c6dcf Mon Sep 17 00:00:00 2001 From: Evolena Date: Mon, 22 Sep 2014 14:04:05 +0200 Subject: [PATCH 01/12] Correct a typo in doc --- .../Some of the things you can do with TiddlyWiki.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editions/tw5.com/tiddlers/HelloThere/Some of the things you can do with TiddlyWiki.tid b/editions/tw5.com/tiddlers/HelloThere/Some of the things you can do with TiddlyWiki.tid index 751ed1aa9..69dd6bb55 100644 --- a/editions/tw5.com/tiddlers/HelloThere/Some of the things you can do with TiddlyWiki.tid +++ b/editions/tw5.com/tiddlers/HelloThere/Some of the things you can do with TiddlyWiki.tid @@ -5,7 +5,7 @@ title: Some of the things you can do with TiddlyWiki type: text/vnd.tiddlywiki * Take notes, and use tags and hyperlinking to form relationships between your notes -* Use tabs, tables, tag-based lists, and tables of contents to get organzed +* Use tabs, tables, tag-based lists, and tables of contents to get organised * Bookmark your favorite websites (see an example at http://giffmex.org/experiments/tidmarks.html) * Keep track of tasks and appointments, and organise them by multiple tags (see our TaskManagementExample) * Inventory just about anything: your recipes, personal library, contacts, music collection, and more From 113d8efb8078bb7a2b1bea8fa050039194476a14 Mon Sep 17 00:00:00 2001 From: Evolena Date: Mon, 22 Sep 2014 14:36:16 +0200 Subject: [PATCH 02/12] Sign CLA --- licenses/cla-individual.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/licenses/cla-individual.md b/licenses/cla-individual.md index 2587d70b0..32c37ad20 100644 --- a/licenses/cla-individual.md +++ b/licenses/cla-individual.md @@ -170,3 +170,5 @@ Eucaly J, @Eucaly, 2014/09/14 Mal Gamble, @malgam, 2014/09/19 Ton Gerner, @gernert, 2014/09/19 + +Julie Bertrand, @Evolena, 2014/09/22 From 6bc2e18cbdcb66fba79ccaa5eb5eeba36db9ec65 Mon Sep 17 00:00:00 2001 From: Simon Baird Date: Tue, 23 Sep 2014 23:57:32 +1000 Subject: [PATCH 03/12] Fix list macro typo in tw5 Plugins.tid --- editions/tw5.com/tiddlers/plugins/Plugins.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editions/tw5.com/tiddlers/plugins/Plugins.tid b/editions/tw5.com/tiddlers/plugins/Plugins.tid index 9dcdd35ff..00b6ae653 100644 --- a/editions/tw5.com/tiddlers/plugins/Plugins.tid +++ b/editions/tw5.com/tiddlers/plugins/Plugins.tid @@ -8,7 +8,7 @@ type: text/vnd.tiddlywiki The following plugins are distributed on tiddlywiki.com as part of the main TiddlyWiki distribution. -> +<> ! What is a plugin? From 61af1f9379b0e0c30687e4029fb303826a232e12 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 24 Sep 2014 11:50:38 +0200 Subject: [PATCH 04/12] Add error formatting for transclusion recursion errors --- core/modules/widgets/transclude.js | 6 +++++- themes/tiddlywiki/vanilla/base.tid | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/core/modules/widgets/transclude.js b/core/modules/widgets/transclude.js index bc20d44c6..34a912851 100755 --- a/core/modules/widgets/transclude.js +++ b/core/modules/widgets/transclude.js @@ -65,7 +65,11 @@ TranscludeWidget.prototype.execute = function() { // Check for recursion if(parser) { if(this.parentWidget && this.parentWidget.hasVariable("transclusion",recursionMarker)) { - parseTreeNodes = [{type: "text", text: "Recursive transclusion error in transclude widget"}]; + parseTreeNodes = [{type: "element", tag: "span", attributes: { + "class": {type: "string", value: "tc-error"} + }, children: [ + {type: "text", text: "Recursive transclusion error in transclude widget"} + ]}]; } } // Construct the child widgets diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index cab965d92..0ee6e2330 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -1447,3 +1447,12 @@ body.tc-dirty span.tc-dirty-indicator, body.tc-dirty span.tc-dirty-indicator svg cursor: pointer; display: inline-block; } + +/* +** Errors +*/ + +.tc-error { + background: #f00; + color: #fff; +} From b3df07ae3e190cfb6fc23dbe31c6229fe5e39087 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 24 Sep 2014 11:50:49 +0200 Subject: [PATCH 05/12] Error handling for KaTeX plugin --- editions/katexdemo/tiddlers/HelloThere.tid | 11 +++++++++++ plugins/tiddlywiki/katex/wrapper.js | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/editions/katexdemo/tiddlers/HelloThere.tid b/editions/katexdemo/tiddlers/HelloThere.tid index 9b807f77a..719121c1e 100644 --- a/editions/katexdemo/tiddlers/HelloThere.tid +++ b/editions/katexdemo/tiddlers/HelloThere.tid @@ -63,3 +63,14 @@ For more flexibility the KaTeX widget can also be used via the full widget synta ``` <$latex text="\displaystyle f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi"> + +! Error Handling + +An warning message is displayed if KaTeX detects a problem with the ~LaTeX syntax. For example: + +``` +$$\displaystyle f(x) = \int_{-\infty}^\infinity\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi$$ +``` + +$$\displaystyle f(x) = \int_{-\infty}^\infinity\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi$$ + diff --git a/plugins/tiddlywiki/katex/wrapper.js b/plugins/tiddlywiki/katex/wrapper.js index 36aa9d911..517ff5950 100644 --- a/plugins/tiddlywiki/katex/wrapper.js +++ b/plugins/tiddlywiki/katex/wrapper.js @@ -36,7 +36,12 @@ KaTeXWidget.prototype.render = function(parent,nextSibling) { var text = this.getAttribute("text",this.parseTreeNode.text || ""); // Render it into a span var span = this.document.createElement("span"); - katex.render(text,span); + try { + katex.render(text,span); + } catch(ex) { + span.className = "tc-error"; + span.textContent = ex; + } // Insert it into the DOM parent.insertBefore(span,nextSibling); this.domNodes.push(span); From 6b3646a0257121b57f45c4580b2e15591f44f606 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 24 Sep 2014 12:08:16 +0200 Subject: [PATCH 06/12] Update history of TiddlyWiki --- .../tw5.com/tiddlers/about/History of TiddlyWiki.tid | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/editions/tw5.com/tiddlers/about/History of TiddlyWiki.tid b/editions/tw5.com/tiddlers/about/History of TiddlyWiki.tid index b1dec1792..30afe03ed 100644 --- a/editions/tw5.com/tiddlers/about/History of TiddlyWiki.tid +++ b/editions/tw5.com/tiddlers/about/History of TiddlyWiki.tid @@ -1,5 +1,5 @@ created: 20140908114400000 -modified: 20140916141919329 +modified: 20140923141919329 tags: About title: History of TiddlyWiki type: text/vnd.tiddlywiki @@ -56,3 +56,10 @@ Our approach was to focus on showing rather than telling. We worked with the Tid By the end of 2011 I was increasingly feeling that I would be better placed to realise the potential of TiddlyWiki outside of the corporate confines BT. Accordingly, I left and started work as an independent developer, primarily working on a brand new reboot of TiddlyWiki in the shape of TiddlyWiki5. +! Development of TiddlyWiki5 + +I worked on new release of TiddlyWiki from November 2011. As a programmer, working on "version 2.0" of something that I had already written is a very attractive proposition. It means that the requirements were fully understood, allowing me to focus on evolving the architecture needed to support the desired functionality. + +! The Future + +Now that TiddlyWiki5 has finally left "beta" status behind, my hope is that it will have a long life. Because it only uses standard features of HTML5 and Node.js, there is no reason why it cannot be fully operational for many years to come. My goal is for it last for at least 25 years. From f8e11da0fca088b62739459097215a78c2663d45 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 24 Sep 2014 12:41:12 +0200 Subject: [PATCH 07/12] Update lists in wikitext docs Include workaround for multi-line list entries. --- .../tiddlers/wikitext/Lists in WikiText.tid | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/editions/tw5.com/tiddlers/wikitext/Lists in WikiText.tid b/editions/tw5.com/tiddlers/wikitext/Lists in WikiText.tid index 4e4e73169..f8d8b1f5a 100644 --- a/editions/tw5.com/tiddlers/wikitext/Lists in WikiText.tid +++ b/editions/tw5.com/tiddlers/wikitext/Lists in WikiText.tid @@ -1,9 +1,9 @@ +caption: Lists created: 20131205160257619 -modified: 20131206154613715 +modified: 20140924104026734 tags: WikiText title: Lists in WikiText type: text/vnd.tiddlywiki -caption: Lists ! Unordered Lists @@ -52,3 +52,13 @@ Note that [[Block Quotes in WikiText]] can be mixed with lists. For example: **> Another quote * List Three ">> + +! Paragraphs in Lists + +Entries in the list are delimited with a linebreak, making it impossible to include linebreaks within a list entry. The workaround is to transclude paragraph content from another tiddler. For example: + +``` +* First entry +* <$transclude tiddler="MyTiddler" mode="block"/> +* Third entry +``` From a159b5baf3ad91d8defc68cbf81c78d01b69c416 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 24 Sep 2014 13:15:16 +0200 Subject: [PATCH 08/12] Add tiddlerInfo to the syncadaptor saveTiddler method --- core/modules/syncer.js | 2 ++ .../tiddlers/from tw5.com/moduletypes/SyncAdaptorModules.tid | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/modules/syncer.js b/core/modules/syncer.js index 87a4af92c..bd0c2ec39 100644 --- a/core/modules/syncer.js +++ b/core/modules/syncer.js @@ -467,6 +467,8 @@ Syncer.prototype.dispatchTask = function(task,callback) { }; // Invoke the callback callback(null); + },{ + tiddlerInfo: self.tiddlerInfo[task.title] }); } else { this.logger.log(" Not Dispatching 'save' task:",task.title,"tiddler does not exist"); diff --git a/editions/dev/tiddlers/from tw5.com/moduletypes/SyncAdaptorModules.tid b/editions/dev/tiddlers/from tw5.com/moduletypes/SyncAdaptorModules.tid index 5396f2081..6fdc6af3c 100644 --- a/editions/dev/tiddlers/from tw5.com/moduletypes/SyncAdaptorModules.tid +++ b/editions/dev/tiddlers/from tw5.com/moduletypes/SyncAdaptorModules.tid @@ -79,13 +79,14 @@ This method is optional. If an adaptor doesn't implement it then synchronisation |!Parameter |!Description | |callback |Callback function invoked with parameter `err,tiddlers`, where `tiddlers` is an array of tiddler field objects | -!! `saveTiddler(tiddler,callback)` +!! `saveTiddler(tiddler,callback,tiddlerInfo)` Saves a tiddler to the server. |!Parameter |!Description | |tiddler |Tiddler to be saved | |callback |Callback function invoked with parameter `err,adaptorInfo,revision` | +|tiddlerInfo |The tiddlerInfo maintained by the syncer for this tiddler | !! `loadTiddler(title,callback)` From 88199ffd627ee56a5a7fa8407ce911d72d072cf4 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 24 Sep 2014 13:23:40 +0200 Subject: [PATCH 09/12] Update lists in wikitext docs Thanks @Skeeve --- .../tiddlers/wikitext/Lists in WikiText.tid | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/editions/tw5.com/tiddlers/wikitext/Lists in WikiText.tid b/editions/tw5.com/tiddlers/wikitext/Lists in WikiText.tid index f8d8b1f5a..67b43026f 100644 --- a/editions/tw5.com/tiddlers/wikitext/Lists in WikiText.tid +++ b/editions/tw5.com/tiddlers/wikitext/Lists in WikiText.tid @@ -1,6 +1,6 @@ caption: Lists created: 20131205160257619 -modified: 20140924104026734 +modified: 20140924112303029 tags: WikiText title: Lists in WikiText type: text/vnd.tiddlywiki @@ -55,10 +55,28 @@ Note that [[Block Quotes in WikiText]] can be mixed with lists. For example: ! Paragraphs in Lists -Entries in the list are delimited with a linebreak, making it impossible to include linebreaks within a list entry. The workaround is to transclude paragraph content from another tiddler. For example: +Entries in the list are delimited with a linebreak, making it impossible to include linebreaks within a list entry. There are a couple of workarounds. + +First, you can transclude paragraph content from another tiddler. For example: ``` * First entry * <$transclude tiddler="MyTiddler" mode="block"/> * Third entry ``` + +Secondly, you can use an HTML "div" element to contain the multiline content. For example: + +``` +# Step 1 +# Step 2 +# Step 3
+ +Here is the first of several paragraphs. Note that the double linebreak preceding this paragraph is significant. + +And here is the second of several paragraphs. +
+# Step 4 +# Step 5 +# Step 6 +``` From c9f692d671651af63c551bb76539e083471d54ea Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 24 Sep 2014 13:57:23 +0200 Subject: [PATCH 10/12] Add documentation for "fields" filter operator Fixes #898 --- .../tiddlers/filters/FilterOperator fields.tid | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator fields.tid diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator fields.tid b/editions/tw5.com/tiddlers/filters/FilterOperator fields.tid new file mode 100644 index 000000000..82cbda969 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator fields.tid @@ -0,0 +1,12 @@ +created: 20140924115616653 +modified: 20140924115627781 +tags: Filters +title: FilterOperator: fields +type: text/vnd.tiddlywiki + +The ''fields'' filter operator returns the names of all the fields used in the currently selected tiddlers. + +|!Filter String |!Description | +|`[[HelloThere]fields[]]` |Returns the fields present in the tiddler `HelloThere` | +|`[tag[myTag]fields[]]` |Returns the aggregate of all the fields present on tiddlers that have the tag `myTag` | + From e2046ce4ffb6b8232a4ad5e7f51c431798917787 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 24 Sep 2014 16:19:23 +0200 Subject: [PATCH 11/12] Treat HTTP 201 response code as success --- core/modules/utils/dom/http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/utils/dom/http.js b/core/modules/utils/dom/http.js index f5b9fc048..4708ecb39 100644 --- a/core/modules/utils/dom/http.js +++ b/core/modules/utils/dom/http.js @@ -39,7 +39,7 @@ exports.httpRequest = function(options) { // Set up the state change handler request.onreadystatechange = function() { if(this.readyState === 4) { - if(this.status === 200 || this.status === 204) { + if(this.status === 200 || this.status === 201 || this.status === 204) { // Success! options.callback(null,this.responseText,this); return; From eacb9e53ebf2a814d61bf005d68f449f7b9e63b5 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 24 Sep 2014 16:21:59 +0200 Subject: [PATCH 12/12] Delete syncer tiddlerInfo when tiddlers are deleted --- core/modules/syncer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/core/modules/syncer.js b/core/modules/syncer.js index bd0c2ec39..08d5deb19 100644 --- a/core/modules/syncer.js +++ b/core/modules/syncer.js @@ -495,6 +495,7 @@ Syncer.prototype.dispatchTask = function(task,callback) { if(err) { return callback(err); } + delete self.tiddlerInfo[task.title]; // Invoke the callback callback(null); },{