From a8c1e6a3bd7feb8cd5d98ee886e25b52fcd0d6c4 Mon Sep 17 00:00:00 2001 From: Saq Imtiaz Date: Sun, 6 Dec 2020 14:57:47 +0100 Subject: [PATCH 1/6] Update performance documentation (#5216) Documents the change to macro parsing from #5205 This builds on documentation changes made in the tw.com branch and is therefore based on that branch, but should not be merged before 5.1.23 is live. --- editions/tw5.com/tiddlers/workingwithtw/Performance.tid | 1 + 1 file changed, 1 insertion(+) diff --git a/editions/tw5.com/tiddlers/workingwithtw/Performance.tid b/editions/tw5.com/tiddlers/workingwithtw/Performance.tid index 68fa1f230..2aec04e36 100644 --- a/editions/tw5.com/tiddlers/workingwithtw/Performance.tid +++ b/editions/tw5.com/tiddlers/workingwithtw/Performance.tid @@ -29,4 +29,5 @@ TiddlyWiki ships with defaults that are designed to get the best out of modern d ** Also note that the “field” operator is also used when the operator name is a fieldname, so, for example, `[all[shadows+tiddlers]caption[x]...` is optimised. * Use the [[throttling|RefreshThrottling]] feature of the RefreshMechanism judiciously * Keep in mind that ''transcluding separate tiddlers is more performant than heavy use of macros'' and the difference can be significant in some situations. The result of parsing each tiddler is cached and reused the next time if the tiddler has not changed. The same technique cannot be used for macros and they have to be re-parsed every time, as they are not global but local to the widget tree. +** <<.from-version "5.1.23">> Parse trees are now cached for macros that do ''not'' perform any text substitution either via parameters or variables (i.e. `$parameter$` or `$(variable)$`). * Where possible ''use the SetWidget or VarsWidget with filters instead of the WikifyWidget'' for declaring variables and string concatenation. The performance of the wikify mechanism is relatively poor as there is no opportunity to cache the parse tree or widget tree. From 96d4f87e78b01731d74f46ca695e6f5e0eef93dd Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Sun, 6 Dec 2020 14:01:03 +0000 Subject: [PATCH 2/6] Revert "Update documentation on Performance (#5203)" This reverts commit f798eab33f0621f20b79f794d4c51ec776f6fd62. --- editions/tw5.com/tiddlers/workingwithtw/Performance.tid | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/editions/tw5.com/tiddlers/workingwithtw/Performance.tid b/editions/tw5.com/tiddlers/workingwithtw/Performance.tid index 2aec04e36..5eec40ac5 100644 --- a/editions/tw5.com/tiddlers/workingwithtw/Performance.tid +++ b/editions/tw5.com/tiddlers/workingwithtw/Performance.tid @@ -1,5 +1,5 @@ created: 20150330155120127 -modified: 20201205104857625 +modified: 20191014091943444 tags: [[Working with TiddlyWiki]] title: Performance type: text/vnd.tiddlywiki @@ -29,5 +29,4 @@ TiddlyWiki ships with defaults that are designed to get the best out of modern d ** Also note that the “field” operator is also used when the operator name is a fieldname, so, for example, `[all[shadows+tiddlers]caption[x]...` is optimised. * Use the [[throttling|RefreshThrottling]] feature of the RefreshMechanism judiciously * Keep in mind that ''transcluding separate tiddlers is more performant than heavy use of macros'' and the difference can be significant in some situations. The result of parsing each tiddler is cached and reused the next time if the tiddler has not changed. The same technique cannot be used for macros and they have to be re-parsed every time, as they are not global but local to the widget tree. -** <<.from-version "5.1.23">> Parse trees are now cached for macros that do ''not'' perform any text substitution either via parameters or variables (i.e. `$parameter$` or `$(variable)$`). * Where possible ''use the SetWidget or VarsWidget with filters instead of the WikifyWidget'' for declaring variables and string concatenation. The performance of the wikify mechanism is relatively poor as there is no opportunity to cache the parse tree or widget tree. From e34a88e3e442b2a9dd992522816f94f88b078c47 Mon Sep 17 00:00:00 2001 From: Stefano Stoduto <2358361+OmbraDiFenice@users.noreply.github.com> Date: Thu, 10 Dec 2020 18:27:47 +0100 Subject: [PATCH 3/6] Signing the CLA (#4876) Co-authored-by: Jeremy Ruston --- licenses/cla-individual.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/licenses/cla-individual.md b/licenses/cla-individual.md index d83484a3a..c27b2bca6 100644 --- a/licenses/cla-individual.md +++ b/licenses/cla-individual.md @@ -412,4 +412,6 @@ Florian Kohrt, @fkohrt, 2020/09/10 Gerald Liu, @gera2ld, 2020/09/25 +Stefano Stoduto, @OmbraDiFenice, 2020/10/03 + Miha Lunar, @SmilyOrg, 2020/11/04 From 81947edd5c3a2daa8da44a520824b1867e40953e Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Sun, 13 Dec 2020 20:01:47 +0000 Subject: [PATCH 4/6] Dev: Update hook mechanism docs --- editions/dev/tiddlers/new/HookMechanism.tid | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/editions/dev/tiddlers/new/HookMechanism.tid b/editions/dev/tiddlers/new/HookMechanism.tid index 82883d16d..0034c9fab 100644 --- a/editions/dev/tiddlers/new/HookMechanism.tid +++ b/editions/dev/tiddlers/new/HookMechanism.tid @@ -1,17 +1,30 @@ created: 20141122200310516 -modified: 20170209130807520 +modified: 20201213161842776 title: HookMechanism type: text/vnd.tiddlywiki The hook mechanism provides a way for plugins to intercept and modify default functionality. Hooks are added as follows: ```js +/* +name: name of hook function (by convention prefixed with `th-`) +handler: function to be called when hook is invoked +*/ $tw.hooks.addHook(name,handler); ``` +The handler function will be called with parameters that depend on the specific hook in question, but they always follow the pattern `handler(value,params...)` + +* ''value'': an optional value that is to be transformed by the hook function +* ''params'': one or more optional parameters that are passed to the hook function + +If required by the hook in question, the handler function must return the modified ''value''. + Multiple handlers can be assigned to the same name using repeated calls. When a hook is invoked by name all registered functions will be called sequentially in their order of addition. -Though not essential care should be taken to ensure that hooks are added before they are invoked. For example: [[Hook: tc-opening-default-tiddlers-list]] should ideally be added before the story startup module is invoked otherwise any hook specified additions to the default tiddlers will not be seen on the initial loading of the page, though will be visible if the user clicks the home button. +Note that the ''value'' passed to the subsequent hook function will be the return value of the previous hook function. + +Though not essential care should be taken to ensure that hooks are added before they are invoked. For example: [[Hook: th-opening-default-tiddlers-list]] should ideally be added before the story startup module is invoked otherwise any hook specified additions to the default tiddlers will not be seen on the initial loading of the page, though will be visible if the user clicks the home button. !! Example From c0a56e790d9cbe65fe27adfbda0889dc116a538d Mon Sep 17 00:00:00 2001 From: twMat Date: Fri, 18 Dec 2020 21:19:02 +0100 Subject: [PATCH 5/6] Update title.tid (#5292) --- editions/tw5.com/tiddlers/filters/title.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editions/tw5.com/tiddlers/filters/title.tid b/editions/tw5.com/tiddlers/filters/title.tid index 46f16e9b6..3bb59d73f 100644 --- a/editions/tw5.com/tiddlers/filters/title.tid +++ b/editions/tw5.com/tiddlers/filters/title.tid @@ -12,7 +12,7 @@ op-parameter-name: T op-output: a selection containing only <<.place T>> op-neg-output: the input, but with tiddler <<.place T>> filtered out if it exists in the wiki -`[title[An Example]]` can be shortened to `[[An Example]]`, because <<.op title>> is the default filter operator. +`[title[An Example]]` can be shortened to `[[An Example]]`, because <<.op title>> is the default filter operator. Consequentially, `[!title[An Example]]` can be shortened to `[![An Example]]`. <<.op title>> is a [[constructor|Selection Constructors]] (except in the form `!title`), but <<.olink2 "field:title" field>> is a [[modifier|Selection Constructors]]. From ddda9a34ae9c70e8e0487e70ab638bedd9406705 Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Tue, 22 Dec 2020 11:48:40 +0000 Subject: [PATCH 6/6] [Docs] Update links to developer discussions --- editions/tw5.com/tiddlers/about/Developers.tid | 11 ++++++++--- editions/tw5.com/tiddlers/community/Forums.tid | 9 ++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/editions/tw5.com/tiddlers/about/Developers.tid b/editions/tw5.com/tiddlers/about/Developers.tid index 9bb7007ac..9b24b0c36 100644 --- a/editions/tw5.com/tiddlers/about/Developers.tid +++ b/editions/tw5.com/tiddlers/about/Developers.tid @@ -1,5 +1,5 @@ created: 20150412191004348 -modified: 20160710150754023 +modified: 20201222114745463 tags: Community Reference title: Developers type: text/vnd.tiddlywiki @@ -7,5 +7,10 @@ type: text/vnd.tiddlywiki There are several resources for developers to learn more about TiddlyWiki and to discuss and contribute to its development. * [[tiddlywiki.com/dev|https://tiddlywiki.com/dev]] is the official developer documentation -* [[TiddlyWikiDev group|https://groups.google.com/group/TiddlyWikiDev]] for discussions about TiddlyWiki development -* https://github.com/Jermolene/TiddlyWiki5 for the source code and development activity +* Get involved in the [[development on GitHub|https://github.com/Jermolene/TiddlyWiki5]] +** [[Discussions|https://github.com/Jermolene/TiddlyWiki5/discussions]] are for Q&A and open-ended discussion +** [[Issues|https://github.com/Jermolene/TiddlyWiki5/issues]] are for raising bug reports and proposing specific, actionable new ideas +* The older ~TiddlyWikiDev Google Group is now closed in favour of [[GitHub Discussions|https://github.com/Jermolene/TiddlyWiki5/discussions]] but remains a useful archive: https://groups.google.com/group/TiddlyWikiDev +** An enhanced group search facility is available on [[mail-archive.com|https://www.mail-archive.com/tiddlywikidev@googlegroups.com/]] +* Follow [[@TiddlyWiki on Twitter|http://twitter.com/#!/TiddlyWiki]] for the latest news +* Chat at https://gitter.im/TiddlyWiki/public (development room coming soon) diff --git a/editions/tw5.com/tiddlers/community/Forums.tid b/editions/tw5.com/tiddlers/community/Forums.tid index b213db329..2a2663a65 100644 --- a/editions/tw5.com/tiddlers/community/Forums.tid +++ b/editions/tw5.com/tiddlers/community/Forums.tid @@ -1,5 +1,5 @@ created: 20140721121924384 -modified: 20161229091129395 +modified: 20201222114755959 tags: Community title: Forums type: text/vnd.tiddlywiki @@ -19,12 +19,7 @@ The ~TiddlyWiki discussion groups are mailing lists for talking about ~TiddlyWik ! Developers -* The TiddlyWikiDev group for developers: https://groups.google.com/group/TiddlyWikiDev -*> Note that you do not need a Google Account to join the discussion groups. Subscribe by sending an email to mailto:tiddlywikidev+subscribe@googlegroups.com. -** An enhanced group search facility is available on [[mail-archive.com|https://www.mail-archive.com/tiddlywikidev@googlegroups.com/]] -* Follow [[@TiddlyWiki on Twitter|http://twitter.com/#!/TiddlyWiki]] for the latest news -* Get involved in the [[development on GitHub|https://github.com/Jermolene/TiddlyWiki5]] -* Chat at https://gitter.im/TiddlyWiki/public (development room coming soon) +{{Developers}} New releases of TiddlyWiki, TiddlyDesktop and TiddlyFox are announced via the discussion groups and [[Twitter|https://twitter.com/TiddlyWiki]] (you can also subscribe to an Atom/RSS feed of [[TiddlyWiki releases from GitHub|https://github.com/jermolene/tiddlywiki5/releases.atom]])