-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Modrinth Game Versions don't show ranges #10346
Comments
Hello @n-aspen 👋🏻 Thanks for reporting, that badge is indeed very long. 😄 The API doesn't seem to be returning any range info, just a list of versions. If we get A less elegant but more robust solution would be to put an ellipsis in the middle, e.g. |
That's probably a reasonable solution for 90% of use cases tbh. Most of the time a project will support a lower and upper bound for versions. I wanted to see how Modrinth handled it as their website is open source, and I think this is it? I'm not completely certain though, and best as I can tell it'd be way out of scope for this. |
I found a definitive answer to this question
This plugin 1u6JkXh5, has an old-ish release that only has
|
Thanks for digging that out! I'd foresee two issues with following a similar approach:
I'll let other maintainers weigh in, but I'd personally be in favour of a simpler and more robust solution, e.g. something ellipsis-based like |
Ellipsis is definitely the easiest thing to do, and it puts a cap on the length. There are going to be some situations where it is not that helpful There is a Modrinth API endpoint which gives all the available game versions. https://api.modrinth.com/v2/tag/game_version
We could potentially use that to work out if a list of supported game versions on a project can be displayed as a range. It would be an extra API request, but we could do them in parallel or cache the |
Are you experiencing an issue with...
shields.io
🐞 Description
When the latest release of a Modrinth project has a range of supported version, each version is listed individually instead of as a range as it is on Modrinth. This causes very long badges in some cases.
🔗 Link to the badge
https://img.shields.io/modrinth/game-versions/P1OZGk5p
https://modrinth.com/plugin/viaversion
💡 Possible Solution
Using the same range behavior when multiple versions are supported as Modrinth would be ideal and is what I was expecting.
The text was updated successfully, but these errors were encountered: