docs(scripting): remove workaround for sidebar visibility

This commit is contained in:
Elian Doran
2025-11-22 11:03:00 +02:00
parent 7daee36d3e
commit 664d28f105
5 changed files with 65 additions and 57 deletions

View File

@@ -20,14 +20,21 @@ class ToDoListWidget extends api.RightPanelWidget {
}
async refreshWithNote(note) {
this.toggleInt(false);
this.triggerCommand("reEvaluateRightPaneVisibility");
this.toggleInt(true);
this.triggerCommand("reEvaluateRightPaneVisibility");
// Do something when the note changes.
}
}
module.exports = new ToDoListWidget();
```
The implementation is in `src/public/app/widgets/right_panel_widget.js`.
The implementation is in `src/public/app/widgets/right_panel_widget.js`.
## Conditionally changing visibility
In `refreshWithNote`:
```
const visible = true; // replace with your own visibility logic
this.toggleInt(visible);
this.triggerCommand("reEvaluateRightPaneVisibility");
```