1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 10:29:54 +00:00

Merge branch 'master' into zh

This commit is contained in:
Bram Chen 2015-10-14 20:40:26 +08:00
commit 7609bcdf0e
27 changed files with 190 additions and 20 deletions

View File

@ -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

View File

@ -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({

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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/
<<lingo Hint>>
<$checkbox tiddler="$:/config/Performance/Instrumentation" field="text" checked="yes" unchecked="no" default="no"> <$link to="$:/config/Performance/Instrumentation"><<lingo Description>></$link> </$checkbox>

View File

@ -0,0 +1,2 @@
title: $:/config/Performance/Instrumentation
text: no

View File

@ -1,3 +1,3 @@
title: $:/config/SaverFilter
[all[]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[[$:/UploadName]] -[prefix[$:/state]] -[prefix[$:/temp]]
[all[]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[[$:/UploadName]] -[prefix[$:/state/]] -[prefix[$:/temp/]]

View File

@ -1,3 +1,3 @@
title: $:/config/SyncFilter
[is[tiddler]] -[[$:/HistoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[prefix[$:/status]] -[prefix[$:/state]] -[prefix[$:/temp]]
[is[tiddler]] -[[$:/HistoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[prefix[$:/status/]] -[prefix[$:/state/]] -[prefix[$:/temp/]]

View File

@ -13,6 +13,7 @@
"tiddlywiki/starlight",
"tiddlywiki/seamless",
"tiddlywiki/centralised",
"tiddlywiki/tight",
"tiddlywiki/readonly"
],
"languages": [

View File

@ -45,6 +45,7 @@
],
"themes": [
"tiddlywiki/centralised",
"tiddlywiki/tight",
"tiddlywiki/readonly",
"tiddlywiki/seamless",
"tiddlywiki/snowwhite",

View File

@ -13,6 +13,7 @@
"tiddlywiki/starlight",
"tiddlywiki/seamless",
"tiddlywiki/centralised",
"tiddlywiki/tight",
"tiddlywiki/readonly"
],
"languages": [

View File

@ -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æ).
@ -44,6 +46,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> <$button>
<$action-setfield $tiddler="$:/theme" text="$:/themes/tiddlywiki/snowwhite"/>
Revert
</$button>
! Other Improvements
!! Translation Improvements
@ -78,6 +92,7 @@ See [[Alice in Wonderland]] for an example. Try opening it without a network con
* [[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 <a href="editions/tw5.com-docs/index.html" target="_blank">edition</a>, 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
@ -85,6 +100,10 @@ See [[Alice in Wonderland]] for an example. Try opening it without a network con
* [[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

View File

@ -15,6 +15,7 @@
"tiddlywiki/nighttime",
"tiddlywiki/starlight",
"tiddlywiki/seamless",
"tiddlywiki/tight",
"tiddlywiki/centralised",
"tiddlywiki/readonly"
],

View File

@ -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]]

View File

@ -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.

View File

@ -13,6 +13,7 @@
"tiddlywiki/starlight",
"tiddlywiki/seamless",
"tiddlywiki/centralised",
"tiddlywiki/tight",
"tiddlywiki/readonly"
],
"languages": [

View File

@ -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]

View File

@ -1,11 +1,7 @@
title: $:/plugins/tiddlywiki/text-slicer/templates/static/document
`<div class="tc-output-document">`
<$set name="tv-exclude-filter" value={{!!toc-exclude-filter}}>
<$list filter="[list<currentTiddler>!has[draft.of]]" template="$:/plugins/tiddlywiki/text-slicer/templates/static/tiddler"/>
</$set>
`</div>`

View File

@ -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"/>

View File

@ -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"/> </$list>

View File

@ -1,3 +1,13 @@
title: $:/plugins/tiddlywiki/text-slicer/templates/static/image
`<img src="data:`<$view format="text" field="type"/>`;base64,`<$view format="text" field="text"/>`">`
<$reveal state="!!_canonical_uri" type="match" text="">
`<img src="data:`<$view format="text" field="type"/>`;base64,`<$view format="text" field="text"/>`" class="`{{||$:/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes}}`">`
</$reveal>
<$reveal state="!!_canonical_uri" type="nomatch" text="">
`<img src="`<$text text=<<tv-external-image-path>>/><$view field="title" format="doubleurlencoded"/>`" class="`{{||$:/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes}}`">`
</$reveal>

View File

@ -1,6 +1,6 @@
title: $:/plugins/tiddlywiki/text-slicer/templates/static/item
`<li>`
`<li class="`{{||$:/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes}}`">`
<$transclude/>

View File

@ -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"/>

View File

@ -2,7 +2,7 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/static/paragraph
<$list filter="""[all[current]] $(tv-exclude-filter)$ +[limit[1]]""" variable="item">
`<p>`
`<p class="`{{||$:/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes}}`">`
<$view field="text" format="htmlencodedplainwikified"/>

View File

@ -85,7 +85,7 @@ canvas.tc-edit-bitmapeditor {
.tc-sidebar-lists .tc-tab-set .tc-tab-divider {
border-top: none;
height: 1px;
<<background-linear-gradient "left, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.0) 350px">>
<<background-linear-gradient "left, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.0) 100%">>
}
.tc-more-sidebar .tc-tab-buttons button {

View File

@ -0,0 +1,94 @@
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: 500;
}
html body.tc-body .tc-tiddler-frame .tc-tiddler-body h2 {
font-size: 1.3em;
font-weight: 500;
}
html body.tc-body .tc-tiddler-frame .tc-tiddler-body h3 {
font-size: 1.2em;
font-weight: 500;
}
html body.tc-body .tc-tiddler-frame .tc-tiddler-body h4 {
font-size: 1.1em;
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;
}
}

View File

@ -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"]
}