This page is part of a static HTML representation of the TiddlyWiki at https://tiddlywiki.com/

Release 5.2.0

3 octobre 2021 à 15h15

See GitHub for detailed change history of this release

Congratulations to Frank. B for his winning design for the banner for this release (here are the other entries).

Highlights

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. 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 has become possible because every other part of TiddlyWiki was already capable of dealing with unrestricted field names apart from saving as an HTML file.

Secondly, external tools that read, write or otherwise process TiddlyWiki HTML files will need modification to understand the new store area format. The details are documented in the /dev wiki.

For more details, see ticket #5708 on GitHub.

Dragging and Dropping Images into the Editor

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.

  • ajouté (and again here) ability to drag and drop images directly in the editor

Simplified Access to Tiddler Title with ActionCreateTiddlerWidget

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
</$button>

For more details:

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

Optimised Refreshing of Transclusions

This simple-sounding change has several important consequences:

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.

As sometimes happens, the third consequence is that constructions that relied on the old, buggy behaviour may no longer work as expected. A common example of such a construction is an invocation of a JavaScript macro. The problem stems from the fact that JavaScript macros are designed to be as simple as possible from the developers perspective, being pure functions that have no side effects, and that always return the same value for the same parameters. In particular, JavaScript macros cannot participate in TiddlyWiki's refresh mechansim, so they cannot force themselves to be updated when underlying data changes (for situations where such processing is needed, JavaScript widgets should be used instead of JavaScript macros).

However, developers have sometimes worked around this limitation by using the TranscludeWidget to force refreshing of a macro invocation when a particular tiddler changes. The newer, more selective behaviour means that sometimes such widgets will avoid a refresh that was previously relied upon to update the JavaScript macro.

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.

  • amélioré the TranscludeWidget to avoid triggering a refresh unless the transcluded field changes (previously it was also triggered for changes to other fields)

Other Notable Improvements

étendu (and here) the ListWidget with an optional counter attribute specifying a variable to contain the numeric index of each list item. This is useful for creating a list of numbered items, and for detecting the first and last entries in a list

étendu action widget execution with an optional new mode that ensures that all widgets are refreshed before invocation – see ActionWidget Execution Modes. This resolves a long-standing inconsistency in the way that ActionWidgets are executed, making them behave much more like a conventional programming language

amélioré the HTML comment syntax to enable it to be used before and in between pragmas such as macro definitions. This makes it much easier to provide documentation within complex wikitext tiddlers

corrigé size of dropzone when story river is empty. For a long time, TiddlyWiki confusingly wouldn't recognise a drag and drop operation if the story river was empty

Performance Improvements

Usability Improvements

  • corrigé ability to import previously blocked system tiddlers
  • amélioré warning message when cancelling a pending import
  • mis à jour the default font weights in the "Snow White" theme to be thicker and more legible
  • corrigé modal mechanism to prevent page from scrolling while modals are displayed
  • corrigé fill colour for "remove tag" button
  • corrigé page title so that the separating em-dash is only used if the site subtitle is present
  • corrigé broken aria-label in $:/PaletteManager
  • mis à jour SVG optimiser script
  • ajouté plus/minus SVG icons: and
  • ajouté link to the existing tiddler when the warning "Target tiddler already exists" is displayed in the edit template
  • ajouté class to make tag pills in the edit template look like those in the ViewTemplate
  • corrigé overflow of long field values that do not contain whitespace
  • amélioré GitHub, Gitea and GitLab savers to wikify the commit message, enabling macros to be used in the message
  • amélioré the text editor stamp toolbar button dropdown to allow sorting by drag and drop

Widget Improvements

Filter improvements

Hackability Improvements

Client-server Improvements

Node.js Improvements

Plugin Improvements

Markdown Plugin

XLSX Utilities Plugin

  • corrigé crash with the XLSX Utils plugin

KaTeX Plugin

Freelinks Plugin

  • étendu the Freelinks plugin with a filter to determine which tiddlers can be the targets of freelinks

Menubar Plugin

  • corrigé Menu plugin to support optional dropdown-position field

BibTeX Plugin

Developer Experience Improvements

  • amélioré the widget subclassing mechanism to work with widgets that add event listeners in their constructor
  • amélioré the Jasmine test suite output
  • étendu wikitext parser with a subclassing mechanism
  • ajouté added support for utils-browser modules
  • ajouté th-before-importing hook to allow plugins to inspect or modify the importTiddler object before any tiddlers are imported
  • ajouté th-closing-tiddler hook when tiddlers are closed

Translation improvements

Other Bug Fixes

  • corrigé crash with malformed input to decodeURIComponent()
  • corrigé issue with lookup Operator returning "undefined" under some circumstances
  • corrigé crash with unterminated wikitext comments
  • corrigé tiddler info area content bleeding on close animation
  • corrigé inline/block widget parsing glitch
  • corrigé runaway regexp when parsing filters
  • corrigé right margin of tag pill when used outside of the tags wrapper
  • étendu upload saver to optionally work without a username or password
  • corrigé RadioWidget to refresh selectively, and to use the checked attribute correctly
  • corrigé "invert" option of wiki.search() method
  • corrigé ES5 compatibility issue
  • corrigé exporting of tiddlers that begin and end with double quotes
  • amélioré accessibility of button widget when controlling a popup
  • corrigé EditTextWidget to use default text for missing fields
  • corrigé css-escape-polyfill to work under Node.js
  • corrigé (and here) crash when sorting by non-string fields
  • corrigé (and here) some bugs in the EventCatcherWidget, introduced new stopPropagation attribute and new syntax for specifying actions
  • corrigé CurrentTiddler variable consistency in subfilters and prefixes
  • corrigé crash when accessing variables in filters that don't have a widget context
  • corrigé unnecessary triggering of reload warning when JavaScript tiddlers are not subsequently imported
  • corrigé minor issue with import pragma
  • corrigé leading and trailing whitespace in themes
  • corrigé configuration list of HTML5 block elements
  • corrigé shape and color for disabled button to work with tc-btn-invisible class
  • corrigé inconsistent spacing of view toolbar items
  • corrigé crash when assigning new value to file input controls
  • corrigé text editor stamp button to work with prefixes and suffixes in shadow tiddlers
  • corrigé Internet Explorer crash when pasting text using an HTA
  • corrigé bug with [all[shadows]] sometimes returning overridden shadow tiddlers
  • corrigé refresh bug with radio widget where the tc-radio-selected class is not correctly updated
  • corrigé crash with reading invalid JSON files

Acknowledgements

@Jermolene would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki: