mirror of
https://github.com/zadam/trilium.git
synced 2025-12-22 07:14:24 +01:00
docs(user): add troubleshooting on content-sized
Some checks failed
Checks / main (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Deploy Documentation / Build and Deploy Documentation (push) Waiting to run
Dev / Test development (push) Waiting to run
Dev / Build Docker image (push) Blocked by required conditions
Dev / Check Docker build (Dockerfile) (push) Blocked by required conditions
Dev / Check Docker build (Dockerfile.alpine) (push) Blocked by required conditions
/ Check Docker build (Dockerfile) (push) Waiting to run
/ Check Docker build (Dockerfile.alpine) (push) Waiting to run
/ Build Docker images (Dockerfile, ubuntu-24.04-arm, linux/arm64) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.alpine, ubuntu-latest, linux/amd64) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.legacy, ubuntu-24.04-arm, linux/arm/v7) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.legacy, ubuntu-24.04-arm, linux/arm/v8) (push) Blocked by required conditions
/ Merge manifest lists (push) Blocked by required conditions
playwright / E2E tests on linux-arm64 (push) Waiting to run
playwright / E2E tests on linux-x64 (push) Waiting to run
Deploy website / Build & deploy website (push) Has been cancelled
Some checks failed
Checks / main (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Deploy Documentation / Build and Deploy Documentation (push) Waiting to run
Dev / Test development (push) Waiting to run
Dev / Build Docker image (push) Blocked by required conditions
Dev / Check Docker build (Dockerfile) (push) Blocked by required conditions
Dev / Check Docker build (Dockerfile.alpine) (push) Blocked by required conditions
/ Check Docker build (Dockerfile) (push) Waiting to run
/ Check Docker build (Dockerfile.alpine) (push) Waiting to run
/ Build Docker images (Dockerfile, ubuntu-24.04-arm, linux/arm64) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.alpine, ubuntu-latest, linux/amd64) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.legacy, ubuntu-24.04-arm, linux/arm/v7) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.legacy, ubuntu-24.04-arm, linux/arm/v8) (push) Blocked by required conditions
/ Merge manifest lists (push) Blocked by required conditions
playwright / E2E tests on linux-arm64 (push) Waiting to run
playwright / E2E tests on linux-x64 (push) Waiting to run
Deploy website / Build & deploy website (push) Has been cancelled
This commit is contained in:
parent
c581ee7252
commit
bd799823b8
2
apps/server/src/assets/doc_notes/en/User Guide/!!!meta.json
generated
vendored
2
apps/server/src/assets/doc_notes/en/User Guide/!!!meta.json
generated
vendored
File diff suppressed because one or more lines are too long
16
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Troubleshooting.html
generated
vendored
Normal file
16
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Troubleshooting.html
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<h2>Why is my widget clipped by other UI elements</h2>
|
||||||
|
<p>For performance and layout reasons, the size of widgets in Trilium is
|
||||||
|
independent from its children. At CSS level, this means that the widget
|
||||||
|
container has <code spellcheck="false">contain: size</code> applied to it.</p>
|
||||||
|
<p>This works well if the widget has a fixed size (or based on its parent
|
||||||
|
container), however to make a widget resize to fit its content, apply the
|
||||||
|
following change:</p><pre><code class="language-text-x-diff">class MyWidget extends api.RightPanelWidget {
|
||||||
|
|
||||||
|
+ constructor() {
|
||||||
|
+ super();
|
||||||
|
+ this.contentSized();
|
||||||
|
+ }
|
||||||
|
|
||||||
|
}</code></pre>
|
||||||
|
<p>Alternatively apply <code spellcheck="false">contain: none</code> to its
|
||||||
|
CSS.</p>
|
||||||
29
docs/User Guide/!!!meta.json
vendored
29
docs/User Guide/!!!meta.json
vendored
@ -15775,6 +15775,35 @@
|
|||||||
"format": "markdown",
|
"format": "markdown",
|
||||||
"dataFileName": "CSS.md",
|
"dataFileName": "CSS.md",
|
||||||
"attachments": []
|
"attachments": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"isClone": false,
|
||||||
|
"noteId": "gMkgcLJ6jBkg",
|
||||||
|
"notePath": [
|
||||||
|
"pOsGYCXsbNQG",
|
||||||
|
"CdNpE2pqjmI6",
|
||||||
|
"yIhgI5H7A2Sm",
|
||||||
|
"MgibgPcfeuGz",
|
||||||
|
"gMkgcLJ6jBkg"
|
||||||
|
],
|
||||||
|
"title": "Troubleshooting",
|
||||||
|
"notePosition": 50,
|
||||||
|
"prefix": null,
|
||||||
|
"isExpanded": false,
|
||||||
|
"type": "text",
|
||||||
|
"mime": "text/html",
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"type": "label",
|
||||||
|
"name": "shareAlias",
|
||||||
|
"value": "troubleshooting",
|
||||||
|
"isInheritable": false,
|
||||||
|
"position": 30
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"format": "markdown",
|
||||||
|
"dataFileName": "Troubleshooting.md",
|
||||||
|
"attachments": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
19
docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Troubleshooting.md
vendored
Normal file
19
docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Troubleshooting.md
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Troubleshooting
|
||||||
|
## Why is my widget clipped by other UI elements
|
||||||
|
|
||||||
|
For performance and layout reasons, the size of widgets in Trilium is independent from its children. At CSS level, this means that the widget container has `contain: size` applied to it.
|
||||||
|
|
||||||
|
This works well if the widget has a fixed size (or based on its parent container), however to make a widget resize to fit its content, apply the following change:
|
||||||
|
|
||||||
|
```diff
|
||||||
|
class MyWidget extends api.RightPanelWidget {
|
||||||
|
|
||||||
|
+ constructor() {
|
||||||
|
+ super();
|
||||||
|
+ this.contentSized();
|
||||||
|
+ }
|
||||||
|
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively apply `contain: none` to its CSS.
|
||||||
Loading…
x
Reference in New Issue
Block a user