Add VARIABLE_DESCRIPTION and VARIABLE_OPTION keywords for plugin.txt#2703
Add VARIABLE_DESCRIPTION and VARIABLE_OPTION keywords for plugin.txt#2703
Conversation
…ables Implements GitHub issues #1309 and #764: - Add VARIABLE_DESCRIPTION keyword to provide human-readable descriptions for plugin variables, displayed as hint text during installation - Add VARIABLE_OPTION keyword to define selectable options for variables, rendering as a combobox/dropdown instead of a text field - Beautify PluginDialog with responsive 4-column grid layout, proper title positioning, and improved spacing - Update demo plugin.txt with example usage of new keywords - Add comprehensive specs for new keyword parsing - Maintain backwards compatibility with existing plugin variable formats 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2703 +/- ##
==========================================
- Coverage 79.31% 79.24% -0.07%
==========================================
Files 662 664 +2
Lines 52588 52845 +257
Branches 734 734
==========================================
+ Hits 41708 41879 +171
- Misses 10800 10886 +86
Partials 80 80
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Change VARIABLE_OPTION to VARIABLE_STATE |
I thought about that but STATE already means string key to numeric value in cmd / tlm and this is different. It's simply a string option that the variable can take. I don't want to conflate our original STATE meaning with this. Plus STATE is already overloaded and hard to use as a search term in our docs. |
|
STATE means string to whatever. This should probably work the same way. Key value pairs. Allows for selecting something simple that means something complicated. |
| # target per plugin | ||
|
|
||
| VARIABLE inst_target_name INST | ||
| VARIABLE_DESCRIPTION inst_target_name "Name for the primary INST target (leave blank to exclude)" |
There was a problem hiding this comment.
Rather than referencing the variable, make these order dependent. Ie.
VARIABLE ...
VARIABLE_DESCRIPTION "Description"
| VARIABLE_STATE log_retain_time 2592000 "30 days" | ||
| VARIABLE reduced_log_retain_time 2592000 | ||
| VARIABLE_DESCRIPTION reduced_log_retain_time "Reduced log retention time in seconds (default: 30 days)" | ||
| VARIABLE_STATE reduced_log_retain_time 604800 "1 week" |
There was a problem hiding this comment.
Should be key value, not value key. Also again make auto reference to most recently defined variable.
VARIABLE ...
VARIABLE_STATE "Shown Value" "Used Value"
Address PR review feedback: - VARIABLE_DESCRIPTION and VARIABLE_STATE now auto-reference the most recently defined VARIABLE instead of requiring the variable name - VARIABLE_STATE format changed to "Display Text" Value (key-value with shown value first) - Update PluginDialog.vue to display text field from VARIABLE_STATE - Update demo plugin.txt with new nested syntax Co-Authored-By: Claude Opus 4.5 <[email protected]>
ryanmelt
left a comment
There was a problem hiding this comment.
Love it. Future enhancement could allow the states to support 1 argument and automatically copy it to the second argument.

closes #1309
closes #764