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

cli: allow colors in form '#rrggbb' #3310

Merged
merged 1 commit into from
Mar 18, 2024
Merged

Conversation

tomafro
Copy link
Contributor

@tomafro tomafro commented Mar 16, 2024

I made this change partly to scratch a very minor personal itch, but mainly as a first step to get my head around the codebase, build process, etc. TBH I was surprised how easy it was to support this (being English the hardest part was writing color vs colour!). Given how little complexity it adds to the code, I'd hope it would be considered.

That said, all new features are overhead, and I will not be offended if this is unwanted. I've enjoyed getting it working and learnt a lot, which was my main goal.

Thanks everyone for all the work on jujutsu. I'm really enjoying using it.

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

Copy link

google-cla bot commented Mar 16, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@tomafro tomafro force-pushed the push-lsxlqsxwrwvl branch from 84bfba4 to 8caa227 Compare March 16, 2024 10:57
cli/src/formatter.rs Outdated Show resolved Hide resolved
@tomafro tomafro force-pushed the push-lsxlqsxwrwvl branch from 8caa227 to 77276c6 Compare March 17, 2024 08:27
@tomafro tomafro changed the title cli: allow colors in form 'rgb(r, g, b)' cli: allow colors in form '#rrggbb' Mar 17, 2024
@tomafro tomafro force-pushed the push-lsxlqsxwrwvl branch 3 times, most recently from 05f0212 to e0382cc Compare March 17, 2024 11:06
@tomafro tomafro marked this pull request as ready for review March 17, 2024 11:17
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

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

I'm not familiar with the config-schema stuff. Other than that, the code looks good to me, thanks.

cli/src/formatter.rs Outdated Show resolved Hide resolved
cli/src/formatter.rs Outdated Show resolved Hide resolved
cli/src/formatter.rs Outdated Show resolved Hide resolved
@tomafro tomafro force-pushed the push-lsxlqsxwrwvl branch 3 times, most recently from 8eaf9fb to 3aa5610 Compare March 17, 2024 21:34
Changes the formatter to accept not only existing color names (such as "red" or
"green") but also those in the form #rrggbb, where rr, gg, and bb are two-digit
hexadecimal numbers. This allows much finer control over colors used.
@tomafro tomafro force-pushed the push-lsxlqsxwrwvl branch from 3aa5610 to 9c174ca Compare March 18, 2024 07:12
@tomafro tomafro merged commit 933150d into jj-vcs:main Mar 18, 2024
16 checks passed
@tomafro tomafro deleted the push-lsxlqsxwrwvl branch March 21, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants