Customizable badge colors #2886
Replies: 1 comment 1 reply
-
Thanks for the suggestion @ZachNagengast! I hadn't seen it as a "failing" color. The only thing that makes me hesitate is that our badges are intended to indicate compatibility rather than to be any kind of CI, and we deliberately didn't use green for that reason. The difference is subtle, but allowing a customised colour might take it one step closer to being seen as CI. The only other thing I'd want to keep in mind is to keep the UI for copying the Markown nice and simple. It would be possible to add a colour field there, but I'm not sure I want to make that more complex, and without something along those lines it would be hard to communicate that customisation was available. I'm not dead against it, but I'm also not sure I'm convinced it's a good idea yet 😂 |
Beta Was this translation helpful? Give feedback.
-
It would be nice to be able to customize the color of the badge through the api. As much as I love the swift red - red is also the color used when builds/tests are failing, since these badges are usually clustered together it would be great if all the colors could match when the repo is in a "passing" state.
Example:
It may be as simple as adding another param here to the BadgeQuery for
color
SwiftPackageIndex-Server/Sources/App/Controllers/API/API+PackageController.swift
Line 35 in 93e4e4e
Currently, it appears to just be a hardcoded hex as long as the badge has valid values:
SwiftPackageIndex-Server/Sources/App/Core/Extensions/Badge.swift
Line 55 in 93e4e4e
Beta Was this translation helpful? Give feedback.
All reactions