Skip to content

Commit 2218e2a

Browse files
authored
Implement tooltips for tag shortcode (#775)
1 parent e93a4ff commit 2218e2a

File tree

2 files changed

+41
-35
lines changed

2 files changed

+41
-35
lines changed

README.md

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,11 @@ Inner shortcode
367367
Tags let you display badges, usually below a headline.
368368

369369
This is mainly used for pointing out if a feature is only available in the
370-
Enterprise Edition of ArangoDB, the ArangoGraph Insights Platform, or both.
371-
See [Edition remarks](#edition-remarks) for details.
370+
ArangoDB Platform, the ArangoGraph Insights Platform, or both.
371+
See [Environment remarks](#environment-remarks) for details.
372+
373+
It is also used for [Edition remarks](#edition-remarks) in content before
374+
version 3.12.5.
372375

373376
#### Tabs
374377

@@ -668,57 +671,55 @@ extended by a new (sub-)option in a `x.x.0` release.
668671
While version remarks are mostly `Introduced in: ...`, you can also mark
669672
deprecated features in the same manner with `Deprecated in: ...`.
670673

671-
### Edition Remarks
674+
### Environment remarks
675+
676+
Pages and sections about features that are only available in certain environments
677+
such as the ArangoDB Platform, the ArangoGraph Insight Platform, or the
678+
ArangoDB Shell should indicate where they are available using the `tag` shortcode.
672679

673-
Pages and sections about Enterprise Edition features should indicate that the
674-
Enterprise Edition is required using a hint box. Use the following include in
675-
the general case:
680+
In the unified Platform and ArangoGraph but not in the Core:
676681

677682
```markdown
678-
{{< tag "ArangoDB Enterprise Edition" "ArangoGraph" >}}
683+
{{< tag "ArangoDB Platform" "ArangoGraph" >}}
679684
```
680685

681-
This shortcode should be placed immediately after a headline, before any version
682-
remarks (`<small>Introduced in: ...</small>`).
683-
684-
To tag options in lists, place the shortcode as follows:
686+
In the unified Platform only:
685687

686688
```markdown
687-
- **optionName** (data type):
688-
689-
{{< tag "ArangoDB Enterprise Edition" "ArangoGraph" >}}
690-
691-
Version remarks and description of the option
689+
{{< tag "ArangoDB Platform" >}}
692690
```
693691

694-
Most Enterprise Edition features are also available in ArangoGraph, but some
695-
features are not or in a different form (e.g. Hot Backup). If a feature
696-
is not available in ArangoGraph, use the following include instead:
692+
In ArangoGraph only:
697693

698694
```markdown
699-
{{< tag "ArangoDB Enterprise Enterprise" >}}
695+
{{< tag "ArangoGraph" >}}
700696
```
701697

702-
In the release notes, add the following at the end of a section about a new
703-
Enterprise Edition feature:
698+
In the ArangoDB Shell but not the server-side JavaScript API:
704699

705700
```markdown
706-
This feature is only available in the Enterprise Edition.
701+
{{< tag "arangosh" >}}
707702
```
708703

709-
HTTP API options, that is options described in an `` ```openapi `` code block,
710-
should have a remark as follows if they are only available in the Enterprise Edition:
704+
This shortcode should be placed immediately after a headline, before any version
705+
remarks (`<small>Introduced in: ...</small>`).
711706

712-
```markdown
713-
- `enterpriseOption` (boolean, _optional_): ...
714-
(Enterprise Edition only).
715-
```
707+
You can define a tooltip for each tag in the
708+
[`tag.html` template](site/themes/arangodb-docs-theme/layouts/shortcodes/tag.html).
716709

717-
If there are both a version remark and an Enterprise Edition remark, use:
710+
### Edition remarks
711+
712+
From version 3.12.5 onward, all features formerly exclusive to the
713+
Enterprise Edition are also included in the Community Edition.
714+
Therefore, using tags and other kinds of remarks to indicate what features
715+
require the Enterprise Edition should not be necessary.
716+
717+
In the content **before version 3.12.5**, pages and sections about
718+
Enterprise Edition features should indicate that the Enterprise Edition is
719+
required using a tag. Use the following include in the general case:
718720

719721
```markdown
720-
- `enterpriseOption` (boolean, _optional_): ...
721-
(introduced in v3.11.5 and v3.12.2, Enterprise Edition only).
722+
{{< tag "ArangoDB Enterprise Edition" "ArangoGraph" >}}
722723
```
723724

724725
### Add lead paragraphs
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
{{ $tooltips := dict
2+
"ArangoGraph" "This feature is available in the ArangoGraph Insights Platform"
3+
"ArangoDB Platform" "This feature is available in the unified ArangoDB Platform"
4+
"arangosh" "This feature is available in the ArangoDB Shell"
5+
-}}
16
<p class="labels">
2-
{{ range $.Params }}
3-
<span class="label">{{ . }}</span>
4-
{{ end }}
7+
{{ range $.Params }}
8+
<span class="label"{{ with index $tooltips . }} title="{{ . }}"{{ end }}>{{ . }}</span>
9+
{{ end }}
510
</p>

0 commit comments

Comments
 (0)