Ensure commands column width is the same on all panels
Previously the width of table columns for commands in each panel used auto-width, making hard to read the commands.
Before

After

📝 Docs preview for commit f70ff2c74a49de311198b09ef06beba176254c4a at: https://640f3954f300560548fa88fa--typertiangolo.netlify.app
📝 Docs preview for commit 0e5fa16dece7ca15bfad5be7aeb0bf364dd4aa9b at: https://640f39bbca7db60a79d17d5a--typertiangolo.netlify.app
This is awesome, @tiangolo can we get this merged please? A bunch of people at my work have not liked the fact that the panels didn't align in some of the CLI utilities we built that use Typer, and that help text for commands was sometimes wayyyy off to the far right instead of being close to the command name as you'd expect. This PR fixes that and all tests have passed.
Adding my two cents in;
I've been waiting ages for this to be accepted 😭, I discovered this PR near the time it was created after my research advisor pointed the "misalignment" on a meeting last year showcasing an internal management tool; Even thought I've some level of OCD myself, I've never really noticed this, but now I can't unsee it 😂
There's a workaround to install the PR as a git dependency on pip/poetry with..
pip install git+https://github.com/tiangolo/typer.git@refs/pull/567/head
..but, magically, some PCs on the lab didn't have git, and future-proofing documentation for non tech-savy students on multiple OSs wasn't ideal, and stuff could easily break on their hands I reckon.
The CLIs are much more elegant and professional with the alignment, please @tiangolo, consider merging this PR ❤️
This looks great, thanks for the contribution! We'll get this reviewed soonish.
[maintenance note] related PR: https://github.com/tiangolo/typer/pull/489
- pip install git+https://github.com/tiangolo/typer.git@refs/pull/567/head
For some reason this downgrades to typer 0.7.0 here.
Update I just copied over the new file over the old file locally. It works. Looks nice. No idea why pip downgrades typer when install this PR.
No idea why pip downgrades typer when install this PR.
That's probably because this PR was created branching off an older version of master. I'm bringing it up-to-date now.
Awesome, thank you @ssbarnea! :rocket:
Thanks for the discussion here everyone. :coffee:
Thanks for the help and review as always @svlandeg! :bow:
This will be available in the next few hours in Typer 0.12.2 :tada: