New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two new argument types: checkbox and checklist #104
Comments
Hey @ManuelFte , Thanks for taking the time to write this up, and for investigating the extra effort for the examples - love that! Let's coktijuecuour ideas into the design. I think we could break this design into a few types as you're alluding to;
I can't think of any other design considerations right now, what do you think? |
For the boolean, 1/0 definitely sounds better than true/false as strings. What would be the difference between CSV also sounds fine as the format for the array. I have no more recommendations, happy to hear that this seems to be very smooth. Edit: actually, I just thought on a suggestion: for the checklist, maybe an option to select all/select none would be a plus. |
This sounds sensible :-) Now that I think the design looks complete, I'm going to try and capture these design choices as some sort of acceptance criteria for this feature. I've not done that before, but I think that's how we should be implementing features / changes in OliveTin. This is a nice small feature to test that out on :-) |
Ohh, I get it. So in the practice, Sounds good, it's a built-in feature to accomplish tasks like that of the example without having to write a function that does the verification, and that for shell instructions that are just one-liners it'd be ugly (the verification would be longer than the actual command, lol).
Nice, glad that my suggestion was useful for this, hahaha. Looking forward to see the feature. |
Just had a thought, it may be nice to be able to set string values;
|
Confirmation checkboxes were added based on this suggestion - I just didn't update this issue! https://docs.olivetin.app/confirmation.html |
I would like to suggest the addition of two new argument types which would be a checkbox and a list of checkboxes. These would be useful for functions that require verification or when the user can select several options rather than picking just one from a drop down menu.
I imagine that they could work like this:
checkbox
Returns a boolean. An example could be a button that reboots the server and where the checkbox prevents accidental clicks:
checklist
Returns an array of the options chosen. An example could be a backup script that allows you to choose the directories you want to back up:
The text was updated successfully, but these errors were encountered: