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

refactor: fetch space delegates using vue-query #1125

Merged
merged 2 commits into from
Jan 27, 2025
Merged

Conversation

Sekhmet
Copy link
Member

@Sekhmet Sekhmet commented Jan 26, 2025

Summary

This PR introduces VueQuery by porting space delegates to use it.

With this:

  1. Fetching data is simplified (loading/error/data/infinite loading is all normalized and handled by vue-query).
  2. There is now caching in our queries providing better UX (no more waiting for results to show up after we go back if it was fetched previously).
  3. We can invalidate our queries to trigger refetches (although it's not used now as delegating has delay to when it will update in the API).

How to test

  1. Go to http://localhost:8080/#/sn:0x009fedaf0d7a480d21a27683b0965c0f8ded35b3f1cac39827a25a06a8a682a4/delegates
  2. Use different filters, if ending up at the same filter as before data is restored.
  3. Go to user profile and go back, list is restored immediately.

Copy link
Member

@bonustrack bonustrack left a comment

Choose a reason for hiding this comment

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

tACK works very well

Copy link
Member

@ChaituVR ChaituVR left a comment

Choose a reason for hiding this comment

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

tAck

@Sekhmet Sekhmet merged commit d14dcc7 into master Jan 27, 2025
2 checks passed
@Sekhmet Sekhmet deleted the sekhmet/vue-query branch January 27, 2025 08:34
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.

3 participants