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 colors for project names #6481

Open
4 tasks done
sheremet-va opened this issue Sep 12, 2024 · 6 comments
Open
4 tasks done

Allow custom colors for project names #6481

sheremet-va opened this issue Sep 12, 2024 · 6 comments
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)

Comments

@sheremet-va
Copy link
Member

Clear and concise description of the problem

It is not possible to configure colors of the project names in UI or in the CLI.

Suggested solution

Allow accepting the name property as an object:

interface ProjectName {
  name: string
  color: keyof Colors
}

We should also change the default colors to be background ones by default (this was initially part of #6329):
Screenshot 2024-08-12 at 23 03 51

Alternative

No response

Additional context

No response

Validations

@sheremet-va sheremet-va added enhancement: pending triage p2-nice-to-have Not breaking anything but nice to have (priority) and removed enhancement: pending triage labels Sep 12, 2024
@sheremet-va sheremet-va moved this to Approved in Team Board Sep 12, 2024
@AriPerkkio
Copy link
Member

Related to #6338

@kevinmarrec
Copy link

kevinmarrec commented Jan 19, 2025

@sheremet-va Vitest should provide somehow at minimum 2 colorsets (until custom colors for project names come out), following an accessible dark/light theme convention, because when running Vitest with workspaces, either in a terminal with dark background or in Github Actions with dark background, it's not accessible (especially on Github actions) :

Image

Image

@rgrove
Copy link
Contributor

rgrove commented Jan 27, 2025

I was surprised to discover that in Vitest 3, project names are completely unreadable in my terminal with a dark color scheme. The big blank space on the left in the screenshot below is where (invisible) project names are printed. I've obscured the filenames on the right since this is a non-public codebase.

@kevinmarrec
Copy link

kevinmarrec commented Jan 27, 2025

I think the first color picked is black :

const colors = [c.black, c.yellow, c.cyan, c.green, c.magenta]

@rgrove And I guess you're being pretty unlucky because your terminal background is exactly the same black color Vitest is using (from tinyrainbow library), so you don't see it at all 😵

@rgrove
Copy link
Contributor

rgrove commented Jan 27, 2025

Yeah, that looks like the problem! Seems like this issue with dark backgrounds could be mitigated by removing black from the list of possible colors?

@kevinmarrec
Copy link

I guess it could be indeed a first step before letting us customize the colors from the config options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
Status: Approved
Development

Successfully merging a pull request may close this issue.

4 participants