-
-
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
Ensure consistent usage of renderVersionBadge #2026
Comments
Mostly done in #1998, though we need to tackle it for f-droid. To expand on this a little bit: I'm thinking we should make a pass through all the new-style services for consistency of style. Having a consistent style in place means contributors will refer to code that are exemplars of what we want, minimizing the amount of "please make this more the way we want it," and creating a more positive contributor experience. It seems a little fussy to do this on existing code which is "good enough." However, I think more positive contributor experience is a good reason to make the extra effort up front. What do you think about that idea? |
Yes, I think going through all our new services to make sure the style is consistent would make sense. |
I don't want to get too "philosophical" about this, but I've been having a bit of a think about this while working on PR #2086 I've left some inline comments there, but in general I think we need to be quite careful about trying to bash every peg into the same template. These helper functions are informed by particular world views e.g:
These world views don't necessarily map well onto all programming communities. For example, there are some programming communities where a lot of projects use alternative versioning schema like CalVer or just don't specify any particular way of versioning. Similarly there are some programming communities where it is not really appropriate to try and assign meaning to licenses via colour, or where a license is "good" or "bad" may not be about permissive vs copyleft but more about whether it is "GPL-compatible" (which is a property that can apply to some subset of both permissive and copyleft licences) for example. I'm not saying these helpers aren't useful code - they are and we can use them to reduce duplication in many places, but I do also think we need to be careful about pursuing standardisation within our own codebase over embracing the norms of the programming communities our output is going to be used in. I accept this can also be quite a difficult thing for us to do because often we're working on code from the perspective of outsiders to the community it will be used in. Something to think about anyway.. |
👍 Let's rename the helper so it's clear it's intended for communities which use semver, or better yet, add a
Are there any programming communities where copyleft is seen radically differently from others? By choosing orange for GPL I've tried to sidestep the value judgement. I've wandered from one of these schools of thought to the other in the last 10 years, and tend to think folks who like GPL can train themselves to look for orange license badges, likewise folks who like permissive licenses and green. Alternatively, perhaps we could try to refine the colors. I participate in more than one programming community and FWIW I'd find the consistent colors helpful. This overlaps with #1093; going to close that so let's wrap up this discussion here. |
adds tests for all options with prefix as well used for badges#2026 but also usefull for usage letting people override v prefix for versions all over the project once badges#2026 is done as requested for example in badges#10574
… 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
The following function was introduced in #1922:
shields/lib/version.js
Lines 144 to 150 in 302c860
We should be using it where appropriate.
See #1965 (comment).
The text was updated successfully, but these errors were encountered: