Details
We try our best to make it easy to write a DIY widget on Cockpit, by putting a Monaco Editor, with auto-complete of data-lake variables and the window.cockpit API, but it will never be the same as writing in your own setup. When you're writing code, it's usually easier if you're doing that on your usual setup (your computer, with your IDE of choice, desired extensions, auto-completes, etc).
I don't know what exactly could we do to make it easier writing DIY widgets outside Cockpit, but maybe there're some things we can improve. Writing a .html to .json converter? Adding a syntax auto-complete extension to VSCode? MCP server? I'm not sure, but there's probably room for improvement there.
Additional Context
Raised while reviewing documentation.
Details
We try our best to make it easy to write a DIY widget on Cockpit, by putting a Monaco Editor, with auto-complete of data-lake variables and the
window.cockpitAPI, but it will never be the same as writing in your own setup. When you're writing code, it's usually easier if you're doing that on your usual setup (your computer, with your IDE of choice, desired extensions, auto-completes, etc).I don't know what exactly could we do to make it easier writing DIY widgets outside Cockpit, but maybe there're some things we can improve. Writing a
.htmlto.jsonconverter? Adding a syntax auto-complete extension to VSCode? MCP server? I'm not sure, but there's probably room for improvement there.Additional Context
Raised while reviewing documentation.