typer icon indicating copy to clipboard operation
typer copied to clipboard

Ensure commands column width is the same on all panels

Open ssbarnea opened this issue 2 years ago • 8 comments

Previously the width of table columns for commands in each panel used auto-width, making hard to read the commands.

Before

After

ssbarnea avatar Mar 13 '23 14:03 ssbarnea

📝 Docs preview for commit f70ff2c74a49de311198b09ef06beba176254c4a at: https://640f3954f300560548fa88fa--typertiangolo.netlify.app

github-actions[bot] avatar Mar 13 '23 14:03 github-actions[bot]

📝 Docs preview for commit 0e5fa16dece7ca15bfad5be7aeb0bf364dd4aa9b at: https://640f39bbca7db60a79d17d5a--typertiangolo.netlify.app

github-actions[bot] avatar Mar 13 '23 14:03 github-actions[bot]

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.

Skyler-Altol avatar Jul 22 '23 13:07 Skyler-Altol

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 ❤️

Tremeschin avatar Feb 06 '24 04:02 Tremeschin

This looks great, thanks for the contribution! We'll get this reviewed soonish.

svlandeg avatar Mar 01 '24 15:03 svlandeg

[maintenance note] related PR: https://github.com/tiangolo/typer/pull/489

svlandeg avatar Mar 08 '24 14:03 svlandeg

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

NikosAlexandris avatar Mar 17 '24 09:03 NikosAlexandris

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.

svlandeg avatar Apr 05 '24 12:04 svlandeg

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:

tiangolo avatar Apr 08 '24 19:04 tiangolo