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

Additional version banner details. #1973

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

jcapriot
Copy link
Contributor

@jcapriot jcapriot commented Sep 8, 2024

Adds a more detailed descriptions on what causes different messages to appear in the version announcement.

This tripped me up for a little bit and I had to go searching in the source code to find out what exactly triggered the development warning banner to display. So this PR is in the hope of avoiding a small headache for others!

Add more detailed descriptions on what causes different messages to appear in the version announcement.
@jcapriot
Copy link
Contributor Author

jcapriot commented Sep 8, 2024

These are the logic lines I am referring to:

const isDev =
version.includes("dev") ||
version.includes("rc") ||
version.includes("pre");
const newerThanPreferred =
versionsAreComparable && compare(version, preferredVersion, ">");
if (isDev || newerThanPreferred) {
bold.innerText = "an unstable development version";
} else if (versionsAreComparable && compare(version, preferredVersion, "<")) {
bold.innerText = `an old version (${version})`;
} else if (!version) {
bold.innerText = "an unknown version"; // e.g., an empty string
} else {
bold.innerText = `version ${version}`;
}

Copy link
Collaborator

@trallard trallard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution 🙏🏽 I think this definitely makes the criteria clear for folks (this has been a tricky one to get across).

All looks good so will approve and merge right away

@Carreau
Copy link
Collaborator

Carreau commented Sep 11, 2024

Failure is unrelated. merging.

@Carreau Carreau merged commit d9c3419 into pydata:main Sep 11, 2024
21 of 29 checks passed
@jcapriot jcapriot deleted the version-banner-details branch September 11, 2024 14:01
@jcapriot
Copy link
Contributor Author

Happy to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants