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

Only pass public versions to html context #6118

Merged

Conversation

@stsewd
Copy link
Member

stsewd commented Aug 29, 2019

Had to add a new field to the api response. Should I document the new field in our docs? https://docs.readthedocs.io/en/stable/api/v2.html#version-detail

@stsewd stsewd requested review from ericholscher and readthedocs/core Aug 29, 2019
@stsewd

This comment has been minimized.

Copy link
Member Author

stsewd commented Aug 29, 2019

I just went ahead and update the docs

Copy link
Member

ericholscher left a comment

I think this will be a good approach. @agjohnson was trying to scope it only to .com for now, but I think this should be fine. I'll let him -1 it if he feels strongly.

readthedocs/doc_builder/backends/sphinx.py Outdated Show resolved Hide resolved
@stsewd stsewd requested a review from agjohnson Aug 29, 2019
@stale

This comment has been minimized.

Copy link

stale bot commented Oct 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: stale label Oct 13, 2019
@stsewd stsewd removed the Status: stale label Oct 14, 2019
@ericholscher

This comment has been minimized.

Copy link
Member

ericholscher commented Oct 15, 2019

I still think this makes sense to merge.

@agjohnson

This comment has been minimized.

Copy link
Contributor

agjohnson commented Oct 16, 2019

I'm not against removing the non-public versions from the list, however this is a deprecation of a feature that we're not sure if any users are using. Users could be using the version list inside their templates for something other than the version list in the build output flyout. We should probably find a way to communicate this deprecation to users. Alternatively, we can expose all projects on a separate context data key, and communicate that the context data key for all versions has moved.

This might be a signal that we could benefit from a more complex data structure being passed into the theme context -- new releases of the theme could use public_versions() instead of the theme context data directly. However, the correct solution is probably to make new versions of the theme not generate a flyout at all.

@stsewd

This comment has been minimized.

Copy link
Member Author

stsewd commented Oct 21, 2019

Not sure how to communicate the deprecation outside rtd. I mean, we can add a deprecation warning from our extension, but it's going to appear in all the builds that happen inside rtd. Maybe a lot of people don't even know that option exists, it's going to be confusing to see that warning from something they aren't using. We don't have a way to know if they are using that context data outside of our theme.

@humitos
humitos approved these changes Dec 9, 2019
Copy link
Member

humitos left a comment

I'm 👍 with this change.

I understand @agjohnson concerns but I think it's better to be safe here. When we enable PR builders on .com we can't expose private versions to the context. So, I'm thinking that removing them is a good path forward.

Another one could be to remove them only from PR builds, as we are doing with environment variables.

On the other hand, we could add a feature flag to recover the old behavior in case that someone complains about we change this. Instead the other way around (I suspects that no many people -if any- are using private versions from the context).

@stsewd

This comment has been minimized.

Copy link
Member Author

stsewd commented Dec 9, 2019

I think feature flag is a good idea to keep old behavior if anyone is using it. Are we ok with that? I can add it.

/cc @agjohnson @ericholscher

@ericholscher

This comment has been minimized.

Copy link
Member

ericholscher commented Dec 11, 2019

Yea, if it's easy lets add a feature flag, so we don't have to do a deploy if someone complains :)

@stsewd stsewd requested a review from ericholscher Dec 17, 2019
Copy link
Member

ericholscher left a comment

Makes sense 👍

@stsewd stsewd merged commit 2e67b7d into readthedocs:master Dec 17, 2019
2 checks passed
2 checks passed
continuous-documentation/read-the-docs Read the Docs build succeeded!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@stsewd stsewd deleted the stsewd:only-pass-public-versions-to-html-context branch Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.