Repository navigation
feat: support vue-sfc language in ui-template editor - #426
Merged
Merged
Conversation
The ui-template code editor uses a "vue-sfc" Monaco language when the dashboard provides its Vue SFC editor. Register the ui-template CodeLens and inline completions for vue-sfc alongside html, use the html indentation rules for it, and treat it like html when checking for comments.
Merged
3 of 11 tasks
Dashboard keeps ui-template on html unless nr-assistant says it can handle vue-sfc, so older nr-assistant installs don't lose Expert completions and the CodeLens. Set supportsVueSfc on the plugin so Dashboard can switch to vue-sfc.
Contributor
Author
|
Added the explicit flag Please re-approve if OK |
andypalmi
approved these changes
Oct 15, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
vue-sfcsupport for the ui-template editor. FlowFuse/node-red-dashboard#2290 switches ui-template's Monaco language tovue-sfcwhen the Vue SFC editor is available. nr-assistant currently only registers its ui-template CodeLens and inline completions forhtml, so neither appears in that editor.vue-sfcas well ashtmlvue-sfcentry tosupportedInlineCompletions, using thehtmlindentation rulesvue-sfclikehtmlinisInsideCommentThe
htmlregistrations are unchanged, so older dashboard versions keep working. FIM requests from the template part now sendlanguageId: 'vue-sfc', so the FIM backend must accept it before this is released.Dashboard only uses
vue-sfcwith nr-assistant 0.21.0 or later (so this needs to be released as a minor version).Testing
Tested manually with the dashboard PR branch: CodeLens shows, completions work in the template,
<script>and<style>, and are skipped inside<!-- -->.None of this code has test coverage, since it's inline in
index.html. I considered movingisInsideCommentintosharedUtils.jsto test it, but didn't think it was worth it for this change.Related Issue(s)
FlowFuse/node-red-dashboard#2290
Checklist
flowforge.yml?FlowFuse/helmto update ConfigMap TemplateFlowFuse/CloudProjectto update values for Staging/ProductionLabels
area:migrationlabel