Skip to content
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

document fixed-table shortcode, update column-list shortcode #918

Merged
merged 6 commits into from
Jan 15, 2025
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 48 additions & 4 deletions docs/sources/write/shortcodes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,13 @@ compactor:

## Column-list

Formats a list with columns. Content is equally divided between columns.
Formats a list with columns. Content is equally divided between columns unless specified with the `count` argument.

| Parameter | Description | Required |
| --------- | ------------------------------------------------------------------------------------------ | -------- |
| `count` | The number columns in desktop view. A minimum of two and maximum of four can be specified. | no |

### Example

```markdown
{{</* column-list */>}}
Expand Down Expand Up @@ -649,13 +655,13 @@ For example:
**Reference:**

```markdown
[Grafana website]: www.grafana.com
[grafana website]: www.grafana.com
```

**Body text:**

```markdown
Find more information on [Grafana][Grafana website].
Find more information on [Grafana][grafana website].
```

## Docs/shared
Expand Down Expand Up @@ -716,6 +722,44 @@ Headings are offset by one level, so if the source content contains an `h1`, the
{{</* docs/shared lookup="shared-page.md" source="enterprise-metrics" version="<GEM_VERSION>" leveloffset="+1" */>}}
```

## Fixed-table

The `fixed-table` shortcode prevents column overflow by breaking content to a new line at any character, not just spaces between words.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Grafana.Timeless] Avoid using 'new' to keep the documentation timeless. In general, document the current version of a product or feature. It reduces the maintenance required to keep documentation up to date. It avoids assuming the reader is familiar with earlier versions of the product. If you're writing procedural or time-stamped content such as press releases, blog posts, or release notes, such time-based words and phrases are OK.

For more information, refer to https://developers.google.com/style/timeless-documentation.

If the rule is incorrect or needs improving, report an issue.

If you have reason to diverge from the style guidance, to skip a rule, refer to Skip rules.


### Example

```markdown
{{</* fixed-table */>}}

| Metric | Cloudwatch Metric | Statistics |
| ------------------------------ | ----------------- | ------------------------------------------------------------------------ |
| **aws_amazonmq_info** | |
| **aws_amazonmq_ack_rate** | AckRate | **Average**, Maximum, Minimum, Sum, SampleCount, p50, p75, p90, p95, p99 |
| **aws_amazonmq_burst_balance** | BurstBalance | **Average**, Maximum, Minimum, Sum, SampleCount, p50, p75, p90, p95, p99 |

{{</* /fixed-table */>}}
```

Produces:

{{< fixed-table >}}

| Metric | Cloudwatch Metric | Statistics |
jdbaldry marked this conversation as resolved.
Show resolved Hide resolved
jdbaldry marked this conversation as resolved.
Show resolved Hide resolved
| ------------------------------ | ----------------- | ------------------------------------------------------------------------ |
| **aws_amazonmq_info** | |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Grafana.Spelling] Did you really mean 'aws_amazonmq_info'? The Grafana dictionary might not know of this word yet. To add a new word, refer to Add words to the Grafana Labs dictionary. Alternatively, raise an issue and a maintainer will add it for you. For UI elements, use bold formatting. The spell checker doesn't check words with bold formatting. For paths; configuration; user input; code; class, method, and variable names; statuscodes; and console output, use code formatting. The spell checker doesn't check words with code formatting.

If the rule is incorrect or needs improving, report an issue.

If you have reason to diverge from the style guidance, to skip a rule, refer to Skip rules.

| **aws_amazonmq_ack_rate** | AckRate | **Average**, Maximum, Minimum, Sum, SampleCount, p50, p75, p90, p95, p99 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Grafana.Spelling] Did you really mean 'aws_amazonmq_ack_rate'? The Grafana dictionary might not know of this word yet. To add a new word, refer to Add words to the Grafana Labs dictionary. Alternatively, raise an issue and a maintainer will add it for you. For UI elements, use bold formatting. The spell checker doesn't check words with bold formatting. For paths; configuration; user input; code; class, method, and variable names; statuscodes; and console output, use code formatting. The spell checker doesn't check words with code formatting.

If the rule is incorrect or needs improving, report an issue.

If you have reason to diverge from the style guidance, to skip a rule, refer to Skip rules.

| **aws_amazonmq_burst_balance** | BurstBalance | **Average**, Maximum, Minimum, Sum, SampleCount, p50, p75, p90, p95, p99 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Grafana.Spelling] Did you really mean 'aws_amazonmq_burst_balance'? The Grafana dictionary might not know of this word yet. To add a new word, refer to Add words to the Grafana Labs dictionary. Alternatively, raise an issue and a maintainer will add it for you. For UI elements, use bold formatting. The spell checker doesn't check words with bold formatting. For paths; configuration; user input; code; class, method, and variable names; statuscodes; and console output, use code formatting. The spell checker doesn't check words with code formatting.

If the rule is incorrect or needs improving, report an issue.

If you have reason to diverge from the style guidance, to skip a rule, refer to Skip rules.


{{< /fixed-table >}}

Without the shortcode:
robbymilo marked this conversation as resolved.
Show resolved Hide resolved

| Metric | Cloudwatch Metric | Statistics |
jdbaldry marked this conversation as resolved.
Show resolved Hide resolved
jdbaldry marked this conversation as resolved.
Show resolved Hide resolved
| ------------------------------ | ----------------- | ------------------------------------------------------------------------ |
| **aws_amazonmq_info** | |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Grafana.Spelling] Did you really mean 'aws_amazonmq_info'? The Grafana dictionary might not know of this word yet. To add a new word, refer to Add words to the Grafana Labs dictionary. Alternatively, raise an issue and a maintainer will add it for you. For UI elements, use bold formatting. The spell checker doesn't check words with bold formatting. For paths; configuration; user input; code; class, method, and variable names; statuscodes; and console output, use code formatting. The spell checker doesn't check words with code formatting.

If the rule is incorrect or needs improving, report an issue.

If you have reason to diverge from the style guidance, to skip a rule, refer to Skip rules.

| **aws_amazonmq_ack_rate** | AckRate | **Average**, Maximum, Minimum, Sum, SampleCount, p50, p75, p90, p95, p99 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Grafana.Spelling] Did you really mean 'aws_amazonmq_ack_rate'? The Grafana dictionary might not know of this word yet. To add a new word, refer to Add words to the Grafana Labs dictionary. Alternatively, raise an issue and a maintainer will add it for you. For UI elements, use bold formatting. The spell checker doesn't check words with bold formatting. For paths; configuration; user input; code; class, method, and variable names; statuscodes; and console output, use code formatting. The spell checker doesn't check words with code formatting.

If the rule is incorrect or needs improving, report an issue.

If you have reason to diverge from the style guidance, to skip a rule, refer to Skip rules.

| **aws_amazonmq_burst_balance** | BurstBalance | **Average**, Maximum, Minimum, Sum, SampleCount, p50, p75, p90, p95, p99 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Grafana.Spelling] Did you really mean 'aws_amazonmq_burst_balance'? The Grafana dictionary might not know of this word yet. To add a new word, refer to Add words to the Grafana Labs dictionary. Alternatively, raise an issue and a maintainer will add it for you. For UI elements, use bold formatting. The spell checker doesn't check words with bold formatting. For paths; configuration; user input; code; class, method, and variable names; statuscodes; and console output, use code formatting. The spell checker doesn't check words with code formatting.

If the rule is incorrect or needs improving, report an issue.

If you have reason to diverge from the style guidance, to skip a rule, refer to Skip rules.


## Figure

The `figure` shortcode renders an image with a caption using an HTML [`<figure>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure#usage_notes) element.
Expand Down Expand Up @@ -903,7 +947,7 @@ To add a new variable definition:
{{< admonition type="note" >}}
If you use the `param` shortcode in headings, you must use `%` in place of `<` and `>`.

For example: `{{% param VARIABLE %}}`.
For example: `{ {% param VARIABLE %}}`.
{{< /admonition >}}

### Example
Expand Down
Loading