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

Compare commits

..

6 Commits

Author SHA1 Message Date
Jeremy Ruston
f63d56e21f Various change note fixes 2026-02-11 18:11:57 +00:00
Jeremy Ruston
e11c3033cf More tweaks 2026-02-11 17:51:18 +00:00
Jeremy Ruston
65fef1a731 Corrections 2026-02-11 17:51:09 +00:00
Jeremy Ruston
aed4e082f7 Add some colour (possibly too much) 2026-02-11 17:34:37 +00:00
Jeremy Ruston
ec01222171 UI Tweaks 2026-02-11 17:26:20 +00:00
Jeremy Ruston
1bc9b4bf33 First pass 2026-02-11 16:12:49 +00:00
13 changed files with 202 additions and 98 deletions

View File

@@ -1,5 +1,5 @@
title: $:/changenotes/5.4.0/#8258
description: Core plugin to serialize syntax trees back to strings
description: Add ability to serialize WikiText AST nodes back to wikitext strings
tags: $:/tags/ChangeNote
release: 5.4.0
change-type: feature
@@ -7,8 +7,32 @@ change-category: developer
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/8258
github-contributors: linonetwo
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:
This PR introduces a new utility `$tw.utils.serializeWikitextParseTree()` that can convert WikiText Abstract Syntax Tree (AST) nodes back into wikitext strings.
* Programmatically manipulating wikitext content by modifying the syntax tree and deserializing it back to wikitext
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
* 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

@@ -0,0 +1,8 @@
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

@@ -0,0 +1,9 @@
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

@@ -0,0 +1,27 @@
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,19 +7,36 @@ change-category: hackability
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9055
github-contributors: Jermolene
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:
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:
```
<<mymacro param={{Something}}>>
```
Or even this:
```
<div class=<<mymacro param={{Something}}>>>
```
Or this:
```
<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:] }}}>>>
```
The extended syntax allows parameter values to be passed as transclusions, filter expressions or nested invocations in three settings:
The extended syntax can be used in three different settings:
* As a standalone construction
* As a widget attribute value
* As a filter operand value
See [[Calls]] for more details and examples.
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.

View File

@@ -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: hackability
change-category: usability
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9313
github-contributors: Leilei332

View File

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

View File

@@ -1,9 +1,11 @@
title: $:/tw5.com/releases/info/
category-order: translation usability hackability widget filters plugin theme nodejs developer internal
category-order: translation usability hackability performance 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
impact-type-order: compatibility-break deprecation pluginisation
tab-order: [[Summary]] [[By Type]] [[By Category]] [[Impacts]]
tab-order: [[Summary]] [[Change Types]] [[Change Categories]] [[Impacts]]
categories/developer/singular: Developer
categories/developer/plural: Developer
categories/filters/singular: Filters
@@ -14,6 +16,8 @@ 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
@@ -54,6 +58,10 @@ 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

View File

@@ -161,23 +161,44 @@ tags: $:/tags/Global
</$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()
\whitespace trim
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={{{ [<release>addprefix[highlights/]] }}}
>
<$macrocall $name="change-note-list" filter="[[$:/tw5.com/releases/info/summary-lists]get<summaryListField>enlist-input[]]"/>
<$let show-type-badge="yes" show-category-badge="yes" show-change-impacts="yes" show-tiddler-link="yes">
<div class="doc-release-summary">
<$list filter="[enlist{$:/tw5.com/releases/info/summary-section-order}]" variable="summary-key">
<div class="doc-release-summary-section">
<$macrocall $name="summary-section"/>
</div>
</$list>
</div>
</$let>
\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()
\whitespace trim
<$let changeTypeState={{{ [<release>addprefix[$:/state/release/change-type/]addsuffix[/]addsuffix<change-type>] }}}>
@@ -202,24 +223,10 @@ These are significant improvements that will benefit a broad range of users, and
\procedure change-types-tab()
\whitespace trim
<$let show-type-badge="no" show-category-badge="yes" show-change-impacts="yes" show-tiddler-link="yes"
searchState={{{ [<release>addprefix[$:/state/release/search/change-types/]] }}}
>
<$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 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">
<<change-type-section>>
</$list>
</$let>
\end change-types-tab
@@ -247,24 +254,10 @@ These are significant improvements that will benefit a broad range of users, and
\procedure change-categories-tab()
\whitespace trim
<$let show-type-badge="yes" show-category-badge="no" show-change-impacts="yes" show-tiddler-link="yes"
searchState={{{ [<release>addprefix[$:/state/release/search/change-categories/]] }}}
>
<$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 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">
<<change-category-section>>
</$list>
</$let>
\end change-categories-tab
@@ -319,26 +312,10 @@ These are significant improvements that will benefit a broad range of users, and
\procedure impacts-tab()
\whitespace trim
<$let show-tiddler-link="yes"
searchState={{{ [<release>addprefix[$:/state/release/search/impacts/]] }}}
>
<$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 show-tiddler-link="yes">
<$list filter="[enlist{$:/tw5.com/releases/info/impact-type-order}]" variable="impact-type">
<<impact-type-section>>
</$list>
</$let>
\end impacts-tab

View File

@@ -9,25 +9,10 @@ type: text/vnd.tiddlywiki
margin-top: 1rem;
}
.doc-release-tab-search {
.doc-release-summary-section {
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;

View File

@@ -1,3 +1,5 @@
title: $:/tw5.com/releases/info/summary-lists
type: text/vnd.tiddlywiki
highlights/5.4.0: [[$:/changenotes/5.4.0/#9055]] [[$:/changenotes/5.4.0/#8972]] [[$:/changenotes/5.4.0/#9641]] [[$:/changenotes/5.4.0/#8258]]
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:

View File

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

45
prompt.md Normal file
View File

@@ -0,0 +1,45 @@
# Release Notes Redesign Prompt (TiddlyWiki5)
You are editing the TiddlyWiki5 repo, focusing on the release notes presentation under `editions/tw5.com/tiddlers/releasenotes/`.
## Goals
- Present release notes with tabs:
- **Summary**: collapsible sections for Highlights, Big Bug Fixes, Clearing the Decks (curated lists).
- **Change Types**
- **Change Categories**
- **Impacts**
- **Credits** (acknowledgements)
- Headings must be customisable via the releases info tiddler.
- Use TiddlyWiki idioms: state stored in tiddlers (not DOM).
- Keep procedures small (≈20 lines), with sensible identifiers.
## Current Implementation (after recent edits)
- `editions/tw5.com/tiddlers/releasenotes/ReleasesProcedures.tid`
- Reworked into many small procedures.
- Tabs use `$:/core/macros/tabs` and template `$:/tw5.com/releases/tab-template`.
- Sections use `$reveal` + `$action-setfield` toggles; state stored in `$:/state/release/...`.
- Summary pulls curated lists from `$:/tw5.com/releases/info/summary-lists` (fields named `<section>/<release>`).
- Change Types/Categories/Impacts list change notes by filters; Credits tab shows acknowledgements.
- `editions/tw5.com/tiddlers/releasenotes/ReleasesTabTemplate.tid`
- Uses `<$list match>` to choose the tab body: Summary, Change Types, Change Categories, Impacts, Credits.
- `editions/tw5.com/tiddlers/releasenotes/ReleasesInfo.multids`
- Added tab order, summary sections & captions/order, change/impact orders.
- `editions/tw5.com/tiddlers/releasenotes/ReleasesStyles.tid`
- Styles for tabs, section headers, toggle icons, impact cards.
- `editions/tw5.com/tiddlers/releasenotes/ReleasesSummaryLists.tid`
- Example curated fields for 5.4.0 (Highlights, Big Bug Fixes, Clearing the Decks) using wiki-links.
## Outstanding Issue
- Summary tab still shows raw keys (e.g., “highlights”) and not the curated change lists. Captions/list lookup likely still failing; needs robust caption lookup and ensuring summary lists are read correctly (field names and filters).
- Other tabs (types/categories/impacts) expand/collapse correctly.
## Open Files in IDE (for context)
- ReleasesProcedures.tid
- ReleasesStyles.tid
- Release Notes and Changes Internals.tid
- Release 5.3.8.tid
- Release 5.4.0.tid
## Reminder
- Avoid adding fields to change notes; curation is via list fields on `$:/tw5.com/releases/info/summary-lists`.
- Keep using tiddler-store state; no DOM state.