Textualize / trogon

Easily turn your Click CLI into a powerful terminal application
MIT License
2.4k stars 54 forks source link

feat!: refactor to make click optional, support argparse, and ... #38

Closed fresh2dev closed 11 months ago

fresh2dev commented 1 year ago

Example of redaction of sensitive values:

https://asciinema.org/a/0aa5accX2QcN2D8oFwyCYty69

TODO: update README

fresh2dev commented 1 year 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...

fresh2dev commented 1 year ago

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):

image

fresh2dev commented 11 months ago

@darrenburns, any more feedback?

fresh2dev commented 11 months ago

Nevermind...

davep commented 11 months ago

@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.

willmcgugan commented 11 months ago

@fresh2dev Please don’t take our slowness to respond as a lack of interest!

fresh2dev commented 11 months ago

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.

fresh2dev commented 11 months ago

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: