Skip to content

Enhance test input documentation with conditional visibility feature.#101

Open
projkov wants to merge 1 commit intoinferno-framework:mainfrom
projkov:enable-when-docs
Open

Enhance test input documentation with conditional visibility feature.#101
projkov wants to merge 1 commit intoinferno-framework:mainfrom
projkov:enable-when-docs

Conversation

@projkov
Copy link
Contributor

@projkov projkov commented Feb 6, 2026

Updates the docs site for the enable-when-docs work: documents the enable_when input option and conditional visibility, adds the missing select input type, and fixes a few doc typos/formatting issues.

Changes

Inputs and outputs (docs/writing-tests/test-inputs-outputs.md)

  • Conditional visibility: New section "Conditional visibility for inputs" describing enable_when and when to use it (e.g. with Radio or Select inputs), with a full example (radio + enable_when for bundle source).
  • Input options: Document enable_when in the input options list as (optional) with input_name and value.
  • Input types: Add the 'select' type to the list and update the count to "6 possible values."
  • Typos / formatting: Fix 'checkbox'checkbox', double space in title: description, trailing spaces in AuthInfo code blocks, and list continuation indentation under "Behind the Scenes."

Other

  • docs/concepts.md: Fix unclosed quote in figure alt ("Diagram of Inferno Deployment"Diagram of Inferno Deployment").
  • .tool-versions: Ensure newline at end of file.
  • Gemfile.lock: Add arm64-darwin-25 platform (from local bundle install).

- `description:` - a description which is displayed in the UI.
- `type:` - controls the type of HTML input element used in the UI. Currently
there are 5 possible values:
there are 6 possible values:
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the count was off before

Suggested change
there are 6 possible values:
there are 7 possible values:

end
```

### Conditional visibility for inputs
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
### Conditional visibility for inputs
### Conditional UI visibility for inputs

Locking an input can force it to use a value from a previous test's output, or
the default value.
- `hidden:` - (**default: false**) hide the input from the UI. Must be used with either `optional: true` or `locked: true`.
- `enable_when` - (**optional**) adds conditional visibility for inputs. It's a hash with `input_name` and `value`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- `enable_when` - (**optional**) adds conditional visibility for inputs. It's a hash with `input_name` and `value`.
- `enable_when` - (**optional**) adds conditional UI visibility for the input, causing it to be displayed only when the indicated input has the specified value. The value is a hash with keys `input_name` and `value`.

```

### Conditional visibility for inputs
Inputs can be shown or hidden based on the value of another input using an `enable_when` condition. We recommend implementing conditional visibility based on **Radio** or **Select** inputs.
Copy link
Contributor

Choose a reason for hiding this comment

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

Provide a bit of detail on the semantics and a bit of context for the example and what it is doing.

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.

2 participants