1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 17:10:29 +00:00

Release note: Emphasise more flexible parsing of macros

This commit is contained in:
jeremy@jermolene.com 2021-09-12 09:07:15 +01:00
parent 62610f0666
commit 9fae3a932b

View File

@ -15,7 +15,7 @@ type: text/vnd.tiddlywiki
!! Unrestricted Fieldnames and the New JSON Store Area
The major change in this release is that the format used to store tiddlers in TiddlyWiki's HTML file has changed from an HTML DIV-based format to a new JSON-based format. The consequences of this change are far-reaching, and justify the move from v5.1.x to v5.2.x:
The major change in this release is that the format used to store tiddlers in TiddlyWiki's HTML file has changed from an HTML DIV-based format to a new JSON-based format. The consequences of this change are far-reaching. They are thus the primary rationale for bumping the version number from v5.1.x to v5.2.0:
Firstly, the ''characters that can be used in field names are now unrestricted'' (just like tiddler titles), making it possible to use fieldnames like `My^Field` or `☃️`. This became possible because every other part of TiddlyWiki was already capable of dealing with unrestricted field names apart from saving as an HTML file.
@ -28,19 +28,17 @@ For more details, see ticket [[#5708|https://github.com/Jermolene/TiddlyWiki5/pu
It is now possible to drag and drop an image file directly into the tiddler text editor. A popup allows the incoming image tiddler to be renamed, and then `[img[title]]` is automatically inserted into the tiddler text at the insertion point.
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5699">> (and again [[here|https://github.com/Jermolene/TiddlyWiki5/pull/5705]]) ability to drag and drop images directly in the editor
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/5479">> ability to import previously blocked system tiddlers
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/5812">> warning message when cancelling a pending import
!! Simplified Access to Tiddler Title with ActionCreateTiddlerWidget
It is now possible to embed actions within the body of the ActionCreateTiddlerWidget, and those can access to the title of the newly created tidddler via the variable `createTiddler-title`, and the title of the corresponding draft in the variable `createTiddler-draftTitle`. The old `$savetitle` and `$savedrafttitle` attributes are now deprecated.
It is now possible to embed actions within the body of the ActionCreateTiddlerWidget, and those actions can directly access the title of the newly created tidddler via the variable `createTiddler-title`, and the title of the corresponding draft in the variable `createTiddler-draftTitle`. The old `$savetitle` and `$savedrafttitle` attributes are now deprecated.
```
<$button>
<$action-createtiddler $basetitle="Homemade Button" tags="$:/tags/PageControls" text={{$:/state/new-button-caption}}>
<$action-navigate $to=<<createTiddler-title>>/>
</$action-createtiddler>
Create a new non-functional page control button and open the tiddler
<$action-createtiddler $basetitle="Homemade Button" tags="$:/tags/PageControls" text={{$:/state/new-button-caption}}>
<$action-navigate $to=<<createTiddler-title>>/>
</$action-createtiddler>
Create a new non-functional page control button and open the tiddler
</$button>
```
@ -48,12 +46,29 @@ For more details:
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/commit/9faaa312998d48c56bd50335820b6b881266af4b">> [[ActionCreateTiddlerWidget]] to make the new title available as a variable
!! More Flexible Parsing of Macros
Two long-standing limitations of TiddlyWiki's macro syntax have been resolved.
First, it is now possible to nest macro calls within the parameters to other macros. For example:
```
<<mymacro arg:"""nested <<macro>> call""">>
```
Second, macro parameters can now be used within filter expressions. For example:
```
[<qualify "$:/state/mydata">addsuffix[-]addsuffix<now "YYYY MM DDD hh:mm:ss">]
```
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/5451">> macro calls to use the same parser as that used for widget attributes
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5836">> support for macro parameters within filters (see [[Filter Parameter]])
!! Optimised Refreshing of Transclusions
This simple-sounding change has several important consequences:
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/5736">> the TranscludeWidget to avoid triggering a refresh unless the transcluded field changes (previously it was also triggered for changes to other fields).
The first consequence is that it makes the TranscludeWidget much more efficient, and improves the performance of the refresh cycle.
The second consequence resolves a long-standing difficulty for many users: it is now possible to use an EditWidget to edit another field of the same tiddler. Previously, the edit widget would not work properly in such cases because it would be refreshed on every keypress, leading to the current editing caret/selection position being lost.
@ -64,6 +79,8 @@ However, developers have sometimes worked around this limitation by using the Tr
For end users, if an upgrade to v5.2.0 causes problems then consult the discussion [[Forums]] to see if other users have encountered the same problem, and make a new posting if needed.
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/5736">> the TranscludeWidget to avoid triggering a refresh unless the transcluded field changes (previously it was also triggered for changes to other fields)
! Performance Improvements
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/5380">> (and again [[here|https://github.com/Jermolene/TiddlyWiki5/pull/5488]]) the efficiency of the linked list implementation used in filter processing
@ -73,6 +90,8 @@ For end users, if an upgrade to v5.2.0 causes problems then consult the discussi
! Usability Improvements
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/5479">> ability to import previously blocked system tiddlers
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/5812">> warning message when cancelling a pending import
* <<.link-badge-updated "https://github.com/Jermolene/TiddlyWiki5/commit/f97850dd05693e84dd36b8af5d72b22fbfd74958">> the default fonts in the "Snow White" theme to be thicker and more legible
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/5816">> modal mechanism to prevent page from scrolling while modals are displayed
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/a360adbba924d222c5b55709133c18890c04398d">> size of dropzone when story river is empty
@ -100,12 +119,10 @@ For end users, if an upgrade to v5.2.0 causes problems then consult the discussi
! Hackability Improvements
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/commit/3094e062366830bdecfb91e3d852667fa951dc50">> action widget execution to ensure all widgets are refreshed before invocation
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5836">> support for macro parameters within filters (see [[Filter Parameter]])
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/5361">> [[unusedtitle Macro]] to add ''separator'' and ''template'' parameters
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5720">> ''color-scheme'' field to all themes to differentiate between light and dark themes
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/commit/d25e540dd2f0decf61c52fdc665a28a5dfeda93f">> support for `image/vnd.microsoft.icon` content type
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5458">> support for throttling refreshes for changed tiddlers with the title prefix $:/temp/volatile/
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/5451">> macro calls to use the same parser as that used for widget attributes
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/commit/89546b3357b0696a7047e6915bd6cd137b589de6">> a hidden setting to control sandboxing of tiddlers of type `text/html`
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5707">> text operation [[insert-text|WidgetMessage: tm-edit-text-operation]]
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/commit/e157d16b724172f752da0ff714847e0c0ca9664d">> ''data-tag-title'' attribute to tag pills