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

Color changes for custom dynamic badges #223

Open
toulzx opened this issue Jul 30, 2021 · 2 comments
Open

Color changes for custom dynamic badges #223

toulzx opened this issue Jul 30, 2021 · 2 comments
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed prio c

Comments

@toulzx
Copy link

toulzx commented Jul 30, 2021

image

In Wakapi.dev/settings/Integrations, I found the badges you provided for us, thank you very much.

My Idea

I would like to know if it is possible to optimize the display of badges even further by setting the color of these badges to be displayed dynamically?

More Details

For example, according to my needs, I set the color to orange when it exceeds 30mins(like this: image), green when it exceeds 1h(image), and red when it is otherwise displayed(image). This way visitors can get a more intuitive picture of your coding time today compared to the expected situation.

What I Did

I have tried to make it via shields.io, but unfortunately it doesn't support this, I found a similar issue in repo: badges/shields: Color changes for custom dynamic badges, which they suggest to implement via endpoint badge. I noticed that the badge provided by Wakapi is also implemented via it, so I think it's something to try.

B.T.W.

English is not my native language, so please forgive any possible errors I may have made.
This issue was inspired by Color changes for custom dynamic badges.

@muety
Copy link
Owner

muety commented Aug 1, 2021

Great idea! This is definitely something I would like to see in Wakapi, although not with a very high priority.

One thing that has to be clarified upfront is whether the colors shall be customizable or not. If yes, this is a bigger change, as it would require data model and UI for configuring rules, just like conditional formatting in Excel. If not, what would you suggest as meaningful thresholds and according colors?

@muety muety added enhancement New feature or request prio c labels Aug 1, 2021
@toulzx
Copy link
Author

toulzx commented Aug 2, 2021

Thanks for your reply :)

I think it would be better to provide uniform color change rules and color match.

On the one hand, it would be more convinent for developers to implement features, and on the other hand, uniform change rules would make it easier for users (often Wakapi users) to access the information corresponding to the colors.

It may be a good choice to divide the target time into three or four equal parts as thresholds. As an example, for the target time "3hrs20mins"

25% 50% 75% 100%
25% 50% 75% 100%

I don't have much experience in color matching. Among the limited colors provided by shields.io, so I chose a color match that doesn't look too aggressive. For your reference.

@muety muety added hacktoberfest help wanted Extra attention is needed labels Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed prio c
Projects
None yet
Development

No branches or pull requests

2 participants