Skip to content

Commit 5e9c271

Browse files
committed
docs(release): port v0.48 changelog
1 parent 70837fd commit 5e9c271

File tree

7 files changed

+189
-1
lines changed

7 files changed

+189
-1
lines changed

docs/Release Notes/!!!meta.json

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,73 @@
935935
"dataFileName": "v0.90.0-beta.md",
936936
"attachments": []
937937
},
938+
{
939+
"isClone": false,
940+
"noteId": "kzjHexDTTeVB",
941+
"notePath": [
942+
"hD3V4hiu2VW4",
943+
"kzjHexDTTeVB"
944+
],
945+
"title": "v0.48",
946+
"notePosition": 420,
947+
"prefix": null,
948+
"isExpanded": false,
949+
"type": "text",
950+
"mime": "text/html",
951+
"attributes": [
952+
{
953+
"type": "relation",
954+
"name": "template",
955+
"value": "wyurrlcDl416",
956+
"isInheritable": false,
957+
"position": 60
958+
}
959+
],
960+
"format": "markdown",
961+
"dataFileName": "v0.48.md",
962+
"attachments": [
963+
{
964+
"attachmentId": "645H74UA4xwf",
965+
"title": "note-map.png",
966+
"role": "image",
967+
"mime": "image/jpg",
968+
"position": 10,
969+
"dataFileName": "v0.48_note-map.png"
970+
},
971+
{
972+
"attachmentId": "c74WFpjTo0p4",
973+
"title": "screenshot.png",
974+
"role": "image",
975+
"mime": "image/jpg",
976+
"position": 10,
977+
"dataFileName": "v0.48_screenshot.png"
978+
},
979+
{
980+
"attachmentId": "szlnTmTJL4HL",
981+
"title": "split.png",
982+
"role": "image",
983+
"mime": "image/jpg",
984+
"position": 10,
985+
"dataFileName": "v0.48_split.png"
986+
},
987+
{
988+
"attachmentId": "VQxrtpQTYmI6",
989+
"title": "bookmarks.png",
990+
"role": "image",
991+
"mime": "image/jpg",
992+
"position": 10,
993+
"dataFileName": "v0.48_bookmarks.png"
994+
},
995+
{
996+
"attachmentId": "ZRyEqxAv1MTd",
997+
"title": "mermaid.png",
998+
"role": "image",
999+
"mime": "image/png",
1000+
"position": 10,
1001+
"dataFileName": "v0.48_mermaid.png"
1002+
}
1003+
]
1004+
},
9381005
{
9391006
"isClone": false,
9401007
"noteId": "wyurrlcDl416",
@@ -943,7 +1010,7 @@
9431010
"wyurrlcDl416"
9441011
],
9451012
"title": "Release Template",
946-
"notePosition": 420,
1013+
"notePosition": 430,
9471014
"prefix": null,
9481015
"isExpanded": false,
9491016
"type": "text",
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# v0.48
2+
0.48 is a big release and contains many changes, some of them breaking:
3+
4+
## Major frontend redesign
5+
6+
<img src="v0.48_screenshot.png" alt="" width="1047" height="772">
7+
8+
* right panel is no more, most of these widgets have been moved to the new ribbon-style widget under note title
9+
* right panel is still possible to activate for scripts
10+
* Trilium has a new icon (there might be further color changes)
11+
12+
## Vertical split window
13+
14+
<figure class="image"><img style="aspect-ratio:1047/779;" src="v0.48_split.png" alt="" width="1047" height="779"></figure>
15+
16+
## Link map re-implemented
17+
18+
Now supports also hierarchical view of the notes:
19+
20+
<figure class="image"><img style="aspect-ratio:1082/786;" src="v0.48_note-map.png" alt="" width="1082" height="786"></figure>
21+
22+
## Mermaid diagrams
23+
24+
Thanks to [@abitofevrything](https://github.com/abitofevrything) for this contribution!
25+
26+
<figure class="image"><img style="aspect-ratio:1052/779;" src="v0.48_mermaid.png" alt="" width="1052" height="779"></figure>
27+
28+
## Basic bookmark support
29+
30+
<figure class="image"><img style="aspect-ratio:1200/815;" src="v0.48_bookmarks.png" alt="" width="1200" height="815"></figure>
31+
32+
## Other changes
33+
34+
* persistence/entity layer in backend was largely refactored - "repository" and unified with note cache which should bring performance improvements for many operations
35+
* search and SQL query notes now don't create “saved” notes by default
36+
* added underline heading style and make it a default
37+
* updated CKEditor to 30.0.0
38+
39+
## Migration
40+
41+
### Backup restore
42+
43+
Trilium v0.48 is currently in beta and may contain serious bugs.
44+
45+
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)
46+
47+
### Direct upgrade only from 0.47.X
48+
49+
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.
50+
51+
### All backend script notes should avoid being async
52+
53+
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.
54+
55+
e.g. old script looked like this:
56+
57+
```
58+
const todayDateStr = api.formatDateISO(new Date());
59+
60+
const todayNote = await api.runOnBackend(async todayDateStr => {
61+
const dateNote = await api.getDayNote(todayDateStr);
62+
63+
({note: logNote} = await api.createNote(dateNote.noteId, 'log'));
64+
}, [todayDateStr]);
65+
66+
api.activateNote(todayNote.noteId);
67+
```
68+
69+
all the `await` (and `async`) should disappear from the backend code, but should remain when calling backend from frontend (that's still async):
70+
71+
```
72+
const todayDateStr = api.formatDateISO(new Date());
73+
74+
const todayNote = await api.runOnBackend(todayDateStr => {
75+
const dateNote = api.getDayNote(todayDateStr);
76+
77+
({note: logNote} = api.createNote(dateNote.noteId, 'log'));
78+
}, [todayDateStr]);
79+
80+
api.activateNote(todayNote.noteId);
81+
```
82+
83+
### Migrate custom themes
84+
85+
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.
86+
87+
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`.
88+
89+
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:
90+
91+
```
92+
body.theme-steel-blue {
93+
--main-font-family: 'Raleway' !important;
94+
--main-font-size: normal;
95+
96+
--tree-font-family: inherit;
97+
--tree-font-size: normal;
98+
...
99+
}
100+
101+
body.theme-steel-blue .note-detail-editable-text, body.theme-steel-blue .note-detail-readonly-text {
102+
font-size: 120%;
103+
}
104+
```
105+
106+
This prefixing is not needed anymore (and also doesn't work anymore). Remove the prefixes like this:
107+
108+
```
109+
:root {
110+
--main-font-family: 'Raleway';
111+
--main-font-size: normal;
112+
113+
--tree-font-family: 'Raleway';
114+
--tree-font-size: normal;
115+
...
116+
}
117+
118+
body .note-detail-editable-text, body .note-detail-readonly-text {
119+
font-size: 120%;
120+
}
121+
```
94.2 KB
Loading
95.2 KB
Loading
86.4 KB
Loading
103 KB
Loading
112 KB
Loading

0 commit comments

Comments
 (0)