docs(release): port v0.48 changelog

This commit is contained in:
Elian Doran 2025-10-30 22:36:41 +02:00
parent 70837fdc69
commit 5e9c271bfd
No known key found for this signature in database
7 changed files with 189 additions and 1 deletions

View File

@ -935,6 +935,73 @@
"dataFileName": "v0.90.0-beta.md", "dataFileName": "v0.90.0-beta.md",
"attachments": [] "attachments": []
}, },
{
"isClone": false,
"noteId": "kzjHexDTTeVB",
"notePath": [
"hD3V4hiu2VW4",
"kzjHexDTTeVB"
],
"title": "v0.48",
"notePosition": 420,
"prefix": null,
"isExpanded": false,
"type": "text",
"mime": "text/html",
"attributes": [
{
"type": "relation",
"name": "template",
"value": "wyurrlcDl416",
"isInheritable": false,
"position": 60
}
],
"format": "markdown",
"dataFileName": "v0.48.md",
"attachments": [
{
"attachmentId": "645H74UA4xwf",
"title": "note-map.png",
"role": "image",
"mime": "image/jpg",
"position": 10,
"dataFileName": "v0.48_note-map.png"
},
{
"attachmentId": "c74WFpjTo0p4",
"title": "screenshot.png",
"role": "image",
"mime": "image/jpg",
"position": 10,
"dataFileName": "v0.48_screenshot.png"
},
{
"attachmentId": "szlnTmTJL4HL",
"title": "split.png",
"role": "image",
"mime": "image/jpg",
"position": 10,
"dataFileName": "v0.48_split.png"
},
{
"attachmentId": "VQxrtpQTYmI6",
"title": "bookmarks.png",
"role": "image",
"mime": "image/jpg",
"position": 10,
"dataFileName": "v0.48_bookmarks.png"
},
{
"attachmentId": "ZRyEqxAv1MTd",
"title": "mermaid.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "v0.48_mermaid.png"
}
]
},
{ {
"isClone": false, "isClone": false,
"noteId": "wyurrlcDl416", "noteId": "wyurrlcDl416",
@ -943,7 +1010,7 @@
"wyurrlcDl416" "wyurrlcDl416"
], ],
"title": "Release Template", "title": "Release Template",
"notePosition": 420, "notePosition": 430,
"prefix": null, "prefix": null,
"isExpanded": false, "isExpanded": false,
"type": "text", "type": "text",

View File

@ -0,0 +1,121 @@
# v0.48
0.48 is a big release and contains many changes, some of them breaking:
## Major frontend redesign
<img src="v0.48_screenshot.png" alt="" width="1047" height="772">
* right panel is no more, most of these widgets have been moved to the new ribbon-style widget under note title
* right panel is still possible to activate for scripts
* Trilium has a new icon (there might be further color changes)
## Vertical split window
<figure class="image"><img style="aspect-ratio:1047/779;" src="v0.48_split.png" alt="" width="1047" height="779"></figure>
## Link map re-implemented
Now supports also hierarchical view of the notes:
<figure class="image"><img style="aspect-ratio:1082/786;" src="v0.48_note-map.png" alt="" width="1082" height="786"></figure>
## Mermaid diagrams
Thanks to [@abitofevrything](https://github.com/abitofevrything) for this contribution!
<figure class="image"><img style="aspect-ratio:1052/779;" src="v0.48_mermaid.png" alt="" width="1052" height="779"></figure>
## Basic bookmark support
<figure class="image"><img style="aspect-ratio:1200/815;" src="v0.48_bookmarks.png" alt="" width="1200" height="815"></figure>
## Other changes
* persistence/entity layer in backend was largely refactored - "repository" and unified with note cache which should bring performance improvements for many operations
* search and SQL query notes now don't create “saved” notes by default
* added underline heading style and make it a default
* updated CKEditor to 30.0.0
## Migration
### Backup restore
Trilium v0.48 is currently in beta and may contain serious bugs.
Before migration to 0.48 Trilium will make automatically backup into `~/trilium-data/backup/backup-before-migration.db`. In case of problems you can restore this backup with this guide: [https://github.com/zadam/trilium/wiki/Backup#restoring-backup](https://github.com/zadam/trilium/wiki/Backup#restoring-backup)
### Direct upgrade only from 0.47.X
Direct upgrade to 0.48 is possible only from 0.47.X. If you want to upgrade from an older version, you need to upgrade to 0.47.X first and only then to 0.48. This is caused by extensive backend refactoring which broke older migration scripts.
### All backend script notes should avoid being async
Backend operations were in older versions used async/await because of the SQLite driver. But Trilium recently migrated to the synchronous (and much faster) `better-sqlite3`. As a consequence backend script notes which are wrapped in a transaction should to be converted to the sync variant.
e.g. old script looked like this:
```
const todayDateStr = api.formatDateISO(new Date());
const todayNote = await api.runOnBackend(async todayDateStr => {
const dateNote = await api.getDayNote(todayDateStr);
({note: logNote} = await api.createNote(dateNote.noteId, 'log'));
}, [todayDateStr]);
api.activateNote(todayNote.noteId);
```
all the `await` (and `async`) should disappear from the backend code, but should remain when calling backend from frontend (that's still async):
```
const todayDateStr = api.formatDateISO(new Date());
const todayNote = await api.runOnBackend(todayDateStr => {
const dateNote = api.getDayNote(todayDateStr);
({note: logNote} = api.createNote(dateNote.noteId, 'log'));
}, [todayDateStr]);
api.activateNote(todayNote.noteId);
```
### Migrate custom themes
With the redesign you might need to adjust your custom themes - check the modified list of available CSS variables in the [default theme](https://github.com/zadam/trilium/blob/master/src/public/stylesheets/theme-light.css). If your theme also uses CSS selectors then that will probably have to be rewritten as well.
Themes are annotated with `#appTheme` label, previously this label could but did not have to contain value - with this release the value is required so define the label as e.g. `#appTheme=my-theme-name`.
Additionally, CSS themes are now loaded differently than before - previously all themes were loaded at the startup and which one was active was decided by the active CSS class. Themes were then prefixed like this:
```
body.theme-steel-blue {
--main-font-family: 'Raleway' !important;
--main-font-size: normal;
--tree-font-family: inherit;
--tree-font-size: normal;
...
}
body.theme-steel-blue .note-detail-editable-text, body.theme-steel-blue .note-detail-readonly-text {
font-size: 120%;
}
```
This prefixing is not needed anymore (and also doesn't work anymore). Remove the prefixes like this:
```
:root {
--main-font-family: 'Raleway';
--main-font-size: normal;
--tree-font-family: 'Raleway';
--tree-font-size: normal;
...
}
body .note-detail-editable-text, body .note-detail-readonly-text {
font-size: 120%;
}
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB