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

Ability to Disable Automatic view refreshing for Select Queries #2396

Open
itsonlyjames opened this issue Jul 23, 2024 · 0 comments · May be fixed by #2402
Open

Ability to Disable Automatic view refreshing for Select Queries #2396

itsonlyjames opened this issue Jul 23, 2024 · 0 comments · May be fixed by #2402
Labels
feature-request New feature or request.

Comments

@itsonlyjames
Copy link

I have a dataviewjs query which renders a TikZ diagram from a single source file. With Automatic view refreshing enabled, it constantly flickers while editing the notes content and disrupts the experience (constantly jumping around at the designated interval, default 2500ms). However, disabling the setting globally then removes the benefits of my markdown tables updating automatically. For example, if I have my weekly note next to my daily note, and update my frontmatter in my daily note, I have to then manually Rebuild current view on the weekly note, or close/open it.

Describe the solution you'd like

Within a dataviewjs codeblock, it would be nice to disable refreshing for that particular block, potentially with a comment—similar to how typescript has @ts-ignore. For example:

```dataviewjs
@dataview-js-disable-refresh
await dv.view("3. Resources/Scripts/Time-Traveller's Log", 0)

With this comment, it would simply skip over the refreshOperation func or the maybeRefresh. I don't have enough knowledge on the codebase as yet to provide a PR, but am actively investigating some solutions for a temporary fix, however I look to you for a more appropriate solution.

Describe alternatives you've considered

I have disabled the setting so as to remove the flickering issue, however I also have lost the automatic updating of other dataview components. For my use case, it would suffice to only listen to frontmatter changes (rather than whole document changes), thus editing content would not cause a flicker, but altering my frontmatter would still propagate updates to other views causing refreshing. This is an edge-case however, I imagine other users have metadata outside of just frontmatter. Maybe a setting could be instantiated: "Automatic view refreshing: only listen to frontmatter changes"? However, I think providing users the ability to control refreshing per codeblock might be a more appropriate solution.

@itsonlyjames itsonlyjames added the feature-request New feature or request. label Jul 23, 2024
@itsonlyjames itsonlyjames linked a pull request Jul 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant