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

Maven central version badge should not be prefixed with 'v' #10574

Closed
onacit opened this issue Oct 2, 2024 · 4 comments
Closed

Maven central version badge should not be prefixed with 'v' #10574

onacit opened this issue Oct 2, 2024 · 4 comments
Labels
needs-discussion A consensus is needed to move forward question Support questions, usage questions, unconfirmed bugs, discussions, ideas

Comments

@onacit
Copy link

onacit commented Oct 2, 2024

Are you experiencing an issue with...

shields.io

🐞 Description

I seems the Maven Central Version seems prefix v. I don't have any clue for any purpose or intention.

e.g.
Maven Central Version

The v doesn't add any value but some confusion.

🔗 Link to the badge

No response

💡 Possible Solution

Remove the v prefix from the version value.

@onacit onacit added the question Support questions, usage questions, unconfirmed bugs, discussions, ideas label Oct 2, 2024
@jNullj jNullj added the needs-discussion A consensus is needed to move forward label Oct 3, 2024
@jNullj
Copy link
Collaborator

jNullj commented Oct 3, 2024

Shields.io employs the renderVersionBadge function to render versions consistently across the project (horizontal consistency), including maven-central, by always adding the v prefix using addv.

We have several options to consider:

  1. Change only maven-central to remove the prefix, which would break horizontal consistency and create inconsistency among shields.
  2. Remove the prefix in all version renders, improving vertical consistency for this badge.
  3. Add an option for users to customize the prefix.

A comprehensive discussion on this topic is already underway in issue #10437.

IMO option 3 is best while i think the default should stay with the prefix for now until a standard is set.
Let us know what you think and what solutions you had in mind.

@onacit
Copy link
Author

onacit commented Oct 4, 2024

@jNullj Thank you for the comment. I'm not going to go deep into the issue you mentioned. I agree. Adding an option for users to customize the prefix will help.

@onacit onacit closed this as completed Oct 4, 2024
@ryan-williams
Copy link

+1, this isn't specific to Maven Central badges, I'd like to omit the "v" for PyPI and NPM badges as well. It adds no info, and wastes precious horizontal space on mobile.

Obvious solution:

  • messagePrefix query param, defaults to "v"
  • ?messagePrefix=&… would make it the empty string.

Strange to hard-code the "v" prefix and give no option for overriding.

#10437 seems to be much broader / not obviously related.

@calebcartwright
Copy link
Member

For historical context I'll also point back to #6135

but regarding 👇

#10437 seems to be much broader / not obviously related.

#10437 is directly related, the standardized v prefix on version badges was discussed there explicitly and at length

e.g.

#10437 (comment)

Some examples that come to mind of cases where we've opted for horizontal consistency over vertical consistency are things like where we add prefixes/suffixes (e.g. v on version badges), code coverage using different levels of precision (e.g. 92.51% vs 93%), download counts, and pipeline status wording

#10437 (comment)

Yeah all good examples - thanks.

I feel like always adding v on version badges and decimal precision/rounding are stylistic/presentation concerns. They don't change the meaning of the value.

etc.

Probably best to read things or at least ask for more direct pointers to related information before pushing back and characterizing something as unrelated

PyvesB pushed a commit that referenced this issue Oct 20, 2024
… cdnjs chromewebstore cocoapods conan conda cookbook cpan cran crates ctan curseforge debian docker dub eclipsemarketplace elmpackage f-droid factorio fedora feedz flathub galaxytoolshed gem gitea github gitlab greasyfork hackage hexpm homebrew itunes jenkins jetbrains jitpack jsr mavenmetadata modrinth nexus npm nuget openvsx opm ore packagist piwheels polymart pub puppetforge pypi ros scoop snapcraft spack spiget thunderstore twitch ubuntu vaadindirectory vcpkg visualstudioappcenter visualstudiomarketplace vpm wordpress] (#10615)

* use defaultLabel in renderVersionBadge without tag

As we refactor the codebase to use renderVersionBadge.
some badges need to show default label regardless of tag existance.
This is usefull for cases where the label is dynamic.

This change requires fixing test for npm, not sure how it worked before.

* Refactor AurVersion to use renderVersionBadge

part of #2026

* Refactor CondaVersion to use renderVersionBadge

part of #2026

* Refactor WordpressRequiresVersion to use renderVersionBadge

* add postfix option to renderVersionBadge

* add missing tests for renderVersionBadge

add defaultLabel without tag test
add postfix test
add test for all options together

* Refactor WordpressPluginTestedVersion to use renderVersionBadge

* add prefix override to renderVersionBadge

adds tests for all options with prefix as well

used for #2026 but also usefull for usage letting people override v prefix for versions all over the project once #2026 is done as requested for example in #10574

* Refactor RequiresPHPVersionForType to use renderVersionBadge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-discussion A consensus is needed to move forward question Support questions, usage questions, unconfirmed bugs, discussions, ideas
Projects
None yet
Development

No branches or pull requests

4 participants