Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instantiate Per Codeblock Refresh Disabling #2402

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

itsonlyjames
Copy link

@itsonlyjames itsonlyjames commented Jul 29, 2024

Simple solution and only applicable to dataviewjs.

Allows for a comment within the codeblock—disable-refresh—to disable automatic refreshing for select dataviewjs queries. Thus, preventing flashing of rendered diagrams yet still allowing the functionality of automatic view refreshing.

Example:

```dataviewjs
// @dataviewjs-disable-refresh
await dv.view("diagram", 0)
```

Jul-29-2024 22-23-47

Fixes: #2396

@reply2za
Copy link
Contributor

I think this is a great solution but disable-refresh is somewhat generic tag and so it has a nonzero potential for accidental enabling. Have you considered calling it something like "dataview-disable-refresh"?

@itsonlyjames
Copy link
Author

@reply2za For sure, in the original bug ticket my initial thought was to make it similar to typescripts ignore, so potentially changing this to @dataviewjs-disable-refresh which then removes the potential for accidental enabling. I'll go ahead and make this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to Disable Automatic view refreshing for Select Queries
2 participants