-
Notifications
You must be signed in to change notification settings - Fork 296
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
[proposal] Warning banners configuration structure #945
Comments
cc @jarrodmillman who I discussed this with yesterday |
Seems reasonable. Another possibility is to keep it as a list-of-dicts, and have users optionally add a The reason to (maybe?) prefer this approach is that I think it will end up needing fewer / simpler changes to the existing JS that parses the versions.json data. (That is a hunch based on memories of the code, not based on reviewing it today. Nor is it an expression of strong preference; whoever implements it can choose which way seems easier, as far as I'm concerned.) |
I'm not a huge fan on this as it easily leaves open the possibility of erroneously adding |
@choldgraf is this solved by #1354 ? |
Context
Currently we have a PR implementing warning banners to direct users to the latest version of docs if they're on an old version. However it has stalled out because it wasn't clear the right configuration mechanism to use. This is a proposal for something so we can move forward.
Constraints for configuration
I believe the most important points @bryevdv mentioned were:
Proposal
Here's what I'd suggest we do to move forward:
versions.json
file that contains a list of configuration entries, each one corresponding to a version.versions.json
to optionally be a dictionary instead of a list. If it is a dictionary, we assume it is a collection ofkey:val
pairs to configure the versions behavior.items
, the value foritems
will be the list of version entries that currently populatesversions.json
.items
, there may be other configuration to control behavior. We propose two optional values:preferred_version
: is a unique ID to point to a version that users should use (e.g.stable
). If the user is on a docs build that does not have this version, they'll get the warning banner with a message saying they're on an outdated version.development_version
: is a unique ID to point to the "development version" of the docs. The only difference this makes is that this version will display a "this is a development version" message, instead of the "this is an outdated version" message.Feedback
References
The text was updated successfully, but these errors were encountered: