-
-
Notifications
You must be signed in to change notification settings - Fork 680
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
✨ Improve column help display, ensure commands column width is the same on all panels #567
Conversation
📝 Docs preview for commit f70ff2c at: https://640f3954f300560548fa88fa--typertiangolo.netlify.app |
Previously the width of table columns for commands in each panel used auto-width, making hard to read the commands.
f70ff2c
to
0e5fa16
Compare
📝 Docs preview for commit 0e5fa16 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..
..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: #489 |
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. |
That's probably because this PR was created branching off an older version of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this with a slightly altered version of docs_src/commands/help/tutorial006.py
(making the command names differ more in length) and I do think this change improves readability overall of the console output, as also demonstrated by the screenshots in the PR description.
Previously the width of table columns for commands in each panel used
auto-width, making hard to read the commands.
Before
After