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

Add support for Unspecified Author Colors #3496

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

Conversation

jevndev
Copy link

@jevndev jevndev commented Apr 14, 2024

  • PR Description
    Adds the support for the user to control the colors lazygit picks from when generating colors for unspecified authors

  • Notes

There were some questions that came up w.r.t. how this plays with the wildcard authorColors syntax. Notably, how to handle the case when both are present. In this iteration of the pr I've just removed support for that syntax. I'm open to suggestions of a more elegant solution.

Additionally, It was difficult to write robust tests for these changes. Tests I couldn't find a way to implement include:

  • Unspecified author colors are preferred over random ones if available
  • Setting unspecified author colors sets all of them
  • Specified author colors are preferred over unspecified author colors

This is because of the lack of existing comparison functionality for TextStyles. Implementing that seemed out of scope for this change. I would love input on how to either refactor this feature to make it more easily testable without having to introduce those changes.

  • Please check if the PR fulfills these requirements
  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • Docs (specifically docs/Config.md) have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

jevndev and others added 2 commits April 14, 2024 13:47
Adds the support for the user to control the colors lazygit
picks from when generating colors for unspecified authors
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.

1 participant