Skip to content

Add VARIABLE_DESCRIPTION and VARIABLE_OPTION keywords for plugin.txt#2703

Merged
jmthomas merged 3 commits intomainfrom
plugin_variables
Jan 9, 2026
Merged

Add VARIABLE_DESCRIPTION and VARIABLE_OPTION keywords for plugin.txt#2703
jmthomas merged 3 commits intomainfrom
plugin_variables

Conversation

@jmthomas
Copy link
Copy Markdown
Member

@jmthomas jmthomas commented Jan 1, 2026

  • 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

closes #1309
closes #764

…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]>
@jmthomas
Copy link
Copy Markdown
Member Author

jmthomas commented Jan 1, 2026

Screenshot 2026-01-01 at 2 52 32 PM

@jmthomas jmthomas requested review from clayandgen, ryan-pratt and ryanmelt and removed request for ryan-pratt January 1, 2026 21:56
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.24%. Comparing base (f3d5ff5) to head (aa065a8).
⚠️ Report is 54 commits behind head on main.

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              
Flag Coverage Δ
python 81.17% <ø> (-0.20%) ⬇️
ruby-api 84.76% <ø> (-0.06%) ⬇️
ruby-backend 82.16% <100.00%> (+<0.01%) ⬆️

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.

@ryanmelt
Copy link
Copy Markdown
Member

ryanmelt commented Jan 1, 2026

Change VARIABLE_OPTION to VARIABLE_STATE

@jmthomas
Copy link
Copy Markdown
Member Author

jmthomas commented Jan 2, 2026

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.

@ryanmelt
Copy link
Copy Markdown
Member

ryanmelt commented Jan 2, 2026

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)"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]>
@jmthomas jmthomas requested a review from ryanmelt January 8, 2026 16:23
Copy link
Copy Markdown
Member

@ryanmelt ryanmelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it. Future enhancement could allow the states to support 1 argument and automatically copy it to the second argument.

@jmthomas jmthomas merged commit afc2506 into main Jan 9, 2026
47 checks passed
@jmthomas jmthomas deleted the plugin_variables branch January 9, 2026 15:42
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.

plugin.txt VARIABLE array options as combobox VARIABLE keyword (in plugin.txt) could use a "description" feature

2 participants