See GitHub for detailed change history of this release
Congratulations to catter-fly for their winning design for the banner for this release (here is the competition thread).
Major Improvements
Conditional Shortcut Syntax
added a new shortcut syntax for concisely expressing if-then-else logic. This is the first of a new type of wikitext syntax based on tokens delimited with <%
and %>
. We plan to introduce other structures using the same format such as a "case" statement.
These new token-based shortcuts allow a richer structure and expressivity than existing features such as widgets or pragmas. For example:
<% if [<animal>match[Elephant]] %>
It is an elephant
<% elseif [<animal>match[Giraffe]] %>
It is a giraffe
<% else %>
It is completely unknown
<% endif %>
Behind the scenes, the conditional shortcut syntax is rendered as the equivalent ListWidgets.
Explicit Templates for the ListWidget
added support for <$list-template>
and <$list-empty>
as immediate children of the $ListWidget
widget to specify the list item template and/or the empty template.
This new feature is designed to replace a common pattern of using the emptyMessage
attribute of the ListWidget to render complex wikitext that thus has to be quoted. Working with wikitext within quotes is awkward and error prone. The new structure can be somewhat faster because it allows the empty message to be parsed in advanced of rendering.
For example:
<$list filter=<<filter>>>
<$list-template>
<$text text=<<currentTiddler>>/>
</$list-template>
<$list-empty>
None!
</$list-empty>
</$list>
Note that the emptyMessage
and template
attributes take precedence if they are present.
Joiners for the ListWidget
added a join
attribute to the $ListWidget
widget to insert a short piece of text between list items. This is both easier to use and faster than using the counter
attribute for the same purpose. So if your list looked like this:
<$list filter=<<filter>> counter="counter" variable="item">
<$text text=<<item>>/><$list filter="[<counter-last>match[no]]" variable="ignore"><$text text=", "/></$list>
</$list>
You can replace it with:
<$list filter=<<filter>> variable="item" join=", "><$text text=<<item>>/></$list>
If the joiner text that you need is long and awkward to write in an attribute, you can use the new <$list-join>
widget. Like <$list-template>
and <$list-empty>
, it must be an immediate child of the $ListWidget
:
<$list filter=<<filter>> variable="item"><$text text=<<item>>/><$list-join>, and <em>also</em> let's not forget </$list-join></$list>
jsonset operator
added jsonset Operator for setting values within JSON objects
QR Code Reader
extended QR Code plugin to be able to read QR codes and a number of other bar code formats
Translation improvements
Improvements to the following translations:
- Chinese
- Polish
- Spanish
Plugin Improvements
- fixed Comments Plugin to use predefined palette colours
- improved Evernote Importer Plugin to support images and other attachments
- added
$floating
attribute to Dynannotate Plugin to support popups that do not disappear when another part of the screen is clicked. Instead they have to dismissed manually
Widget Improvements
- fixed ImageWidget encoding for more image types
- extended ImageWidget to add a "usemap" attribute
- improved the ScrollableWidget to allow the scroll position to be bound to a tiddler, so that changes to the tiddler affect the scroll position, and vice versa
Usability Improvements
- updated editor preview button to automatically focus the editor
- improved file type names in the export menu
Hackability Improvements
- extended all the relevant core widgets to allow arbitrary
data-*
attributes andstyle.*
attributes to be applied to the generated DOM nodes. This is useful for passing data to the EventCatcherWidget - extended jsonextract Operator, jsonget Operator, jsonset Operator and jsontype Operator to allow negative indexes into arrays to be counted from the end of the array
- improved the default page layout to better support CSS grid and flexbox layouts
- improved the editor to use grid layout, simplifying customisation
Bug Fixes
- fixed ordering of Vanilla stylesheets
- fixed missing closing tag in tag-pill-inner macro
- removed invalid "type" attribute from textarea elements generated by the EditTextWidget
- fixed editor "type" dropdown state tiddlers
- fixed handling of "counter-last" variable when appending items with the ListWidget
- fixed upgrade download link in Firefox
- fixed refreshing of transcluded functions
- fixed resizing of height of textareas in control panel
- fixed encodebase64 Operator and decodebase64 Operator to work properly with binary data
- fixed WidgetMessage: tm-open-window when opening an existing window to bring it to the front and focus it
- fixed behaviour of last Operator when zero items selected
- fixed incorrectly setting focus on field name input field when deleting field using the delete field button
- fixed Table-of-Contents Macros to not show expander icon for a sublist that has all children excluded
- fixed overflow of CodeMirror Plugin editor within grid container
- fixed wikitest parser removing whitespace when parsing pragmas
- fixed tooltip for editor add field button
- fixed plain text parser being susceptible to the CodeBlockWidget being redefined
- fixed pragmas not working within the action string of several core macros
Node.js Improvements
- fixed a significant flaw in the synchronisation algorithm used by the client-server configuration. The flaw could lead to tiddlers temporarily disappearing from the browser
Performance Improvements
- improved performance of predefined patterns with all Operator
- updated favicon format to PNG
Developer Improvements
- improved global hook handling to support removing hooks
- added some useful npm scripts to
package.json
Infrastructure Improvements
- improved Continuous Integration tests to use Playwright to run our browser-based tests
- added an automatic build of the external core TiddlyWiki at https://tiddlywiki.com/empty-external-core.html
Acknowledgements
@Jermolene would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki: