Skip to content

Added alt_command and labels to ability documentation#112

Open
matthewRekos wants to merge 1 commit intomasterfrom
mjr-dev-fact-toggle
Open

Added alt_command and labels to ability documentation#112
matthewRekos wants to merge 1 commit intomasterfrom
mjr-dev-fact-toggle

Conversation

@matthewRekos
Copy link
Contributor

Description

Documentation for mjr-dev branch of caldera - Adds alt_command, labels to ability description for alt_command toggle in operations.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Mostly manual tests - would need advisement on UI element testing

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds documentation for new alt_command and labels fields in ability definitions to support a toggle UI feature that allows users to switch between alternative commands within the same ability.

  • Added alt_command and labels fields to the sample ability YAML structure
  • Updated the platform block description to include the new optional fields
  • Added detailed explanations of the new fields' purposes and usage

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


**Alt Command**: A second command listed in the same ability. This generates a "toggle" UI element which lets a user switch between 'command' and 'alt_command' within the same ability choice. This is recommended for abilities which accomplish similar goals but have different commands that may be confusing or require a great deal of documentation to explain.

**Labels**: A list of 2 strings that are the labels for the toggle added by the Alt Command field.
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

The description is unclear about what the labels represent. Consider clarifying that these labels correspond to the command and alt_command options, and explain their order (e.g., first label for command, second for alt_command).

Suggested change
**Labels**: A list of 2 strings that are the labels for the toggle added by the Alt Command field.
**Labels**: A list of 2 strings that are the labels for the toggle added by the Alt Command field. The first label corresponds to the `command` option, and the second label corresponds to the `alt_command` option.

Copilot uses AI. Check for mistakes.
Comment on lines +72 to +73
alt_command:
'./wifi.sh modify'
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

The example shows alt_command as a single quoted string but the main command is using multi-line syntax with '|'. For consistency, consider using the same YAML syntax format for both commands or explain why they differ.

Suggested change
alt_command:
'./wifi.sh modify'
alt_command: |
./wifi.sh modify

Copilot uses AI. Check for mistakes.
@deacon-mp
Copy link
Contributor

Can you address the above and resubmit for Review

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.

3 participants