-
-
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
fix: show loading spinner on follow button while fetching account relationship #2667
fix: show loading spinner on follow button while fetching account relationship #2667
Conversation
Run & review this pull request in StackBlitz Codeflow. |
✅ Deploy Preview for elk-docs canceled.
|
✅ Deploy Preview for elk-zone ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
e6fa322
to
30403f7
Compare
const isLoading = ref(false) | ||
|
||
watchEffect(() => { | ||
isLoading.value = relationship.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.
Could this be rewritten as:
const isLoading = ref(false) | |
watchEffect(() => { | |
isLoading.value = relationship.value === undefined | |
}) | |
const isLoading = computed(() => relationship.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.
That's correct 👍🏻 and confirmed the change works as expected on local env.
Looks awesome 💯 |
Co-authored-by: patak <[email protected]>
…ationship (elk-zone#2667) Co-authored-by: patak <[email protected]>
fix #2647
This PR makes the loading spinner shown while loading a follow relationship with an account so that we can avoid showing a different button label from the actual relationship. The difference is noticeable, especially when the loading time is long.
Screen recording
Before
Screen.Recording.2024-03-10.at.1.18.48.2.mp4
After
loading.mp4