-
-
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
refactor: code from profile avatar image reduced motion setting issue #3069
refactor: code from profile avatar image reduced motion setting issue #3069
Conversation
✅ 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. |
…scencio/fix/profile-avatar-image-reduced-motion-setting
@@ -1,7 +1,7 @@ | |||
<script setup lang="ts"> | |||
import type { mastodon } from 'masto' | |||
|
|||
const { account, square } = defineProps<{ | |||
const props = defineProps<{ |
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.
@AndrewCrescencio Thanks for the fix!
About the object destructuring, that warning was valid in Vue 3.4 (the previous result of pnpm run test:ci
), but Vue 3.5+ allows us to use the same syntax again. So we can still use the original destructuring on props
. Could you revert that destructuring since we already used it in many other places if you don't mind? You can also check by running pnpm run test:ci
on your environment.
These links will help to understand the latest (Vue 3.5+) usage of props destructuring:
- Props | Vue.js - https://vuejs.org/guide/components/props#reactive-props-destructure
- Vue 3.5+: How to Destructure Props in 2024 (Composition API) - https://www.docs4.dev/posts/vue-3-how-to-destructure-props-in-2024
I've updated the test result with the latest commit, that doesn't contains the previous warning: #2934
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.
Nice that we still can use props destructure, thanks for info, but let's leave it as it is, next time I know, I'll try to help with other things
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.
By the way, that refactoring is optional. I'm happy to merge this and refactor it later with other similar usages.
Hi, just refactoring the code to fix the issue: #3044
I removed the props destructuring, because in the test log there is a warning about this, I also added the fallback to the avatar image as @shuuji3 told here #3066 (comment)