jsr-io / jsr

The open-source package registry for modern JavaScript and TypeScript
https://jsr.io
MIT License
2.15k stars 97 forks source link

[Feature request] `logoColor` option for badges #626

Open nvlang opened 3 days ago

nvlang commented 3 days ago

This is a feature request to enable the logoColor option for JSR badges.

Example

![JSR](https://jsr.io/badges/@luca/flag?color=073343&labelColor=073343&logoColor=F7DF1D)
![JSR Score](https://jsr.io/badges/@luca/flag/score?color=073343&labelColor=073343&logoColor=F7DF1D)

Currently renders:

JSR JSR Score

Desired render:

JSR JSR Score


The desired render above is generated by the following code:

![JSR](https://img.shields.io/badge/1.0.1-_?labelColor=073343&color=073343&logo=jsr&logoColor=F7DF1D&logoSize=auto)
![JSR Score](https://img.shields.io/badge/@luca/flag-_?labelColor=073343&color=073343&logo=jsr&logoColor=F7DF1D&logoSize=auto)
alectrocute commented 3 days ago

Implemented in https://github.com/jsr-io/jsr/pull/629. Thanks for filing this issue!

nvlang commented 3 days ago

@alectrocute Thank you so much!

By the way, this is only tangentially related, but I saw the following lines while trying to draft a PR for this:

https://github.com/jsr-io/jsr/blob/c61a6cd3f306ae49ac6ba08ea15224aaaa6b4f23/e2e/main_test.ts#L335-L348

I suspect that these could be safely un-commented, since the scope and score badges are available by now? If so, maybe such change could be added to your PR? I can of course also create a PR for this myself, I just can't actually test the changes, since I don't have the necessary local environment set up.

alectrocute commented 3 days ago

@nvlang, thanks. Nice catch! I've uncommented them in my PR: https://github.com/jsr-io/jsr/pull/629/commits/ae60ce2b4695ec8963eefeabb40c129782740762