fix: Supporting syntax highlighting for TOML-formatted values when viewing KV in the Consul GUI#23131
Conversation
This adds TOML syntax highlighting as an option for viewing and editing Key/Value entries in the Consul GUI. Changes: - Add Format dropdown selector (JSON, YAML, HCL, TOML) when Code mode is enabled - Create toml-extension helper using @codemirror/legacy-modes/mode/toml for CodeMirror 6 TOML syntax highlighting via @CustomExtensions - For CodeBlock (readonly view), TOML falls back to HCL highlighting since HDS CodeBlock doesn't natively support TOML Closes hashicorp#12668 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: majiayu000 <1835304752@qq.com>
|
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes Have you signed the CLA already but the status is still pending? Recheck it. |
|
Hi! I'm interested in contributing to this. Let me know if you'd like to discuss the implementation approach. (Connected through Echeo) |
|
This pull request has been automatically flagged for inactivity because it has not been acted upon in the last 60 days. It will be closed if no new activity occurs in the next 30 days. Please feel free to re-open to resurrect the change if you feel this has happened by mistake. Thank you for your contributions. |
Summary
This PR fixes #12668
Changes
ui/packages/consul-ui/app/components/consul/kv/form/index.hbsui/packages/consul-ui/app/components/consul/kv/form/index.jsui/packages/consul-ui/app/helpers/toml-extension.js