-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Implement hidden state for versions #6792
Conversation
Should we filter these from the sitemap as well? |
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.
This looks like a good start. I feel like we need a bit more explanation for users before we really ship this, since it can be a bit confusing I think.
Co-Authored-By: Eric Holscher <[email protected]>
Do you mean like improving the UX or communicating the users with a blog post/email? |
Improving the on-site copy and docs. Perhaps some general uses cases and examples, and a Guide (eg. how do I hide a version and keep docs online?). I think the main thing is "I'm a user and I see this "hidden" option, how do I understand what it actually does". |
@ericholscher I expanded the docs and wrote a small guide https://docs--6792.org.readthedocs.build/en/6792/guides/hiding-a-version.html And used crispy forms to group the elements on the UI. Let me know what you think. |
Oh, and one thing. This migration is adding a non-nullable field, so when deploying users aren't going to be able to create new versions during the deploy. We can avoid the downtime by setting the new field as nullable and:
I also saw this package that solves the problem without doing all those steps https://github.com/3YOURMIND/django-add-default-value but I haven't tested it |
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.
We can avoid the downtime by setting the new field as nullable and:
I think this is a good idea 👍
Go to the :guilabel:`Versions` tab of your project, click on :guilabel:`Edit` and mark the ``Hidden`` option. | ||
|
||
Users that have a link to your old version will still be able to see your docs. | ||
And new users can see all your versions (including hidden versions) in the versions tab of your project at ``https://readthedocs.org/projects/<your-project>/versions/`` |
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.
Do we actually want this? It doesn't make hidden
very hidden, I think.
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.
Yeah. However, if we hide the versions from there, you can't un-hide them. Although, we could show hidden
versions in that list if you are an admin of the project.
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.
we could show hidden versions in that list if you are an admin of the project.
Hmm, yeah. Not sure, I mean, users will only be able to get there by search results on google or old links, not from the project. I'll create an issue to discuss that.
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'd like to not break versions during deploy, so merge after we edit the migration |
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.
Looks good.
I left some important questions about privacy levels on search and the migration file.
readthedocs/builds/migrations/0017_migrate_protected_versions_to_hidden
Outdated
Show resolved
Hide resolved
readthedocs/builds/migrations/0017_migrate_protected_versions_to_hidden
Outdated
Show resolved
Hide resolved
Co-Authored-By: Eric Holscher <[email protected]>
I think there was a discussion on slack around listing this in robots.txt, currently we only put this as default readthedocs.org/readthedocs/proxito/views/serve.py Lines 380 to 383 in bc30c5e
About the sitemap, that still needs an answer #6792 (comment). Currently, we are listing those in the sitemap. /cc @ericholscher |
I think they should not appear in the sitemap.xml and should be |
Yea, definitely they be |
Active versions that are hidden are listed in the |
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.
This looks 💯 to me. Excited to ship it!
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.
👍
Ref #6194 and #5321
This doesn't remove the protected privacy level yet (we can do that after this change is released).
Changes: