From 9012b00806e71c65296cc160b25cb6b7e1eb454d Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 20 Feb 2026 12:02:14 +0000 Subject: [PATCH] Search changenotes and impact notes (#9670) * Tweak some changenotes * Tweak release note tabs * Simplify summary tab * Remove #8702 changes/impacts * Search change notes and impacts * Fix release note category search * Tweak headline changenotes --- .../tiddlers/releasenotes/5.4.0/#8258.tid | 32 +---- .../5.4.0/#8702 - darkmode-info-tiddler.tid | 8 -- .../5.4.0/#8702 - palette-pluginisation.tid | 9 -- .../tiddlers/releasenotes/5.4.0/#8702.tid | 27 ----- .../tiddlers/releasenotes/5.4.0/#9055.tid | 23 +--- .../tiddlers/releasenotes/5.4.0/#9313.tid | 2 +- .../#9617 - select-widget-refresh-default.tid | 2 +- .../releasenotes/ReleasesInfo.multids | 12 +- .../releasenotes/ReleasesProcedures.tid | 113 +++++++++++------- .../tiddlers/releasenotes/ReleasesStyles.tid | 17 ++- .../releasenotes/ReleasesSummaryLists.tid | 4 +- .../releasenotes/ReleasesTabTemplate.tid | 6 +- 12 files changed, 98 insertions(+), 157 deletions(-) delete mode 100644 editions/tw5.com/tiddlers/releasenotes/5.4.0/#8702 - darkmode-info-tiddler.tid delete mode 100644 editions/tw5.com/tiddlers/releasenotes/5.4.0/#8702 - palette-pluginisation.tid delete mode 100644 editions/tw5.com/tiddlers/releasenotes/5.4.0/#8702.tid diff --git a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#8258.tid b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#8258.tid index b6de1a50d..f44a7f9eb 100644 --- a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#8258.tid +++ b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#8258.tid @@ -1,5 +1,5 @@ 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 release: 5.4.0 change-type: feature @@ -7,32 +7,8 @@ change-category: developer github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/8258 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. - -!! Use Cases - -* Programmatically manipulating wikitext content by modifying the AST, and use this to write it back +* Programmatically manipulating wikitext content by modifying the syntax tree and deserializing it back to wikitext * Building WYSIWYG editors -* 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. +* Creating WikiText formatters and linters diff --git a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#8702 - darkmode-info-tiddler.tid b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#8702 - darkmode-info-tiddler.tid deleted file mode 100644 index 748b1d66b..000000000 --- a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#8702 - darkmode-info-tiddler.tid +++ /dev/null @@ -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 - diff --git a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#8702 - palette-pluginisation.tid b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#8702 - palette-pluginisation.tid deleted file mode 100644 index 4cc7160e4..000000000 --- a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#8702 - palette-pluginisation.tid +++ /dev/null @@ -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. diff --git a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#8702.tid b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#8702.tid deleted file mode 100644 index e347213d5..000000000 --- a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#8702.tid +++ /dev/null @@ -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]])) diff --git a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9055.tid b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9055.tid index f94c897ed..03da4ccb1 100644 --- a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9055.tid +++ b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9055.tid @@ -7,36 +7,19 @@ change-category: hackability github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9055 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. - -For example, by it is now possible to do things like this: +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: ``` <> -``` - -Or even this: - -```
>> -``` - -Or this: - -```
addprefix[https:] }}}>>> -``` - -Parameters can also be specified for the inner call: - -```
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 widget attribute 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. diff --git a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9313.tid b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9313.tid index 0b928949e..798953485 100644 --- a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9313.tid +++ b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9313.tid @@ -3,7 +3,7 @@ description: Set modal's mask-closable attribute to yes by default release: 5.4.0 tags: $:/tags/ChangeNote change-type: enhancement -change-category: usability +change-category: hackability github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9313 github-contributors: Leilei332 diff --git a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9617 - select-widget-refresh-default.tid b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9617 - select-widget-refresh-default.tid index e6ec269ef..947442259 100644 --- a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9617 - select-widget-refresh-default.tid +++ b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9617 - select-widget-refresh-default.tid @@ -1,4 +1,4 @@ -change-category: usability +change-category: widget change-type: bugfix created: 20260125195754439 description: Refresh widget if "default" parameter input value is changed diff --git a/editions/tw5.com/tiddlers/releasenotes/ReleasesInfo.multids b/editions/tw5.com/tiddlers/releasenotes/ReleasesInfo.multids index c3c223c04..a595cb6e2 100644 --- a/editions/tw5.com/tiddlers/releasenotes/ReleasesInfo.multids +++ b/editions/tw5.com/tiddlers/releasenotes/ReleasesInfo.multids @@ -1,11 +1,9 @@ title: $:/tw5.com/releases/info/ -category-order: translation usability hackability performance widget filters plugin theme nodejs developer internal - -summary-section-order: highlights big-bug-fixes clearing-the-decks +category-order: translation usability hackability widget filters plugin theme nodejs developer internal change-type-order: feature enhancement performance bugfix deprecation security 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/plural: Developer categories/filters/singular: Filters @@ -16,8 +14,6 @@ categories/internal/singular: Internal categories/internal/plural: Internal categories/nodejs/singular: Node.js categories/nodejs/plural: Node.js -categories/performance/singular: Performance -categories/performance/plural: Performance categories/plugin/singular: Plugin categories/plugin/plural: Plugins categories/theme/singular: Theme @@ -58,10 +54,6 @@ impact-types/pluginisation/singular: Pluginisation impact-types/pluginisation/colour/background: #ddddff impact-types/pluginisation/colour/foreground: #222288 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/usability/colour: #f4a261 categories/hackability/colour: #9b8ec4 diff --git a/editions/tw5.com/tiddlers/releasenotes/ReleasesProcedures.tid b/editions/tw5.com/tiddlers/releasenotes/ReleasesProcedures.tid index 30f36f7aa..c6540ed54 100644 --- a/editions/tw5.com/tiddlers/releasenotes/ReleasesProcedures.tid +++ b/editions/tw5.com/tiddlers/releasenotes/ReleasesProcedures.tid @@ -161,44 +161,23 @@ tags: $:/tags/Global \end change-note-list -\procedure summary-section() -\whitespace trim -<$let - summaryState={{{ [addprefix[$:/state/release/summary/]addsuffix[/]addsuffix] }}} - summaryDefault={{{ [[$:/tw5.com/releases/info/summary-sections/]addsuffixaddsuffix[/default-state]get[text]] }}} - summaryListTiddler="$:/tw5.com/releases/info/summary-lists" - summaryListField={{{ [addsuffix[/]addsuffix] }}} -> - <$let summaryFilter="[getenlist-input[]]"> -
- <$button class="tc-btn-invisible doc-release-section-summary"> - <$macrocall $name="release-section-toggle" state=<> default=<>/> - - <$text text={{{ [[$:/tw5.com/releases/info/summary-sections/]addsuffixaddsuffix[/plural]get[text]] }}} /> - <$text text=" "/>(<$text text={{{ [getenlist-input[]] +[count[]] }}}/>) - - - <$reveal type="match" state=<> text="open" default=<> tag="div" class="doc-release-section-body"> - <$macrocall $name="change-note-list" filter=<>/> - -
- - -\end summary-section - \procedure summary-tab() \whitespace trim -<$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"> -
- <$macrocall $name="summary-section"/> -
- -
+These are significant improvements that will benefit a broad range of users, and are recommended for everyone to explore. +<$let show-type-badge="yes" show-category-badge="yes" show-change-impacts="yes" show-tiddler-link="yes" + summaryListField={{{ [addprefix[highlights/]] }}} +> +<$macrocall $name="change-note-list" filter="[[$:/tw5.com/releases/info/summary-lists]getenlist-input[]]"/> \end summary-tab +\procedure release-tab-search(stateTiddler) +\whitespace trim + +\end release-tab-search + \procedure change-type-section() \whitespace trim <$let changeTypeState={{{ [addprefix[$:/state/release/change-type/]addsuffix[/]addsuffix] }}}> @@ -223,10 +202,24 @@ tags: $:/tags/Global \procedure change-types-tab() \whitespace trim -<$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"> - <> - +<$let show-type-badge="no" show-category-badge="yes" show-change-impacts="yes" show-tiddler-link="yes" + searchState={{{ [addprefix[$:/state/release/search/change-types/]] }}} +> +<$macrocall $name="release-tab-search" stateTiddler=<>/> +<$let searchText={{{ [get[text]] }}}> +<%if [!match[]] %> +
+ <$let count={{{ [tag[$:/tags/ChangeNote]] :filter[{!!release}match] +[search:title,description,text,github-contributors,github-links] +[count[]] }}}> + <$text text={{{ [addsuffix[ ]] }}}/>result<$text text={{{ [!match[1]then[s]] }}}/> + +
+ <$macrocall $name="change-note-list" filter="[tag[$:/tags/ChangeNote]] :filter[{!!release}match] +[search:title,description,text,github-contributors,github-links] +[sort[description]]"/> +<%else%> + <$list filter="[enlist{$:/tw5.com/releases/info/change-type-order}]" variable="change-type"> + <> + +<%endif%> + \end change-types-tab @@ -254,10 +247,24 @@ tags: $:/tags/Global \procedure change-categories-tab() \whitespace trim -<$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"> - <> - +<$let show-type-badge="yes" show-category-badge="no" show-change-impacts="yes" show-tiddler-link="yes" + searchState={{{ [addprefix[$:/state/release/search/change-categories/]] }}} +> +<$macrocall $name="release-tab-search" stateTiddler=<>/> +<$let searchText={{{ [get[text]] }}}> +<%if [!match[]] %> +
+ <$let count={{{ [tag[$:/tags/ChangeNote]] :filter[{!!release}match] +[search:title,description,text,github-contributors,github-links] +[count[]] }}}> + <$text text={{{ [addsuffix[ ]] }}}/>result<$text text={{{ [!match[1]then[s]] }}}/> + +
+ <$macrocall $name="change-note-list" filter="[tag[$:/tags/ChangeNote]] :filter[{!!release}match] +[search:title,description,text,github-contributors,github-links] +[sort[description]]"/> +<%else%> + <$list filter="[enlist{$:/tw5.com/releases/info/category-order}]" variable="category"> + <> + +<%endif%> + \end change-categories-tab @@ -312,10 +319,26 @@ tags: $:/tags/Global \procedure impacts-tab() \whitespace trim -<$let show-tiddler-link="yes"> -<$list filter="[enlist{$:/tw5.com/releases/info/impact-type-order}]" variable="impact-type"> - <> - +<$let show-tiddler-link="yes" + searchState={{{ [addprefix[$:/state/release/search/impacts/]] }}} +> +<$macrocall $name="release-tab-search" stateTiddler=<>/> +<$let searchText={{{ [get[text]] }}}> +<%if [!match[]] %> +
+ <$let count={{{ [tag[$:/tags/ImpactNote]] :filter[{!!changenote}get[release]match] +[search:title,description,text] +[count[]] }}}> + <$text text={{{ [addsuffix[ ]] }}}/>result<$text text={{{ [!match[1]then[s]] }}}/> + +
+ <$list filter="[tag[$:/tags/ImpactNote]] :filter[{!!changenote}get[release]match] +[search:title,description,text] +[sort[description]]" variable="impact"> + <> + +<%else%> + <$list filter="[enlist{$:/tw5.com/releases/info/impact-type-order}]" variable="impact-type"> + <> + +<%endif%> + \end impacts-tab diff --git a/editions/tw5.com/tiddlers/releasenotes/ReleasesStyles.tid b/editions/tw5.com/tiddlers/releasenotes/ReleasesStyles.tid index 6728ad738..8c4bc83f7 100644 --- a/editions/tw5.com/tiddlers/releasenotes/ReleasesStyles.tid +++ b/editions/tw5.com/tiddlers/releasenotes/ReleasesStyles.tid @@ -9,10 +9,25 @@ type: text/vnd.tiddlywiki margin-top: 1rem; } -.doc-release-summary-section { +.doc-release-tab-search { 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 { border: 1px solid #e8e8e8; border-radius: 0.5em; diff --git a/editions/tw5.com/tiddlers/releasenotes/ReleasesSummaryLists.tid b/editions/tw5.com/tiddlers/releasenotes/ReleasesSummaryLists.tid index f7bae6326..bf53eca57 100644 --- a/editions/tw5.com/tiddlers/releasenotes/ReleasesSummaryLists.tid +++ b/editions/tw5.com/tiddlers/releasenotes/ReleasesSummaryLists.tid @@ -1,5 +1,3 @@ title: $:/tw5.com/releases/info/summary-lists type: text/vnd.tiddlywiki -highlights/5.4.0: [[$:/changenotes/5.4.0/#9055]] [[$:/changenotes/5.4.0/#9641]] [[$:/changenotes/5.4.0/#8972]] -big-bug-fixes/5.4.0: [[$:/changenotes/5.4.0/#9259]] -clearing-the-decks/5.4.0: +highlights/5.4.0: [[$:/changenotes/5.4.0/#9055]] [[$:/changenotes/5.4.0/#8972]] [[$:/changenotes/5.4.0/#9641]] [[$:/changenotes/5.4.0/#8258]] diff --git a/editions/tw5.com/tiddlers/releasenotes/ReleasesTabTemplate.tid b/editions/tw5.com/tiddlers/releasenotes/ReleasesTabTemplate.tid index bde3ab7c0..a87b47876 100644 --- a/editions/tw5.com/tiddlers/releasenotes/ReleasesTabTemplate.tid +++ b/editions/tw5.com/tiddlers/releasenotes/ReleasesTabTemplate.tid @@ -3,12 +3,10 @@ type: text/vnd.tiddlywiki <%if [match[Summary]] %> <> -<%elseif [match[Change Types]] %> +<%elseif [match[By Type]] %> <> -<%elseif [match[Change Categories]] %> +<%elseif [match[By Category]] %> <> <%elseif [match[Impacts]] %> <> -<%elseif [match[Credits]] %> - <> <%endif%>