Repository navigation
feat(ui): show yes-or-no arguments as switches - #70
Merged
Merged
Conversation
An argument declared with kind boolean, or whose values are just yes and no or true and false, is a switch in the action form, as on a set-up tab. An action with a switch opens the form, on the host page too, and its question is asked from Run with y or n, naming the switches that are on. The command line and the server take yes/no, true/false, on/off and 1/0.
…wn question An argument now carries fixed, why it keeps its default here, and a switch can carry its own confirm, asked instead of the action's while it is on. Remove uses both: destroy is fixed for a host no provisioner made, and on it asks the destroy question. A dialog's keys are drawn inside its box, and the form's footer shows them while its question is open.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An action's yes-or-no argument (destroy on Remove, hostname on Rename, force on Stop, restart on Grow root disk, create on Duplicate, the plugins' keep_volume and friends) was a text field holding `no` that you had to overwrite with `yes`. It is now a switch, drawn and toggled as on the set-up tabs.
The writing-plugins page documents the boolean kind.
The host page's form doesn't run `choices` commands, so an action that has one stays on the dialog. Its yes-or-no arguments are offered there as a choice of two.