-
Notifications
You must be signed in to change notification settings - Fork 333
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
Make x-pack tags clickable #744
Conversation
This replaces the `x-pack` tags on the titles of pages that are about elastic licensed features with clickable links that take you to the subscriptions page. This is implemented by replacing the section rendering code in docbook with customized code that includes the link. This also replaces the background image of the `x-pack` tag with one that looks "more clickable" and has a hover treatment. Closes elastic#720
I'm leaving this in "draft" state while I write a test for it. |
Ok - this works for sections that have role=xpack but it won't work for chapters with it. I'll see if we have any of those.... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like I will certainly need to do chapters.
@@ -130,14 +99,6 @@ | |||
font-weight: inherit; | |||
} | |||
|
|||
/* Add xpack icon to floating role=xpack titles in On This Page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These weren't used.
#guide div[class~="xpack"] > div > div > div > p > strong:after, | ||
|
||
/* Add xpack icon to role=xpack dt titles */ | ||
#guide dt > span > span.xpack:after, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have any definitions that are just x-pack? If so I'll need to do something for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't find any in the stack-docs, kibana, or elasticsearch repos
OK! I've done the chapters too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fancy!
When I test this with the docbldso (Stack Overview) doc build, it fails to create an icon for this page: |
Ooooh! I'll have a look at that then! |
Done! @lcawl, could you have another look around? |
The icons are appearing in the right places now, thanks! |
I send you to |
It seems to be encountering some problems in the case of sub-sections too: The right hand window is the current (desired) formatting (https://www.elastic.co/guide/en/kibana/master/working-remote-clusters.html#managing-cross-cluster-replication) and the left hand window is built with this PR. Note the lack of icon and the reduced size of the title. The same problem occurs in the Elasticsearch Reference for this X-Pack-tagged section: https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-node.html#modules-node-xpack |
I hit that kind of thing over and over and over again while working on it. Let me see about this instance of it.... |
Another thing that I notice is that I add the tag even when the section "above" it also has the flag. This seems wrong but something I can work out. |
@lcawl could you have another scan on this one when you have a chance? I've gotten further I think. And we'll end up with a nice set of tests for when we expect this and when we don't.... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! I tested Stack Overview, Kibana Reference, and Elasticsearch Reference.
This replaces the
x-pack
tags on the titles of pages that are aboutelastic licensed features with clickable links that take you to the
subscriptions page.
This is implemented by replacing the section rendering code in docbook
with customized code that includes the link.
This also replaces the background image of the
x-pack
tag with onethat looks "more clickable" and has a hover treatment.
Closes #720