6789 - VS Code: Go-to-Definition for Global Vue Components #6790
6789 - VS Code: Go-to-Definition for Global Vue Components #6790
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6790 +/- ##
=======================================
Coverage 76.65% 76.65%
=======================================
Files 398 398
Lines 20108 20108
Branches 4844 4844
=======================================
Hits 15414 15414
Misses 4694 4694
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cstns
left a comment
There was a problem hiding this comment.
Tested locally with a fresh install of vscode. Felt awfull the entire time, like I was cheating on my IDE with another IDE.
There's a slight discrepancy between global registered components and locally registered ones, in that cmd/ctrl + click takes you straight to the component when clicking on a global one and you have to multiple click your way through the locally registered one, but not a blocker still a massive improvement on what we had before.
| // Enables Go-to-Definition and autocomplete for globally registered components. | ||
| // Keep in sync with: ui-components/components.js and main.js | ||
|
|
||
| declare module 'vue' { |
There was a problem hiding this comment.
Not a big fan of manually declaring global components but it does the job. We'll just need to be mindful moving forward and keep this list in sync with any future global components
|
Holding off on merging. @Steve-Mcl, could you give this a quick spin and check usability? your VSCode foo is better than mine |
Description
Sets up VS Code tooling to improve the developer experience when working with Vue components.
components.d.tsdeclaration file so Volar (Vue - Official) can resolve globally registeredff-*components to their source files, enabling go-to-definition and autocomplete in templates.jsconfig.jsonso Volar discovers the frontend source..eslintrcto ignore.d.tsfiles so ESLint doesn't try to parse them with the JS parser.Full description here.
Related Issue(s)
Resolves #6789
Checklist
This is a config setup change. Please let me know if I should be running any tests!
flowforge.yml?FlowFuse/helmto update ConfigMap TemplateFlowFuse/CloudProjectto update values for Staging/ProductionLabels
area:migrationlabel