Add prefetch buttons below dimension sliders #1635
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is another experiment for #1578
I add a button below every dimension slider to prefetch the entire dimension. This lacks polish, obviously, but it shows what a user-controlled UI for prefetching entire dimensions could look like and feel like:
One major limitation of our data provider architecture, currently, is that we have no way to know whether a slice has already been fetched and is available in the cache. This means we can't, for instance, reduce the debouncing delay (or switch to throttling) and disable the prefetch button when the entire dimension is already cached.
Technically, it is doable with the latest version of react-suspense-fetch (by calling
store.get()
and wrapping it with try/catch), but very hacky. Also, since the library is no longer maintained, I would prefer switching to another, more robust, suspense-based fetching library instead.