-
-
Notifications
You must be signed in to change notification settings - Fork 565
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
feat(ui): fetch account data on demand #2632
Conversation
Run & review this pull request in StackBlitz Codeflow. |
✅ Deploy Preview for elk-zone ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for elk-docs canceled.
|
Is the skeleton still working for you? I can't see it when I test the preview: https://deploy-preview-2632--elk-zone.netlify.app/ |
skeleton logic removed, only fetch on hover |
@@ -5,7 +5,7 @@ const { account } = defineProps<{ | |||
account: mastodon.v1.Account | |||
}>() | |||
|
|||
const relationship = useRelationship(account) | |||
const relationship = computed(() => account ? useRelationship(account).value : undefined) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should call useRelationship
inside a computed
. I think you should extract useRelationship
to an outside ref
. If you don't want that ref (that changes once fetchRelationships()
finished), then you could abstract a helper around requestedRelationships
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too many useRelationship
usages to refactor it here: we should debounce the call
This PR includes:
add status card skeleton when resolving the account dataThis will also prevent fetching account data of all accounts in the viewport while scrolling.
We can change the skeleton or switch to use an spinner loader.
Check this video https://streamable.com/4kk87e : added few seconds timeout to see the skeleton on first fetch (afterwards it is immediate)
/cc @patak-dev @shuuji3