-
-
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
improve [MavenCentral], [MavenMetadata], and [GradlePluginPortal] #6628
Conversation
|
Question: Is there any way to test |
I'm not sure. Generally we use |
@PyvesB Thank you. So, I removed old tests for maven central. |
Thanks, will take a look in the coming days! :) |
I've done a first review pass and test in the Heroku app. For anyone reading through this PR, there's been a bit of scope creep: it's not only the refactor of the redirectors mentioned in #6449 (comment), support for version suffix filters was added as well. Looking at things in the review app, searching for "maven" displays the badges with a huge bit of vertical spacing, due to the long titles. Is anyone else observing the same problem? See screenshot below. The only badge that currently supports
Now that we're using redirectors, it should be easy enough to resolve these inconsistencies. Switching everything to query parameters across all three badge types would make most sense to me. |
I agree with that so I changed all example to use versionPrefix of queryParams. versionPrefix for gradle-plugin-portal is added by this PR so I removed support with path.
I found that we can generate badges without some query parameters in web UI so, To resolve this problem, I removed examples without versionPrefix or versionSuffix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is almost ready to go as far as I can tell!
I found that we can generate badges without some query parameters in web UI so, To resolve this problem, I removed examples without versionPrefix or versionSuffix.
Given that you've removed the examples without the filters, would it be worth being extra clear about them being optional in the remaining examples? You can add a bit of documentation in the UI, you can take a look at our Discord implemention to see how that's done:
const documentation = ` |
Maybe something along the following lines:
versionPrefix
andversionSuffix
allow narrowing down the range of versions the badge will take into account, but they are completely optional.
namedParams: { | ||
pluginId: 'com.gradle.plugin-publish', | ||
}, | ||
staticPreview: { | ||
label: 'plugin portal', | ||
message: 'v0.14.0', | ||
label: 'maven-central', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this have remained plugin portal
?
version === undefined | ||
) | ||
throw new NotFound({ | ||
prettyMessage: 'version prefix or suffix not found', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a test for this case?
@PyvesB I've fixed gradle-plugin-portal and added documentation and tests. |
…rsionSuffix was specified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was a little slow on the review, so I've tried to be fast on the deployment side: this is already live on our production servers! 🍾 |
See #6449 (comment)