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

Addons: return all active versions on single version project #11727

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

humitos
Copy link
Member

@humitos humitos commented Oct 30, 2024

We always return all the active versions no matter the versioning scheme of the project. That's how versions.active is expected to work.

However, it seems the conditional was below where these versions are calculated. I also updated the test case that checks for the active versions on single versions projects.

Closes readthedocs/sphinx_rtd_theme#1613

We always return all the active versions no matter the versioning scheme of the
project. That's how `versions.active` is expected to work.

However, it seems the conditional was below where these versions are calculated.
I also updated the test case that checks for the active versions on single
versions projects.

Closes readthedocs/sphinx_rtd_theme#1613
Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

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

We should have a special case for single version projects. I don't think we have any type of validation when a project is single version project, and users can still activate versions, or when a multi version projects switches to single version. Those versions will still be marked as active, but even if they are built, users won't be able to see them (since our serving code does validate for that).

@humitos
Copy link
Member Author

humitos commented Oct 31, 2024

@stsewd good point! I added the special case for single version projects in 58f9d5d. No matters how many active and built versions the project has, if it's single version, we always return the default version only.

@humitos humitos merged commit cf49d99 into main Oct 31, 2024
8 checks passed
@humitos humitos deleted the humitos/addons-api-versions-active branch October 31, 2024 14:42
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.

Version switch appears even though I only have one version
2 participants