Skip to content

6789 - VS Code: Go-to-Definition for Global Vue Components #6790

Merged
Steve-Mcl merged 3 commits intomainfrom
6789-vue-vscode-setup
Mar 10, 2026
Merged

6789 - VS Code: Go-to-Definition for Global Vue Components #6790
Steve-Mcl merged 3 commits intomainfrom
6789-vue-vscode-setup

Conversation

@n-lark
Copy link
Copy Markdown
Contributor

@n-lark n-lark commented Mar 3, 2026

Description

Sets up VS Code tooling to improve the developer experience when working with Vue components.

  1. Adds a components.d.ts declaration file so Volar (Vue - Official) can resolve globally registered ff-* components to their source files, enabling go-to-definition and autocomplete in templates.
  2. Adds a jsconfig.json so Volar discovers the frontend source.
  3. Updates .eslintrc to ignore .d.ts files 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!

  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

@n-lark n-lark self-assigned this Mar 3, 2026
@n-lark n-lark added the time:1h label Mar 3, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.70%. Comparing base (6508364) to head (3dd66e3).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6790      +/-   ##
==========================================
+ Coverage   76.64%   76.70%   +0.05%     
==========================================
  Files         399      399              
  Lines       20155    20155              
  Branches     4851     4851              
==========================================
+ Hits        15447    15459      +12     
+ Misses       4708     4696      -12     
Flag Coverage Δ
backend 76.70% <ø> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@n-lark n-lark requested a review from cstns March 3, 2026 20:05
@n-lark n-lark removed the time:1h label Mar 3, 2026
Copy link
Copy Markdown
Contributor

@cstns cstns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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' {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@cstns
Copy link
Copy Markdown
Contributor

cstns commented Mar 4, 2026

Holding off on merging.

@Steve-Mcl, could you give this a quick spin and check usability? your VSCode foo is better than mine

Copy link
Copy Markdown
Contributor

@Steve-Mcl Steve-Mcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working great.
I tested about 20 different vue pages & all but one was click navigable (ff-layout-platform) I pushed a change for that,

@Steve-Mcl Steve-Mcl merged commit acf3666 into main Mar 10, 2026
30 checks passed
@Steve-Mcl Steve-Mcl deleted the 6789-vue-vscode-setup branch March 10, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VS Code: Go-to-Definition for Global Vue Components

3 participants