1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-02-21 17:39:51 +00:00

Compare commits

...

7 Commits

Author SHA1 Message Date
Jeremy Ruston
bfaa8f30bd Tweak headline changenotes 2026-02-20 11:55:11 +00:00
Jeremy Ruston
48626ceded Fix release note category search 2026-02-20 11:34:33 +00:00
Jeremy Ruston
6f31d3e7d6 Search change notes and impacts 2026-02-20 11:30:12 +00:00
Jeremy Ruston
9d53e9b875 Remove #8702 changes/impacts 2026-02-20 10:20:38 +00:00
Jeremy Ruston
5e37367aa4 Simplify summary tab 2026-02-20 10:13:41 +00:00
Jeremy Ruston
2db71cd14f Tweak release note tabs 2026-02-20 10:02:51 +00:00
Jeremy Ruston
037ad2d0da Tweak some changenotes 2026-02-20 10:02:37 +00:00
12 changed files with 98 additions and 157 deletions

View File

@@ -1,5 +1,5 @@
title: $:/changenotes/5.4.0/#8258 title: $:/changenotes/5.4.0/#8258
description: Add ability to serialize WikiText AST nodes back to wikitext strings description: Core plugin to serialize syntax trees back to strings
tags: $:/tags/ChangeNote tags: $:/tags/ChangeNote
release: 5.4.0 release: 5.4.0
change-type: feature change-type: feature
@@ -7,32 +7,8 @@ change-category: developer
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/8258 github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/8258
github-contributors: linonetwo github-contributors: linonetwo
This PR introduces a new utility `$tw.utils.serializeWikitextParseTree()` that can convert WikiText Abstract Syntax Tree (AST) nodes back into wikitext strings. This is an internal change that will only be of direct interest to plugin developers but will form the basis of future user-facing features. For example:
There is also a utility `serializeAttribute` for a single attribute node, like an attribute of a widget. * Programmatically manipulating wikitext content by modifying the syntax tree and deserializing it back to wikitext
!! Use Cases
* Programmatically manipulating wikitext content by modifying the AST, and use this to write it back
* Building WYSIWYG editors * Building WYSIWYG editors
* Creating wikitext formatters and linters * Creating WikiText formatters and linters
!! Implementation
* New core plugin `tiddlywiki/wikitext-serialize` containing most of the logic
* Separate serialize handlers for each WikiText rule as `module-type: wikiruleserializer`
* Test suite with tag `$:/tags/wikitext-serialize-test-spec`
* It uses each parser's name as rule (`nextMatch.rule.name`), each AST node that needs serialization has a `type` property matching the rule name
** HTML tags and widgets are handled by the `html` serializer
!! Example Usage
```javascript
// Parse a tiddler's wikitext to AST
var parseTree = $tw.wiki.parseTiddler("MyTiddler").tree;
// Serialize AST back to wikitext string
var wikitextString = $tw.utils.serializeWikitextParseTree(parseTree).trimEnd();
```
This feature offers new tools for JS plugin developers. It is not a user-facing change.

View File

@@ -1,8 +0,0 @@
title: $:/changenotes/5.4.0/#8702/impacts/darkmode-info-tiddler
changenote: $:/changenotes/5.4.0/#8702
created: 20250901000000000
modified: 20250901000000000
tags: $:/tags/ImpactNote
description: `$:/info/darkmode` has been superseded by `$:/info/browser/darkmode`
impact-type: deprecation

View File

@@ -1,9 +0,0 @@
title: $:/changenotes/5.4.0/#8702/impacts/palette-pluginisation
changenote: $:/changenotes/5.4.0/#8702
created: 20250901000000000
modified: 20250901000000000
tags: $:/tags/ImpactNote
description: Existing colour palettes have been moved to a new "palettes-legacy" plugin
impact-type: pluginisation
Add the plugin to your wiki in order to continue using the legacy palettes.

View File

