-
Notifications
You must be signed in to change notification settings - Fork 12
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
Notification: handle stable
/latest
aliases
#132
Comments
This is useful to avoid showing notification on latest/stable aliases versions. Related readthedocs/addons#132
I implemented an initial version of this in readthedocs/readthedocs.org#10918 but it's kind of a quick solution for this specific problem. I thought a little more about this issue after working on #243 and I think we can solve this issues is a more general and generic way. I see this issue related to the "version alias support". We currently don't support version aliases, but we may support them in the future somehow (readthedocs/readthedocs.org#5318). I don't think we have to move forward in that conversation right now, but since this issue is related, I found a better proposal for it. We can add With that field, together with adding Besides, this patter will be also helpful to solve #265 as well, since we will eventually be able to use So, I'm saying that adding these "generic" fields will be useful to solve a larger amount of specific problems without requiring specific fields that are only useful for those particular issues. I opened a PR on the backend with this idea in readthedocs/readthedocs.org#11205 |
Implements the changes in the API made in readthedocs/readthedocs.org#11205. We need to merge that PR and deploy addons together with the changes in this PR. In this PR there are mainly no changes in the logic. The most important thing to mention here is that we are standardizing the usage of the API response and pinning to `v1` now (we were using `v0-alpha`). This means: - we will be exposing the `v1` to users via the js custom event (see #64) - we are using standard/shared APIv3 serializers for resources for this `/addons/` endpoint - any breaking change we have to do in the future it will increase the API response version I'm not sure there are too much to review here, but I'd appreciate at least a quick look at these changes. I'm happy to answer some questions you may have here or on the underlying PR about the API response changes. ### Related: * Closes #132 * Unblocks #265 * Unblocks theme integration (our theme and CPython's one) * Requires readthedocs/readthedocs.org#11205 --------- Co-authored-by: Anthony <aj@ohess.org>
Currently, our logic to show a notification is:
latest
show a warning about potentially unreleased featuresstable
show a warning about maybe reading an outdated documentationWe need to handle the real branch/tag names these
stable
/latest
versions refer to. Why is this? Because we want to show thelatest
notification onmain
too, for example. Also, we don't want to show the non-stable
notification if thestable
version points tov3.1
and the user is reading thev3.1
.The API should return a list of these alias, like:
and the JS code should check the current version against those.
Related #125
The text was updated successfully, but these errors were encountered: