From 6add992bf2e9cedd077c74c3471758bbe9d6e1b2 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 8 Oct 2015 15:10:46 +0100 Subject: [PATCH 01/12] Fix issue with tiddlers such as `$:/templates/something` not being synced Fixed #2002 --- core/wiki/config/SaverFilter.tid | 2 +- core/wiki/config/SyncFilter.tid | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/wiki/config/SaverFilter.tid b/core/wiki/config/SaverFilter.tid index a5059b24e..20554a78d 100644 --- a/core/wiki/config/SaverFilter.tid +++ b/core/wiki/config/SaverFilter.tid @@ -1,3 +1,3 @@ title: $:/config/SaverFilter -[all[]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[[$:/UploadName]] -[prefix[$:/state]] -[prefix[$:/temp]] \ No newline at end of file +[all[]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[[$:/UploadName]] -[prefix[$:/state/]] -[prefix[$:/temp/]] \ No newline at end of file diff --git a/core/wiki/config/SyncFilter.tid b/core/wiki/config/SyncFilter.tid index cd06e62d6..2c91f6e7b 100644 --- a/core/wiki/config/SyncFilter.tid +++ b/core/wiki/config/SyncFilter.tid @@ -1,3 +1,3 @@ title: $:/config/SyncFilter -[is[tiddler]] -[[$:/HistoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[prefix[$:/status]] -[prefix[$:/state]] -[prefix[$:/temp]] \ No newline at end of file +[is[tiddler]] -[[$:/HistoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[prefix[$:/status/]] -[prefix[$:/state/]] -[prefix[$:/temp/]] \ No newline at end of file From 7e9f7afa94167c7abfd3bf9932915a91aa47c6cd Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 8 Oct 2015 15:10:54 +0100 Subject: [PATCH 02/12] Tweak the sidebar tabs gradient --- themes/tiddlywiki/snowwhite/base.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/tiddlywiki/snowwhite/base.tid b/themes/tiddlywiki/snowwhite/base.tid index bd4f9878e..dff8c9bdc 100644 --- a/themes/tiddlywiki/snowwhite/base.tid +++ b/themes/tiddlywiki/snowwhite/base.tid @@ -85,7 +85,7 @@ canvas.tc-edit-bitmapeditor { .tc-sidebar-lists .tc-tab-set .tc-tab-divider { border-top: none; height: 1px; - <> + <> } .tc-more-sidebar .tc-tab-buttons button { From 5faba15446a788fe3bc1f71e1fc657b48bab02f2 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 8 Oct 2015 18:04:24 +0100 Subject: [PATCH 03/12] Text-slicer updates --- plugins/tiddlywiki/text-slicer/docs.tid | 21 +++++++++++++++++-- .../text-slicer/templates/static/document.tid | 4 ---- .../text-slicer/templates/static/heading.tid | 2 +- .../templates/static/helpers/classes.tid | 3 +++ .../text-slicer/templates/static/image.tid | 2 +- .../text-slicer/templates/static/item.tid | 2 +- .../text-slicer/templates/static/list.tid | 2 +- .../templates/static/paragraph.tid | 2 +- 8 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 plugins/tiddlywiki/text-slicer/templates/static/helpers/classes.tid diff --git a/plugins/tiddlywiki/text-slicer/docs.tid b/plugins/tiddlywiki/text-slicer/docs.tid index 775011d01..ddfe508ec 100644 --- a/plugins/tiddlywiki/text-slicer/docs.tid +++ b/plugins/tiddlywiki/text-slicer/docs.tid @@ -45,10 +45,14 @@ The following theme tweaks should be applied to enable the preview column: Documents can be saved under Node.js, or previewed in the browser. -!! Browser +!! Exporting Documents in the Browser To preview a document, locate it in the preview column and click the button labelled "View document". The document will open in plain text in a new window. The window will be automatically updated as you work on the document. +!! Exporting Documents under Node.js + +[TBD] + ! Sliced Document Format !! Introduction @@ -100,7 +104,6 @@ The document itself is represented by a tiddler with the following fields: * ''text'': Available for comments about the document * ''list'': ordered list of tiddlers making up the root level of this document - !!! Headings Tiddlers representing headings have the following fields: @@ -140,3 +143,17 @@ The tiddlers representing items within the list have the following fields: * ''title'': an automatically generated unique title * ''text'': the text of the list item * ''tags'': any CSS classes found in the HTML are converted into tags + +!!! Images + +Tiddlers representing images have the following fields: + +* ''toc-type'': the text "image" +* ''title'': an automatically generated unique title +* ''type'': appropriate content type for the image (eg "image/jpeg") + +! Document Metadata, Tags and Classes + +[TBD] + + diff --git a/plugins/tiddlywiki/text-slicer/templates/static/document.tid b/plugins/tiddlywiki/text-slicer/templates/static/document.tid index b32f90563..1d1afd2c8 100644 --- a/plugins/tiddlywiki/text-slicer/templates/static/document.tid +++ b/plugins/tiddlywiki/text-slicer/templates/static/document.tid @@ -1,11 +1,7 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/static/document -`
` - <$set name="tv-exclude-filter" value={{!!toc-exclude-filter}}> <$list filter="[list!has[draft.of]]" template="$:/plugins/tiddlywiki/text-slicer/templates/static/tiddler"/> - -`
` diff --git a/plugins/tiddlywiki/text-slicer/templates/static/heading.tid b/plugins/tiddlywiki/text-slicer/templates/static/heading.tid index a1b897f77..5b44f5f20 100644 --- a/plugins/tiddlywiki/text-slicer/templates/static/heading.tid +++ b/plugins/tiddlywiki/text-slicer/templates/static/heading.tid @@ -1,6 +1,6 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/static/heading -`<`<$text text={{!!toc-heading-level}}/>`>` +`<`<$text text={{!!toc-heading-level}}/>` class="`{{||$:/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes}}`">` <$view field="text" format="htmlencodedplainwikified"/> diff --git a/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes.tid b/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes.tid new file mode 100644 index 000000000..3d028e70a --- /dev/null +++ b/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes.tid @@ -0,0 +1,3 @@ +title: $:/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes + +<$list filter="[all[current]tags[]addprefix[$:/_DocumentTags/]has[title]]"><$view field="css-class"/> \ No newline at end of file diff --git a/plugins/tiddlywiki/text-slicer/templates/static/image.tid b/plugins/tiddlywiki/text-slicer/templates/static/image.tid index fd8bbce81..8018956cb 100644 --- a/plugins/tiddlywiki/text-slicer/templates/static/image.tid +++ b/plugins/tiddlywiki/text-slicer/templates/static/image.tid @@ -1,3 +1,3 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/static/image -``;base64,`<$view format="text" field="text"/>`">` +``;base64,`<$view format="text" field="text"/>`" class="`{{||$:/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes}}`">` diff --git a/plugins/tiddlywiki/text-slicer/templates/static/item.tid b/plugins/tiddlywiki/text-slicer/templates/static/item.tid index 599076695..268320c13 100644 --- a/plugins/tiddlywiki/text-slicer/templates/static/item.tid +++ b/plugins/tiddlywiki/text-slicer/templates/static/item.tid @@ -1,6 +1,6 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/static/item -`
  • ` +`
  • ` <$transclude/> diff --git a/plugins/tiddlywiki/text-slicer/templates/static/list.tid b/plugins/tiddlywiki/text-slicer/templates/static/list.tid index 05c3030da..e60fadb20 100644 --- a/plugins/tiddlywiki/text-slicer/templates/static/list.tid +++ b/plugins/tiddlywiki/text-slicer/templates/static/list.tid @@ -2,7 +2,7 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/static/list <$list filter="""[all[current]] $(tv-exclude-filter)$ +[limit[1]]""" variable="item"> -`<`<$text text={{!!toc-list-type}}/>`>` +`<`<$text text={{!!toc-list-type}}/>` class="`{{||$:/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes}}`">` <$list filter={{!!toc-list-filter}} template="$:/plugins/tiddlywiki/text-slicer/templates/static/tiddler"/> diff --git a/plugins/tiddlywiki/text-slicer/templates/static/paragraph.tid b/plugins/tiddlywiki/text-slicer/templates/static/paragraph.tid index e4237ba56..574d7a381 100644 --- a/plugins/tiddlywiki/text-slicer/templates/static/paragraph.tid +++ b/plugins/tiddlywiki/text-slicer/templates/static/paragraph.tid @@ -2,7 +2,7 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/static/paragraph <$list filter="""[all[current]] $(tv-exclude-filter)$ +[limit[1]]""" variable="item"> -`

    ` +`

    ` <$view field="text" format="htmlencodedplainwikified"/> From 2d9471fe3b2255b44e2ea2da5475c40f46d3f24f Mon Sep 17 00:00:00 2001 From: Jermolene Date: Fri, 9 Oct 2015 17:09:30 +0100 Subject: [PATCH 04/12] Text-Slicer: Add support for static rendering of external images --- .../tiddlywiki/text-slicer/templates/static/image.tid | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/tiddlywiki/text-slicer/templates/static/image.tid b/plugins/tiddlywiki/text-slicer/templates/static/image.tid index 8018956cb..f1eba41a0 100644 --- a/plugins/tiddlywiki/text-slicer/templates/static/image.tid +++ b/plugins/tiddlywiki/text-slicer/templates/static/image.tid @@ -1,3 +1,13 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/static/image +<$reveal state="!!_canonical_uri" type="match" text=""> + ``;base64,`<$view format="text" field="text"/>`" class="`{{||$:/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes}}`">` + + + +<$reveal state="!!_canonical_uri" type="nomatch" text=""> + +``" class="`{{||$:/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes}}`">` + + From 69b4f174c335e26b2458b2a46fe3653d38c8a10f Mon Sep 17 00:00:00 2001 From: Jermolene Date: Fri, 9 Oct 2015 17:59:56 +0100 Subject: [PATCH 05/12] Introduce new "tight" theme Fixing #2008 --- editions/dev/tiddlywiki.info | 1 + editions/full/tiddlywiki.info | 1 + editions/introduction/tiddlywiki.info | 1 + editions/prerelease/tiddlywiki.info | 1 + editions/tw5.com/tiddlywiki.info | 1 + themes/tiddlywiki/tight/base.tid | 75 +++++++++++++++++++++++++++ themes/tiddlywiki/tight/plugin.info | 9 ++++ 7 files changed, 89 insertions(+) create mode 100644 themes/tiddlywiki/tight/base.tid create mode 100644 themes/tiddlywiki/tight/plugin.info diff --git a/editions/dev/tiddlywiki.info b/editions/dev/tiddlywiki.info index 2c4e090ea..b9d121fac 100644 --- a/editions/dev/tiddlywiki.info +++ b/editions/dev/tiddlywiki.info @@ -13,6 +13,7 @@ "tiddlywiki/starlight", "tiddlywiki/seamless", "tiddlywiki/centralised", + "tiddlywiki/tight", "tiddlywiki/readonly" ], "languages": [ diff --git a/editions/full/tiddlywiki.info b/editions/full/tiddlywiki.info index 94e48c7f9..9b6f87a09 100644 --- a/editions/full/tiddlywiki.info +++ b/editions/full/tiddlywiki.info @@ -45,6 +45,7 @@ ], "themes": [ "tiddlywiki/centralised", + "tiddlywiki/tight", "tiddlywiki/readonly", "tiddlywiki/seamless", "tiddlywiki/snowwhite", diff --git a/editions/introduction/tiddlywiki.info b/editions/introduction/tiddlywiki.info index 217d4783f..2e2b3d0e3 100644 --- a/editions/introduction/tiddlywiki.info +++ b/editions/introduction/tiddlywiki.info @@ -13,6 +13,7 @@ "tiddlywiki/starlight", "tiddlywiki/seamless", "tiddlywiki/centralised", + "tiddlywiki/tight", "tiddlywiki/readonly" ], "languages": [ diff --git a/editions/prerelease/tiddlywiki.info b/editions/prerelease/tiddlywiki.info index 7e7f86cdb..632fc48f6 100644 --- a/editions/prerelease/tiddlywiki.info +++ b/editions/prerelease/tiddlywiki.info @@ -15,6 +15,7 @@ "tiddlywiki/nighttime", "tiddlywiki/starlight", "tiddlywiki/seamless", + "tiddlywiki/tight", "tiddlywiki/centralised", "tiddlywiki/readonly" ], diff --git a/editions/tw5.com/tiddlywiki.info b/editions/tw5.com/tiddlywiki.info index 83ffbaa0f..703bec3b9 100644 --- a/editions/tw5.com/tiddlywiki.info +++ b/editions/tw5.com/tiddlywiki.info @@ -13,6 +13,7 @@ "tiddlywiki/starlight", "tiddlywiki/seamless", "tiddlywiki/centralised", + "tiddlywiki/tight", "tiddlywiki/readonly" ], "languages": [ diff --git a/themes/tiddlywiki/tight/base.tid b/themes/tiddlywiki/tight/base.tid new file mode 100644 index 000000000..1600f7898 --- /dev/null +++ b/themes/tiddlywiki/tight/base.tid @@ -0,0 +1,75 @@ +title: $:/themes/tiddlywiki/tight/base +tags: [[$:/tags/Stylesheet]] + +\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline + +@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) { +} + +@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) { + + html body.tc-body { + font-size: 13px; + line-height: 16px; + } + + html body.tc-body h1, + html body.tc-body h2, + html body.tc-body h3, + html body.tc-body h4, + html body.tc-body p { + margin-top: 0.3em; + margin-bottom: 0.3em; + } + + html body.tc-body code { + font-size: 0.8em; + } + + html body.tc-body section.tc-story-river { + padding: 0px; + } + + html body.tc-body div.tc-tiddler-frame { + padding: 12px; + } + + html body.tc-body div.tc-sidebar-scrollable { + padding: 12px 0 12px 12px; + } + + html body.tc-body .tc-tiddler-frame .tc-subtitle { + font-size: 0.7em; + font-weight: 700; + } + + html body.tc-body .tc-tiddler-frame .tc-tags-wrapper { + margin: 0; + } + + html body.tc-body .tc-tiddler-frame button.tc-tag-label, + html body.tc-body .tc-tiddler-frame span.tc-tag-label { + font-size: 0.8em; + } + + html body.tc-body .tc-tiddler-frame .tc-tiddler-body h1 { + font-size: 1.5em; + font-weight: 700; + } + + html body.tc-body .tc-tiddler-frame .tc-tiddler-body h2 { + font-size: 1.3em; + font-weight: 700; + } + + html body.tc-body .tc-tiddler-frame .tc-tiddler-body h3 { + font-size: 1.2em; + font-weight: 700; + } + + html body.tc-body .tc-tiddler-frame .tc-tiddler-body h4 { + font-size: 1.1em; + font-weight: 700; + } + +} diff --git a/themes/tiddlywiki/tight/plugin.info b/themes/tiddlywiki/tight/plugin.info new file mode 100644 index 000000000..704e23508 --- /dev/null +++ b/themes/tiddlywiki/tight/plugin.info @@ -0,0 +1,9 @@ +{ + "title": "$:/themes/tiddlywiki/tight", + "name": "Tight", + "author": "JeremyRuston", + "core-version": ">=5.0.0", + "plugin-type": "theme", + "description": "Tightly packed theme", + "dependents": ["$:/themes/tiddlywiki/vanilla"] +} From 98983c407200a791eb0c526a2fdc159529222b02 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sat, 10 Oct 2015 14:30:58 +0100 Subject: [PATCH 06/12] Add badges from https://shields.io --- editions/tw5.com/tiddlers/community/HelpingTiddlyWiki.tid | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editions/tw5.com/tiddlers/community/HelpingTiddlyWiki.tid b/editions/tw5.com/tiddlers/community/HelpingTiddlyWiki.tid index cd256ccc5..9ffd010fb 100644 --- a/editions/tw5.com/tiddlers/community/HelpingTiddlyWiki.tid +++ b/editions/tw5.com/tiddlers/community/HelpingTiddlyWiki.tid @@ -1,5 +1,5 @@ created: 20130825160500000 -modified: 20150310172330006 +modified: 20151010131218969 tags: Community title: HelpingTiddlyWiki type: text/vnd.tiddlywiki @@ -10,7 +10,9 @@ If you find TiddlyWiki useful, there are lots of ways you can help assure its fu OpenSource projects like ~TiddlyWiki thrive on the feedback and engagement of users. ~TiddlyWiki becomes more useful to everyone as more and more people use it. So, if you find ~TiddlyWiki useful, spread the word. The best possible way to assure its future is for it to become a hundred times more popular than before. +* [img[https://img.shields.io/twitter/url/http/tiddlywiki.com.svg?style=social]] * Tweet about ~TiddlyWiki: [[I love TiddlyWiki because...|https://twitter.com/intent/tweet?text=I+love+TiddlyWiki+because...&source=tiddlywiki5]] +* [img[https://img.shields.io/github/stars/jermolene/tiddlywiki5.svg?style=social&label=Star]] * [[Star the TiddlyWiki5 GitHub Repository|https://github.com/Jermolene/TiddlyWiki5]] * [[Display the TiddlyWiki Poster|http://tiddlywiki.com/poster]] From acc44c6f677d16e3ee7a680c41707da58b8c8248 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 12 Oct 2015 17:54:17 +0100 Subject: [PATCH 07/12] Tweaks to "Tight" theme --- .../prerelease/tiddlers/Release 5.1.10.tid | 12 +++++++++ themes/tiddlywiki/tight/base.tid | 27 ++++++++++++++++--- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/editions/prerelease/tiddlers/Release 5.1.10.tid b/editions/prerelease/tiddlers/Release 5.1.10.tid index 9a8bcb969..fd14f7036 100644 --- a/editions/prerelease/tiddlers/Release 5.1.10.tid +++ b/editions/prerelease/tiddlers/Release 5.1.10.tid @@ -44,6 +44,18 @@ Limited support for tiddlers stored in external `.tid` files: See [[Alice in Wonderland]] for an example. Try opening it without a network connection. +!! New "Tight" Theme + +A new theme called "Tight" uses reduced padding, margins and font-sizes to pack as much text as possible: + +<$button> +<$action-setfield $tiddler="$:/theme" text="$:/themes/tiddlywiki/tight"/> +Try it out + <$button> +<$action-setfield $tiddler="$:/theme" text="$:/themes/tiddlywiki/snowwhite"/> +Revert + + ! Other Improvements !! Translation Improvements diff --git a/themes/tiddlywiki/tight/base.tid b/themes/tiddlywiki/tight/base.tid index 1600f7898..62ec25541 100644 --- a/themes/tiddlywiki/tight/base.tid +++ b/themes/tiddlywiki/tight/base.tid @@ -54,22 +54,41 @@ tags: [[$:/tags/Stylesheet]] html body.tc-body .tc-tiddler-frame .tc-tiddler-body h1 { font-size: 1.5em; - font-weight: 700; + font-weight: 500; } html body.tc-body .tc-tiddler-frame .tc-tiddler-body h2 { font-size: 1.3em; - font-weight: 700; + font-weight: 500; } html body.tc-body .tc-tiddler-frame .tc-tiddler-body h3 { font-size: 1.2em; - font-weight: 700; + font-weight: 500; } html body.tc-body .tc-tiddler-frame .tc-tiddler-body h4 { font-size: 1.1em; - font-weight: 700; + font-weight: 500; + } + + html body.tc-body .tc-tiddler-frame .tc-improvement-banner { + margin-right: -15px; + margin-left: -10px; + } + + html body.tc-body .tc-tiddler-frame .tc-tiddler-info { + margin: 0 -13px 0 -13px; + } + + html body.tc-body .tc-tiddler-frame .tc-fold-banner { + width: 13px; + margin-left: -15px; + } + + html body.tc-body .tc-tiddler-frame .tc-unfold-banner { + margin-left: -13px; + margin-top: -4px; } } From 85553609b10ccc813662c867d4043e5df78efcec Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 12 Oct 2015 17:54:51 +0100 Subject: [PATCH 08/12] Ensure edit-text widget fixes height even if refresh isn't required Fixes #1995 --- core/modules/widgets/edit-text.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/modules/widgets/edit-text.js b/core/modules/widgets/edit-text.js index 835e0ce9d..377b7d5a5 100644 --- a/core/modules/widgets/edit-text.js +++ b/core/modules/widgets/edit-text.js @@ -185,6 +185,8 @@ EditTextWidget.prototype.refresh = function(changedTiddlers) { this.updateEditor(this.getEditInfo().value); return true; } + // Fix the height anyway in case there has been a reflow + this.fixHeight(); return false; }; From 9f6fea76070f3e5860e46bf6666aa0de11953f94 Mon Sep 17 00:00:00 2001 From: Tobias Beer Date: Tue, 13 Oct 2015 12:23:58 +0200 Subject: [PATCH 09/12] updated to point to new location --- editions/tw5.com/tiddlers/concepts/Modules.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editions/tw5.com/tiddlers/concepts/Modules.tid b/editions/tw5.com/tiddlers/concepts/Modules.tid index ce3f699f6..cc48f3a28 100644 --- a/editions/tw5.com/tiddlers/concepts/Modules.tid +++ b/editions/tw5.com/tiddlers/concepts/Modules.tid @@ -6,4 +6,4 @@ type: text/vnd.tiddlywiki A //module// in TiddlyWiki5 is a tiddler containing executable JavaScript, of the type `application/javascript` and with the field `module-type` set to the ModuleType of the module. -See the ''Internals'' tab of the [[control panel|$:/ControlPanel]] for lists of the currently loaded modules. +See [[ControlPanel|$:/ControlPanel]] > ''Info'' > ''Advanced'' > ''Loaded Modules'' for a list of currently loaded modules. From 33563d01baed4b4092fc834eb6a1df55e1671418 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 14 Oct 2015 10:59:46 +0100 Subject: [PATCH 10/12] Add user interface for enabling performance instrumentation --- core/language/en-GB/ControlPanel.multids | 3 +++ core/modules/startup/startup.js | 4 ++-- core/modules/utils/performance.js | 4 ++-- .../ControlPanel/Settings/PerformanceInstrumentation.tid | 8 ++++++++ core/wiki/config/PerformanceInstrumentation.tid | 2 ++ 5 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 core/ui/ControlPanel/Settings/PerformanceInstrumentation.tid create mode 100644 core/wiki/config/PerformanceInstrumentation.tid diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids index fa3dcef8c..7a0e61434 100644 --- a/core/language/en-GB/ControlPanel.multids +++ b/core/language/en-GB/ControlPanel.multids @@ -90,6 +90,9 @@ Settings/NavigationHistory/Caption: Navigation History Settings/NavigationHistory/Hint: Update browser history when navigating to a tiddler: Settings/NavigationHistory/No/Description: Do not update history Settings/NavigationHistory/Yes/Description: Update history +Settings/PerformanceInstrumentation/Caption: Performance Instrumentation +Settings/PerformanceInstrumentation/Hint: Displays performance statistics in the browser developer console. Requires reload to take effect +Settings/PerformanceInstrumentation/Description: Enable performance instrumentation Settings/ToolbarButtonStyle/Caption: Toolbar Button Style Settings/ToolbarButtonStyle/Hint: Choose the style for toolbar buttons: Settings/ToolbarButtonStyle/Styles/Borderless: Borderless diff --git a/core/modules/startup/startup.js b/core/modules/startup/startup.js index 6bdb2e9a9..08f9641e3 100755 --- a/core/modules/startup/startup.js +++ b/core/modules/startup/startup.js @@ -18,7 +18,7 @@ exports.after = ["load-modules"]; exports.synchronous = true; // Set to `true` to enable performance instrumentation -var PERFORMANCE_INSTRUMENTATION = false; +var PERFORMANCE_INSTRUMENTATION_CONFIG_TITLE = "$:/config/Performance/Instrumentation"; var widget = require("$:/core/modules/widgets/widget.js"); @@ -29,7 +29,7 @@ exports.startup = function() { } $tw.version = $tw.utils.extractVersionInfo(); // Set up the performance framework - $tw.perf = new $tw.Performance(PERFORMANCE_INSTRUMENTATION); + $tw.perf = new $tw.Performance($tw.wiki.getTiddlerText(PERFORMANCE_INSTRUMENTATION_CONFIG_TITLE,"no") === "yes"); // Kick off the language manager and switcher $tw.language = new $tw.Language(); $tw.languageSwitcher = new $tw.PluginSwitcher({ diff --git a/core/modules/utils/performance.js b/core/modules/utils/performance.js index c8896c27e..3e7acfac3 100644 --- a/core/modules/utils/performance.js +++ b/core/modules/utils/performance.js @@ -28,9 +28,9 @@ Performance.prototype.report = function(name,fn) { self.measures = {}; var startTime = $tw.utils.timer(), result = fn.apply(this,arguments); - self.logger.log(name + ": " + $tw.utils.timer(startTime) + "ms"); + self.logger.log(name + ": " + $tw.utils.timer(startTime).toFixed(2) + "ms"); for(var m in self.measures) { - self.logger.log("+" + m + ": " + self.measures[m] + "ms"); + self.logger.log("+" + m + ": " + self.measures[m].toFixed(2) + "ms"); } return result; }; diff --git a/core/ui/ControlPanel/Settings/PerformanceInstrumentation.tid b/core/ui/ControlPanel/Settings/PerformanceInstrumentation.tid new file mode 100644 index 000000000..b3d1d9763 --- /dev/null +++ b/core/ui/ControlPanel/Settings/PerformanceInstrumentation.tid @@ -0,0 +1,8 @@ +title: $:/core/ui/ControlPanel/Settings/PerformanceInstrumentation +tags: $:/tags/ControlPanel/Settings +caption: {{$:/language/ControlPanel/Settings/PerformanceInstrumentation/Caption}} + +\define lingo-base() $:/language/ControlPanel/Settings/PerformanceInstrumentation/ +<> + +<$checkbox tiddler="$:/config/Performance/Instrumentation" field="text" checked="yes" unchecked="no" default="no"> <$link to="$:/config/Performance/Instrumentation"><> diff --git a/core/wiki/config/PerformanceInstrumentation.tid b/core/wiki/config/PerformanceInstrumentation.tid new file mode 100644 index 000000000..e4220f287 --- /dev/null +++ b/core/wiki/config/PerformanceInstrumentation.tid @@ -0,0 +1,2 @@ +title: $:/config/Performance/Instrumentation +text: yes From e31abf89ac1ec1e8f33af766aea17b3ec69047b4 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 14 Oct 2015 12:01:35 +0100 Subject: [PATCH 11/12] Fix accidental commit of wrong default performance instrumentation setting --- core/wiki/config/PerformanceInstrumentation.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/wiki/config/PerformanceInstrumentation.tid b/core/wiki/config/PerformanceInstrumentation.tid index e4220f287..ccae6842e 100644 --- a/core/wiki/config/PerformanceInstrumentation.tid +++ b/core/wiki/config/PerformanceInstrumentation.tid @@ -1,2 +1,2 @@ title: $:/config/Performance/Instrumentation -text: yes +text: no From fe1b3189876fa15c60af785053f6a96d1304989b Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 14 Oct 2015 12:01:40 +0100 Subject: [PATCH 12/12] Release note updates --- editions/prerelease/tiddlers/Release 5.1.10.tid | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/editions/prerelease/tiddlers/Release 5.1.10.tid b/editions/prerelease/tiddlers/Release 5.1.10.tid index fd14f7036..af1488fb2 100644 --- a/editions/prerelease/tiddlers/Release 5.1.10.tid +++ b/editions/prerelease/tiddlers/Release 5.1.10.tid @@ -20,6 +20,8 @@ This release includes several low-level performance optimisations that should im * [[Caching data tiddlers|https://github.com/Jermolene/TiddlyWiki5/commit/32f6d7f1b01474b82debcbdd5d76c49c59303265]] * [[Removed expensive visual effects|https://github.com/Jermolene/TiddlyWiki5/commit/4f5cf4597abb08af787b62c2e2ee1b8c667dad1e]] +There is a new setting in the control panel to enable performance instrumentation, making it much easier to measure and improve performance issues. + !! Résumé Builder Edition The new [[Résumé Builder Edition]] by @inmysocks is a custom edition to guide you through the process of using TiddlyWiki to create a good looking résumé (or curriculum vitæ). @@ -90,6 +92,7 @@ Revert * [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/fd997c45814e6bb5b576137bf62bad5575b0a28c]] the ActionSetFieldWidget to enable it to be used to delete a field or indexed property * [[Made|https://github.com/Jermolene/TiddlyWiki5/commit/746aab2cf6bbe3c1905efd5caf80e40e23b914b0]] the tw5.com documentation available as a plugin and an edition, simplifying some scenarios for re-using it * [[Improved|https://github.com/Jermolene/TiddlyWiki5/commit/0035a0046315ee0203b1adfb75efdbb0e854a7f6]] rendering of "More" sidebar tab gradients in the "Snow White" theme +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/33563d01baed4b4092fc834eb6a1df55e1671418]] option in [[control panel|$:/ControlPanel]] to enable the display of detailed performance instrumentation in the browser developer console !! Bug Fixes @@ -97,6 +100,10 @@ Revert * [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/3fbf29093b32c00941b0c03951250de7c0cc8d6f]] problem with invisible icons in $:/AdvancedSearch * [[Improved|https://github.com/Jermolene/TiddlyWiki5/commit/862e358b57fde74595420e7948bf44fdadf690dc]] check for required plugins in ServerCommand * [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/709126dd643207adab725569c214f8617c28fbeb]] problem with queueing change events for deleting non-existent tiddlers +* [[Ensure|https://github.com/Jermolene/TiddlyWiki5/commit/85553609b10ccc813662c867d4043e5df78efcec]] EditTextWidget fixes height even if refresh isn't required +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/8a763e9d838fcb571d12c4175952cd4e15e95e00]] the gradient on the sidebar tabs divider +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/6add992bf2e9cedd077c74c3471758bbe9d6e1b2]] problem with tiddler titles such as `$:/templates/something` being erroneously classed as `$:/temp` tiddlers, and so excluded from syncing +* [[Switched|https://github.com/Jermolene/TiddlyWiki5/commit/acbf87657b6c88719148266100b91a61e29a0546]] to absolute date format in tiddler subtitles !! Node.js Improvements