Skip to content

Animate refresh button - #2161

Merged
david-crespo merged 4 commits into
mainfrom
refresh-button-anim
Apr 17, 2024
Merged

david-crespo merged 4 commits into
mainfrom
refresh-button-anim

Conversation

@david-crespo

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

Copy link
Copy Markdown
Collaborator

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

@vercel

vercel Bot commented Apr 17, 2024 •

Copy link
Copy Markdown

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

@charliepark charliepark left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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.

This branch was successfully deployed

1 active deployment
Preview — ba06095f Deployed Apr 17, 2024 by vercel[bot]
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