@@ -1,27 +0,0 @@
title: $:/changenotes/5.4.0/#8702
description: Colour handling improvements
release: 5.4.0-disabled because this PR is not yet merged
tags: $:/tags/ChangeNote
change-type: enhancement
change-category: hackability
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/8702
github-contributors: Jermolene
This PR brings several new features for end users:
* Automatically switching between a dark and light palette as the operating system setting changes (and to do so without making the wiki dirty)
* Customisation options for palettes. For example, users might choose a base hue, with the colours of the palette automatically adapting to it
* A generalisation of the dark vs. light mechanism to allow an arbitrary number of distinct schemes that are dynamically selected. For example, a palette that has a different scheme for night, morning, day and evening that automatically change with the time of day
There are also new capabilities for palette authors:
* Inheritance for palettes, making it easy to create chains of variants of a base palette
* Self contained palettes that can contain both dark and light variants (or variants for any other custom scheme)
To make all of these new features possible, this PR also includes some useful new general purpose mechanisms and features:
* Background actions that are triggered whenever there is a change to the results of a specified filter
* Several new filter operators for manipulating colour values. The underlying functionality comes from the [[color.js|https://colorjs.io/]] library
* New media query tracking mechanism that can track the results of any CSS media query (not just dark mode), storing the results in a shadow `$:/info/...` tiddler
* New `changecount` filter operator
* New `:apply` filter run prefix (to be replaced by the `:let` filter run prefix in [[#8972|https://github.com/TiddlyWiki/TiddlyWiki5/pull/8972]]))

View File

@@ -7,36 +7,19 @@ change-category: hackability
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9055 github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9055
github-contributors: Jermolene github-contributors: Jermolene
This PR extends the handling of macro/procedure/function made via the `<<..>>` syntax to allow parameters to be specified dynamically instead of just as static strings. To indicate the new syntax the colon that usually separates a parameter name from its value is replaced by an equals sign. This PR extends the handling of macro/procedure/function invocationsmade via the `<<..>>` shortcut syntax to allow dynamic parameters instead of just static strings. To indicate the new syntax the colon that usually separates a parameter name from its value is replaced by an equals sign. For example:
For example, by it is now possible to do things like this:
``` ```
<<mymacro param={{Something}}>> <<mymacro param={{Something}}>>
```
Or even this:
```
<div class=<<mymacro param={{Something}}>>> <div class=<<mymacro param={{Something}}>>>
```
Or this:
```
<div class=<<mymacro param={{{ [<myvar>addprefix[https:] }}}>>> <div class=<<mymacro param={{{ [<myvar>addprefix[https:] }}}>>>
```
Parameters can also be specified for the inner call:
```
<div class=<<mymacro param={{{ [<innermacro p={{Something}}>addprefix[https:] }}}>>> <div class=<<mymacro param={{{ [<innermacro p={{Something}}>addprefix[https:] }}}>>>
``` ```
The extended syntax can be used in three different settings: The extended syntax allows parameter values to be passed as transclusions, filter expressions or nested invocations in three settings:
* As a standalone construction * As a standalone construction
* As a widget attribute value * As a widget attribute value
* As a filter operand value * As a filter operand value
In all cases, it is now possible to use an equals sign instead of a colon to allow parameter values to be passed as a transclusion, filter expression or nested call. See [[Calls]] for more details and examples.

View File

@@ -3,7 +3,7 @@ description: Set modal's mask-closable attribute to yes by default
release: 5.4.0 release: 5.4.0
tags: $:/tags/ChangeNote tags: $:/tags/ChangeNote
change-type: enhancement change-type: enhancement
change-category: usability change-category: hackability
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9313 github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9313
github-contributors: Leilei332 github-contributors: Leilei332

View File

@@ -1,4 +1,4 @@
change-category: usability change-category: widget
change-type: bugfix change-type: bugfix
created: 20260125195754439 created: 20260125195754439
description: Refresh widget if "default" parameter input value is changed description: Refresh widget if "default" parameter input value is changed

View File

@@ -1,11 +1,9 @@
title: $:/tw5.com/releases/info/ title: $:/tw5.com/releases/info/
category-order: translation usability hackability performance widget filters plugin theme nodejs developer internal category-order: translation usability hackability widget filters plugin theme nodejs developer internal
summary-section-order: highlights big-bug-fixes clearing-the-decks
change-type-order: feature enhancement performance bugfix deprecation security change-type-order: feature enhancement performance bugfix deprecation security
impact-type-order: compatibility-break deprecation pluginisation impact-type-order: compatibility-break deprecation pluginisation
tab-order: [[Summary]] [[Change Types]] [[Change Categories]] [[Impacts]] tab-order: [[Summary]] [[By Type]] [[By Category]] [[Impacts]]
categories/developer/singular: Developer categories/developer/singular: Developer
categories/developer/plural: Developer categories/developer/plural: Developer
categories/filters/singular: Filters categories/filters/singular: Filters
@@ -16,8 +14,6 @@ categories/internal/singular: Internal
categories/internal/plural: Internal categories/internal/plural: Internal
categories/nodejs/singular: Node.js categories/nodejs/singular: Node.js
categories/nodejs/plural: Node.js categories/nodejs/plural: Node.js
categories/performance/singular: Performance
categories/performance/plural: Performance
categories/plugin/singular: Plugin categories/plugin/singular: Plugin
categories/plugin/plural: Plugins categories/plugin/plural: Plugins
categories/theme/singular: Theme categories/theme/singular: Theme
@@ -58,10 +54,6 @@ impact-types/pluginisation/singular: Pluginisation
impact-types/pluginisation/colour/background: #ddddff impact-types/pluginisation/colour/background: #ddddff
impact-types/pluginisation/colour/foreground: #222288 impact-types/pluginisation/colour/foreground: #222288
impact-types/pluginisation/plural: Pluginisations impact-types/pluginisation/plural: Pluginisations
summary-sections/big-bug-fixes/plural: Big Bug Fixes
summary-sections/clearing-the-decks/plural: Clearing the Decks
summary-sections/highlights/plural: Highlights
summary-sections/highlights/default-state: open
categories/translation/colour: #7ec8e3 categories/translation/colour: #7ec8e3
categories/usability/colour: #f4a261 categories/usability/colour: #f4a261
categories/hackability/colour: #9b8ec4 categories/hackability/colour: #9b8ec4

View File

@@ -161,44 +161,23 @@ tags: $:/tags/Global
</$list> </$list>
\end change-note-list \end change-note-list
\procedure summary-section()
\whitespace trim
<$let
summaryState={{{ [<release>addprefix[$:/state/release/summary/]addsuffix[/]addsuffix<summary-key>] }}}
summaryDefault={{{ [[$:/tw5.com/releases/info/summary-sections/]addsuffix<summary-key>addsuffix[/default-state]get[text]] }}}
summaryListTiddler="$:/tw5.com/releases/info/summary-lists"
summaryListField={{{ [<summary-key>addsuffix[/]addsuffix<release>] }}}
>
<$let summaryFilter="[<summaryListTiddler>get<summaryListField>enlist-input[]]">
<div class="doc-release-section">
<$button class="tc-btn-invisible doc-release-section-summary">
<$macrocall $name="release-section-toggle" state=<<summaryState>> default=<<summaryDefault>>/>
<span class="doc-release-section-summary-text">
<$text text={{{ [[$:/tw5.com/releases/info/summary-sections/]addsuffix<summary-key>addsuffix[/plural]get[text]] }}} />
<$text text=" "/><span class="doc-release-section-count">(<$text text={{{ [<summaryListTiddler>get<summaryListField>enlist-input[]] +[count[]] }}}/>)</span>
</span>
</$button>
<$reveal type="match" state=<<summaryState>> text="open" default=<<summaryDefault>> tag="div" class="doc-release-section-body">
<$macrocall $name="change-note-list" filter=<<summaryFilter>>/>
</$reveal>
</div>
</$let>
</$let>
\end summary-section
\procedure summary-tab() \procedure summary-tab()
\whitespace trim \whitespace trim
<$let show-type-badge="yes" show-category-badge="yes" show-change-impacts="yes" show-tiddler-link="yes"> These are significant improvements that will benefit a broad range of users, and are recommended for everyone to explore.
<div class="doc-release-summary"> <$let show-type-badge="yes" show-category-badge="yes" show-change-impacts="yes" show-tiddler-link="yes"
<$list filter="[enlist{$:/tw5.com/releases/info/summary-section-order}]" variable="summary-key"> summaryListField={{{ [<release>addprefix[highlights/]] }}}
<div class="doc-release-summary-section"> >
<$macrocall $name="summary-section"/> <$macrocall $name="change-note-list" filter="[[$:/tw5.com/releases/info/summary-lists]get<summaryListField>enlist-input[]]"/>
</div>
</$list>
</div>
</$let> </$let>
\end summary-tab \end summary-tab
\procedure release-tab-search(stateTiddler)
\whitespace trim
<div class="doc-release-tab-search">
<$edit-text tiddler=<<stateTiddler>> tag="input" placeholder="Search..." default=""/>
</div>
\end release-tab-search
\procedure change-type-section() \procedure change-type-section()
\whitespace trim \whitespace trim
<$let changeTypeState={{{ [<release>addprefix[$:/state/release/change-type/]addsuffix[/]addsuffix<change-type>] }}}> <$let changeTypeState={{{ [<release>addprefix[$:/state/release/change-type/]addsuffix[/]addsuffix<change-type>] }}}>
@@ -223,10 +202,24 @@ tags: $:/tags/Global
\procedure change-types-tab() \procedure change-types-tab()
\whitespace trim \whitespace trim
<$let show-type-badge="no" show-category-badge="yes" show-change-impacts="yes" show-tiddler-link="yes"> <$let show-type-badge="no" show-category-badge="yes" show-change-impacts="yes" show-tiddler-link="yes"
<$list filter="[enlist{$:/tw5.com/releases/info/change-type-order}]" variable="change-type"> searchState={{{ [<release>addprefix[$:/state/release/search/change-types/]] }}}
<<change-type-section>> >
</$list> <$macrocall $name="release-tab-search" stateTiddler=<<searchState>>/>
<$let searchText={{{ [<searchState>get[text]] }}}>
<%if [<searchText>!match[]] %>
<div class="doc-release-search-count">
<$let count={{{ [tag[$:/tags/ChangeNote]] :filter[{!!release}match<release>] +[search:title,description,text,github-contributors,github-links<searchText>] +[count[]] }}}>
<$text text={{{ [<count>addsuffix[ ]] }}}/>result<$text text={{{ [<count>!match[1]then[s]] }}}/>
</$let>
</div>
<$macrocall $name="change-note-list" filter="[tag[$:/tags/ChangeNote]] :filter[{!!release}match<release>] +[search:title,description,text,github-contributors,github-links<searchText>] +[sort[description]]"/>
<%else%>
<$list filter="[enlist{$:/tw5.com/releases/info/change-type-order}]" variable="change-type">
<<change-type-section>>
</$list>
<%endif%>
</$let>
</$let> </$let>
\end change-types-tab \end change-types-tab
@@ -254,10 +247,24 @@ tags: $:/tags/Global
\procedure change-categories-tab() \procedure change-categories-tab()
\whitespace trim \whitespace trim
<$let show-type-badge="yes" show-category-badge="no" show-change-impacts="yes" show-tiddler-link="yes"> <$let show-type-badge="yes" show-category-badge="no" show-change-impacts="yes" show-tiddler-link="yes"
<$list filter="[enlist{$:/tw5.com/releases/info/category-order}]" variable="category"> searchState={{{ [<release>addprefix[$:/state/release/search/change-categories/]] }}}
<<change-category-section>> >
</$list> <$macrocall $name="release-tab-search" stateTiddler=<<searchState>>/>
<$let searchText={{{ [<searchState>get[text]] }}}>
<%if [<searchText>!match[]] %>
<div class="doc-release-search-count">
<$let count={{{ [tag[$:/tags/ChangeNote]] :filter[{!!release}match<release>] +[search:title,description,text,github-contributors,github-links<searchText>] +[count[]] }}}>
<$text text={{{ [<count>addsuffix[ ]] }}}/>result<$text text={{{ [<count>!match[1]then[s]] }}}/>
</$let>
</div>
<$macrocall $name="change-note-list" filter="[tag[$:/tags/ChangeNote]] :filter[{!!release}match<release>] +[search:title,description,text,github-contributors,github-links<searchText>] +[sort[description]]"/>
<%else%>
<$list filter="[enlist{$:/tw5.com/releases/info/category-order}]" variable="category">
<<change-category-section>>
</$list>
<%endif%>
</$let>
</$let> </$let>
\end change-categories-tab \end change-categories-tab
@@ -312,10 +319,26 @@ tags: $:/tags/Global
\procedure impacts-tab() \procedure impacts-tab()
\whitespace trim \whitespace trim
<$let show-tiddler-link="yes"> <$let show-tiddler-link="yes"
<$list filter="[enlist{$:/tw5.com/releases/info/impact-type-order}]" variable="impact-type"> searchState={{{ [<release>addprefix[$:/state/release/search/impacts/]] }}}
<<impact-type-section>> >
</$list> <$macrocall $name="release-tab-search" stateTiddler=<<searchState>>/>
<$let searchText={{{ [<searchState>get[text]] }}}>
<%if [<searchText>!match[]] %>
<div class="doc-release-search-count">
<$let count={{{ [tag[$:/tags/ImpactNote]] :filter[{!!changenote}get[release]match<release>] +[search:title,description,text<searchText>] +[count[]] }}}>
<$text text={{{ [<count>addsuffix[ ]] }}}/>result<$text text={{{ [<count>!match[1]then[s]] }}}/>
</$let>
</div>
<$list filter="[tag[$:/tags/ImpactNote]] :filter[{!!changenote}get[release]match<release>] +[search:title,description,text<searchText>] +[sort[description]]" variable="impact">
<<impact-note-item>>
</$list>
<%else%>
<$list filter="[enlist{$:/tw5.com/releases/info/impact-type-order}]" variable="impact-type">
<<impact-type-section>>
</$list>
<%endif%>
</$let>
</$let> </$let>
\end impacts-tab \end impacts-tab

View File

@@ -9,10 +9,25 @@ type: text/vnd.tiddlywiki
margin-top: 1rem; margin-top: 1rem;
} }
.doc-release-summary-section { .doc-release-tab-search {
margin-bottom: 0.75em; margin-bottom: 0.75em;
} }
.doc-release-tab-search input {
width: 100%;
padding: 0.5em;
border: 1px solid #e8e8e8;
border-radius: 0.25em;
font-size: inherit;
font-family: inherit;
}
.doc-release-search-count {
font-size: 0.85em;
color: #888;
margin-bottom: 0.5em;
}
.doc-release-section { .doc-release-section {
border: 1px solid #e8e8e8; border: 1px solid #e8e8e8;
border-radius: 0.5em; border-radius: 0.5em;

View File

@@ -1,5 +1,3 @@
title: $:/tw5.com/releases/info/summary-lists title: $:/tw5.com/releases/info/summary-lists
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
highlights/5.4.0: [[$:/changenotes/5.4.0/#9055]] [[$:/changenotes/5.4.0/#9641]] [[$:/changenotes/5.4.0/#8972]] highlights/5.4.0: [[$:/changenotes/5.4.0/#9055]] [[$:/changenotes/5.4.0/#8972]] [[$:/changenotes/5.4.0/#9641]] [[$:/changenotes/5.4.0/#8258]]
big-bug-fixes/5.4.0: [[$:/changenotes/5.4.0/#9259]]
clearing-the-decks/5.4.0:

View File

@@ -3,12 +3,10 @@ type: text/vnd.tiddlywiki
<%if [<currentTab>match[Summary]] %> <%if [<currentTab>match[Summary]] %>
<<summary-tab>> <<summary-tab>>
<%elseif [<currentTab>match[Change Types]] %> <%elseif [<currentTab>match[By Type]] %>
<<change-types-tab>> <<change-types-tab>>
<%elseif [<currentTab>match[Change Categories]] %> <%elseif [<currentTab>match[By Category]] %>
<<change-categories-tab>> <<change-categories-tab>>
<%elseif [<currentTab>match[Impacts]] %> <%elseif [<currentTab>match[Impacts]] %>
<<impacts-tab>> <<impacts-tab>>
<%elseif [<currentTab>match[Credits]] %>
<<credits-tab>>
<%endif%> <%endif%>