Skip to content

Conversation

david-crespo
Copy link
Collaborator

@david-crespo david-crespo commented Apr 17, 2024

Closes #1995

Imagine my delight discovering that invalidateQueries returns a promise that completes when the actual query finishes refetching! I confirmed in the RQ source that this behavior is straightforwardly the result of awaiting the fetch calls. That makes it extremely easy to turn on a spinner when it starts and turn it off when it ends. How great is that!

2024-04-17-animate-refresh-button.mp4

Copy link

vercel bot commented Apr 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Apr 17, 2024 10:35pm

Copy link
Contributor

@charliepark charliepark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, great! This looks good.

In an ideal world, I think we'd have a "done" state, like we have with the "copy the external IP" checkmark that fades, so you have some indication that it has completed successfully. I guess the timestamps on the page do change, so you get that, but if your focus is on the spinner, it'd be cool if it also gave you the confirmation that the action had resolved.

But that can wait for a future PR. Looks good.

@david-crespo
Copy link
Collaborator Author

Yes! I was thinking about a tooltip on hover that says when it was last run. Kind of noisy? I don’t know.

@david-crespo david-crespo merged commit b6da415 into main Apr 17, 2024
@david-crespo david-crespo deleted the refresh-button-anim branch April 17, 2024 23:09
@charliepark
Copy link
Contributor

I was playing with an animating checkmark (really just cribbing CopyToClipboard); will open a new PR and we can see if it works or not.

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.

Instances: Instances list refresh feedback
2 participants