docs: Add API version label to search result item#13005
docs: Add API version label to search result item#13005htuch merged 12 commits intoenvoyproxy:masterfrom dio:version-label
Conversation
This adds version label to search result items. Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
| */ | ||
|
|
||
| // Modified from https://raw.githubusercontent.com/sphinx-doc/sphinx/3.x/sphinx/themes/basic/static/searchtools.js | ||
| // to have renderApiVersionLabel to render the API version for each search result item. |
There was a problem hiding this comment.
@dio could you do a baseline PR to check in the original searchtools.js, that way we can review just the delta here?
|
FYI @snowp |
This imports searchtools.js from https://raw.githubusercontent.com/sphinx-doc/sphinx/3.x/sphinx/themes/basic/static/searchtools.js. #13005 (comment) Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
|
LGTM, but I disclaim any knowledge of CSS. @dio looking at the rendered results at https://380399-65214191-gh.circle-artifacts.com/0/generated/docs/search.html?q=cluster&check_keywords=yes&area=default and the CSS, it looks like you are also modifying the test of the doc style. Is there a reason we need to do that in this PR? |
|
It is not. The only entry that is mandatory is: |
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
| /* To style the API version label of a search result item */ | ||
| .api-version-label { | ||
| border-radius: 20%; | ||
| background-color: #c0c0c0; |
|
@htuch it is updated, see the rendered docs here: https://380742-65214191-gh.circle-artifacts.com/0/generated/docs/search.html?q=cluster&check_keywords=yes&area=default |
htuch
left a comment
There was a problem hiding this comment.
LGTM, thanks! I think if you do want a separate PR delving into color schemes that's totally legit, but that's the bike shed painting :)


Commit Message: This adds API version labels to search result items. This overrides the sphinx-docs'
searchtools.js.Additional Description:
A sample of search result page: https://379378-65214191-gh.circle-artifacts.com/0/generated/docs/search.html?q=route&check_keywords=yes&area=default
Depends on: #13008.
Risk Level: Low, cosmetics.
Testing: N/A
Docs Changes: N/A
Release Notes: N/A
Fixes #10311
Signed-off-by: Dhi Aurrahman dio@tetrate.io