blacksmithgu / obsidian-dataview

A data index and query language over Markdown files, for https://obsidian.md/.
https://blacksmithgu.github.io/obsidian-dataview/
MIT License
7.11k stars 418 forks source link

Loading indicator #1424

Open ronaldsuwandi opened 2 years ago

ronaldsuwandi commented 2 years ago

Given that dataview perform considerably slower on mobile #602 having a loading indicator will be a great addition. One of my issue is that I dump all my files in a single root directory and querying them can take few seconds especially on mobile and while dataview is busy searching the index, the page simply indicates 0 result which is misleading

blacksmithgu commented 2 years ago

There should be a Dataview is loading indicator over loading boxes - do you not see it on mobile?

blacksmithgu commented 2 years ago

Does it render anything at all? Maybe the Dataview returned 0 results. view?

ronaldsuwandi commented 2 years ago

@blacksmithgu nope, instead of saying loading, it just says that no result (see attachment) and after its loaded it just works fine.

I'm using dataview 0.5.46 on ios

https://user-images.githubusercontent.com/4120788/190039668-00a18b7a-8e12-4a7f-a23d-22c22e39798c.mov

ronaldsuwandi commented 2 years ago

Just realised that GitHub doesn't seem to be supporting video file playback. Reattaching the video in gif format instead

RPReplay_Final1663119417 2

blacksmithgu commented 2 years ago

Okay, I see, the problem is that there is no indicator that the index is still loading in the background and results may not be up-to-date yet.

ronaldsuwandi commented 1 year ago

@blacksmithgu I'm trying to create a PR to fix this but having difficulty to reproduce this. I add timeouts/delay on various places like query/engine.ts executeCore function and also at ui/views/list-view.tsx on ListView function and all that does is delay rendering without actually showing "No result shown"

The only time I managed to do that once is when I add bunch of files into the vault and try to get the list of them. However I'm unable to reproduce this again (I assume the files are now indexed so performance is improved afterwards)

Any thoughts?

AB1908 commented 1 year ago

Can you draft a PR? I'd be open to try reviewing it.

ronaldsuwandi commented 1 year ago

@AB1908 i can't even programmatically reproduce the issue, so won't be able to do any PR 😬