Skip to content

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

Open
n-lark wants to merge 1 commit intomainfrom
6789-vue-vscode-setup
Open

6789 - VS Code: Go-to-Definition for Global Vue Components #6790
n-lark wants to merge 1 commit intomainfrom
6789-vue-vscode-setup

Conversation

@n-lark
Copy link

@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

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.65%. Comparing base (d958009) to head (84523f8).

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           
Flag Coverage Δ
backend 76.65% <ø> (ø)

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
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
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
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

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

2 participants