-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Allow defining which version is "unmaintained" on the banner #3169
Comments
There's a DocVersionSuggestions for that banner, you can probably swizzle it and make sure it displays nothing for a specific version. If you feel we should provide a config option, curious to know what kind of api you have in mind exactly? This is something we should have, but we need a good api to fit all needs, not just this particular usecase. |
Could you explain a little bit more about the DocVersionSuggestions? if we swizzle it, the changes will be global for every type of banner? or it is flexible to change only the "unmaintained"? ( because this banner seems hardcoded )
I have two in mind:
[
"2.0.0-alpha.60",
"2.0.0-alpha.58",
{
version: "2.0.0-alpha.56",
unmaintained: true // it will make to show the banner
},
...
]
unmaintained: [
"2.0.0-alpha.56",
"2.0.0-alpha.55",
"2.0.0-alpha.54"
] I don't like the first option because it will be a huge breaking change and it will be required to do unnecessary changes and mix of types in here will not be good. but the second option will be simpler to implement since we'll get this info directly from the config. edit:
hmm... I get it, if we can make DocVersionSuggestions custom/rewrite will solve our usecase. |
@slorber definitely swizzle |
Great to know The problem with Swizzle is that the API surface is less clear and we might do breaking changes on updates, but this shouldn't be too hard to handle by reswizzling and comparing diffs |
Motivation
After this PR #2916 every version that isn't the latest one, is considered as unmaintained ( which is cool ), but on react navigation we still maintaining two versions v4 and v5
Pitch
will be nice to define which version still maintained or unmaintained ( it will solve this use case ), maybe on docusaurus config or versions ?
The text was updated successfully, but these errors were encountered: