Closed fresh2dev closed 11 months ago
One thing I noticed was that when one of the values of a multi-value param is a "choice" type, the "Select" widget is not rendered (it seems to be defaulting to the text input widget)
Good catch. My goal is to retain existing behavior. This one is tricky because an instantiated Choice
is not really a type, but an instance of a data structure. Will have to mull over this a bit...
I restored the original behavior -- while remaining click-independent -- in this commit:
https://github.com/Textualize/trogon/pull/38/commits/e35fde14319998b32aa29b1c2cc3ff08f44bc295
This also addresses a bug that allows this to happen for multiple-choice parameters (both in main and in this fork):
@darrenburns, any more feedback?
Nevermind...
@fresh2dev Darren has been very focused on a particular new feature of Textual recently, and we're just coming out of a period of holidays and an office move; on top of that we don't always get to our keyboards over the weekend. It can take a wee while to catch up on everything.
@fresh2dev Please don’t take our slowness to respond as a lack of interest!
Glad to hear that... TBH, a month without significant feedback -- here or on Discord -- did lead me to believe that there wasn't much interest. Given the potentially profound implications of this change, I was expecting a bit more engagement, but I understand that y'all have a lot of moving priorities. I sincerely admire the work y'all are putting in -- and the solutions you've delivered -- to elevate the command-line experience. All the time twiddling my thumbs on this PR gave room for some ideas to grow. Despite the fact that this PR was large, I did my best to limit my scope and changes to make it digestible and familiar enough. Once I became convinced this wasn't going anywhere, I unleashed my urges on a Trogon fork argparse-tui and have learned how argparse support is even more advantageous than I originally envisioned. Very eager to spruce up the docs and share more with your team in the near future.
Coincidentally just stumbled across this post from @willmcgugan, referenced in an article currently on the HackerNews front page.
https://textual.textualize.io/blog/2023/07/29/pull-requests-are-cake-or-puppies/
My work here is quite the puppy, and as puppies do, it's growin' fast! Very eager to show y'all the tricks this bitch is capable of :joy:
make
click
optionaladd introspection for argparse parser.
add support for manually constructing schemas for the TUI
add examples for
typer
add examples for
yapx
add examples for
myke
remove support for custom click types, e.g.,
IntRange
,FloatRange
positional arguments come before keyword arguments in the generated command
ability to join list arguments values like this:
-x 1 -x 2 -x 3
(default), or like this:-x 1 2 3
(multi-value)omit commands decorated with
click.command(hidden=True)
omit parameters decorated with
click.option(hidden=True)
add these properties to
ArgumentSchema
:read_only
,placeholder
, andsensitive
. This enables:click.option(prompt=True, prompt_required=True)
click.option(hide_input=True)
Example of redaction of sensitive values:
https://asciinema.org/a/0aa5accX2QcN2D8oFwyCYty69
TODO: update README