Skip to content
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

✨ Allow custom styles for commands in help output #1103

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TheTechromancer
Copy link

@TheTechromancer TheTechromancer commented Dec 31, 2024

This PR makes a small tweak to the command highlighting in help output to use the global STYLE_OPTION instead of being hardcoded as bold cyan:

image

This allows users to more easily customize colors in their help output.

By default, this has no effect since the default STYLE_OPTION is already bold cyan.

@svlandeg svlandeg changed the title Allow custom styles for commands in help output ✨ Allow custom styles for commands in help output Jan 2, 2025
@svlandeg svlandeg added the feature New feature, enhancement or request label Jan 2, 2025
Copy link
Member

@svlandeg svlandeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!
Good catch - that style shouldn't be hardcoded like this.

We could indeed reuse STYLE_OPTION as you propose, but that would mean that the color of this first column would always be the same as the style chosen for the console's "option" theme. I think these may also be separate things?

So basically I think we could take this one step further and define a new var, something like STYLE_COMMANDS_TABLE_FIRST_COLUMN and set that to "bold cyan" to default? What do you think?

@svlandeg svlandeg self-assigned this Jan 2, 2025
@TheTechromancer
Copy link
Author

Sounds good @svlandeg, I made the change.

Copy link
Member

@svlandeg svlandeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good to me! I'll leave this for Tiangolo to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature, enhancement or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants