-
-
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
Docs: mention that only semver versions are considered for the warning banner #8789
Comments
Hi! I did a quick look on the page source you linked and I didn't find a |
Is that the version where you want to show the warning? From the screenshot it seems it's I do see the request to https://standard.openownership.org/_/api/v2/footer_html/?callback=callback&project=beneficial-ownership-data-standard&version=rhiaro-theme-update&page=index&theme=sphinxtheme&format=jsonp&docroot=%2Fdocs%2F&source_suffix=.rst and it returns the readthedocs.org/readthedocs/core/static-src/core/js/doc-embed/version-compare.js Lines 9 to 11 in b958bb8
... and, if I understand correctly, as your version is not in semver format (as I guess in my first paragraph), we cannot compare it and we always mark it as readthedocs.org/readthedocs/api/v2/views/footer_views.py Lines 79 to 80 in b958bb8
I checked that chunk of code in production:
IMO, the documentation should be updated to reflect that it only works on versions with semver format names. cc @astrojuanlu |
Thanks, that's helpful! I had understood from the documentation that anything that wasn't in semver would not be classed as |
We have deprecated the warning banner and it's currently only available for those projects that had it enabled already. We made this decision because all these confusions around when to show the banner and all the use cases involved here and each of them with their edge cases. Lately, I've been thinking about "what's the best generic logic behind this problem?" that could cover most of the cases. I've reached to a simple implementation for the new addons we are working on on Read the Docs. When a reader opens,
Would this logic works for your use case? I'd appreciate your feedback here 🙏🏼 In case you are curious, the PR that implements this logic is at readthedocs/addons#125. |
I think this logic would work perfectly for us 💯 |
The RTD docs may need to be updated to reflect this. I was trying to figure out why I couldn't find a setting on the Advanced Settings screen, and eventually stumbled onto this closed issue, which fortunately led me to this comment. This is how the docs currently read: And the actual page is here: https://docs.readthedocs.io/en/stable/versions.html#version-warning I can take a stab at a PR to add a mention that this is now deprecated and only visible to older projects if you'd like. |
Sounds great to me! Thanks! Once readthedocs/addons#174 gets merged and deployed, we will re-enable the non latest/stable version warning banner addon for all projects. Maybe the documentation could adds a note mentioning the new addons as well if you consider. |
This is done. |
We use a custom theme for the project on readthedocs. In Advanced Settings, the
Show version warning
setting is true. The docs say that a version warning banner for non-stable and non-latest versions will be inserted into a div withrole="main"
. This was missing from the theme, so I added it, expecting the version warning to show up for this non-stable branch of the docs, but it hasn't. Is there something else I need to do to trigger the non-latest version warning?The text was updated successfully, but these errors were encountered: