-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Use shallowRef
instead of ref
in .vue
files where possible
#34813
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
Conversation
I just looked at the code again, and I think there are a few more places where we can use shallowRef. I can't get my local gitea environment to work, so please check these changes they seam logical to me. I tried to quadruple-check, but I'm sometimes stupid. Please test it. :) |
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.
Thank you very much.
The code was refactored from Vue2 by many steps, so some bad smells were left there. 😄
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.
Great work, thank you very much.
* giteaofficial/main: (22 commits) [skip ci] Updated translations via Crowdin Fix required contexts and commit status matching bug (go-gitea#34815) Add "Cancel workflow run" button to Actions list page (go-gitea#34817) Use `shallowRef` instead of `ref` in `.vue` files where possible (go-gitea#34813) Edit file workflow for creating a fork and proposing changes (go-gitea#34240) Refactor packages (go-gitea#34777) Refactor wiki (go-gitea#34805) [skip ci] Updated translations via Crowdin Upgrade htmx to 2.0.5 (go-gitea#34809) Forks repository list page follow other repositories page (go-gitea#34784) Add post-installation redirect based on admin account status (go-gitea#34493) Rework delete org and rename org UI (go-gitea#34762) Refactor editor (go-gitea#34780) Improve img lazy loading (go-gitea#34804) [skip ci] Updated translations via Crowdin Fix Feishu webhook signature verification (go-gitea#34788) Upgrade chi to v5.2.2 (go-gitea#34798) Fix the issue of abnormal interface when there is no issue-item on the project page (go-gitea#34791) Fix container range bug (go-gitea#34795) Fix OCI manifest parser (go-gitea#34797) ...
Reference:
This PR improves some
.vue
components by usingshallowRef instead of ref
, whichshould improve performance
. It's probably not significant, but it's an improvement because Vue no longer deep watches the ref (shallowRef).Also i used
useTemplateRef
instead ofref
I tested it locally, but I could have missed something, so please test it on your machine. Thank you!