Skip to content

Commit 0ef61c2

Browse files
authored
fix: Speed up drawing of Tasks blocks after 2.0.0 release (#1801)
* Revert "fix: render in canvas (#1733)" This reverts commit d7593a2. Fixes #1800, but reopens #1732 * docs: Document limitations with Canvas cards.
1 parent 9120cc2 commit 0ef61c2

File tree

2 files changed

+25
-12
lines changed

2 files changed

+25
-12
lines changed

docs/getting-started/index.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,22 @@ Completing a task by clicking its checkbox from a `tasks` query block _will_ wor
149149
Warning
150150
{: .label .label-yellow}
151151

152+
Tasks cannot read tasks that are in **Obsidian Canvas cards**.
153+
154+
---
155+
156+
Warning
157+
{: .label .label-yellow}
158+
159+
Tasks does not display Tasks query blocks that are in **Obsidian Canvas cards**.
160+
161+
We are tracking this in [issue #1732](https://github.com/obsidian-tasks-group/obsidian-tasks/issues/1732).
162+
163+
---
164+
165+
Warning
166+
{: .label .label-yellow}
167+
152168
Tasks cannot read tasks that are **inside code blocks**, such as the ones used by the **Admonitions plugin**. Use Obsidian's built-in callouts instead.
153169

154170
---

src/QueryRenderer.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,15 @@ export class QueryRenderer {
2525
public addQueryRenderChild = this._addQueryRenderChild.bind(this);
2626

2727
private async _addQueryRenderChild(source: string, element: HTMLElement, context: MarkdownPostProcessorContext) {
28-
const child = new QueryRenderChild({
29-
app: this.app,
30-
events: this.events,
31-
container: element,
32-
source,
33-
filePath: context.sourcePath,
34-
});
35-
36-
context.addChild(child);
37-
38-
child.load();
39-
child.onload();
28+
context.addChild(
29+
new QueryRenderChild({
30+
app: this.app,
31+
events: this.events,
32+
container: element,
33+
source,
34+
filePath: context.sourcePath,
35+
}),
36+
);
4037
}
4138
}
4239

0 commit comments

Comments
 (0)