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

Add inline icons to formatting guide #3785

Merged
merged 3 commits into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 9 additions & 0 deletions FORMATTING_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ This guide provides an overview of the formatted elements commonly used in the O
* [Dashes](#dashes)
* [Horizontal rule](#horizontal-rule)
* [Images](#images)
*[Images in line with text](#images-in-line-with-text)
* [Labels](#labels)
* [Links](#links)
* [Lists](#lists)
Expand Down Expand Up @@ -150,6 +151,14 @@ Do not place an image next to text or insert artificial line breaks using `<br>`

If the image is under a list item, place it on a new line with a tab. For more examples, see [Lists with code snippets or images](#lists-with-code-snippets-or-images).

### Images in line with text

When describing an icon, use the icon's name followed by an inline image in parentheses. Insert the image in line with text using the `nomarkdown` extension and an HTML image:

```
Choose the play icon ({::nomarkdown}<img src="{{site.url}}{{site.baseurl}}/images/dev-tools/play-icon.png" class="inline-icon" alt="play icon"/>{:/}) on the top right of the request.
```

## Labels

You can use the following labels:
Expand Down
8 changes: 4 additions & 4 deletions _dashboards/run-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ OpenSearch provides autocomplete suggestions for fields, indexes and their alias

## Sending the request

To send a query to OpenSearch, select the query by placing the cursor anywhere in the query text. Then choose the triangle on the top right of the request or press `Ctrl/Cmd+Enter`:
To send a query to OpenSearch, select the query by placing the cursor anywhere in the query text. Then choose the play icon ({::nomarkdown}<img src="{{site.url}}{{site.baseurl}}/images/dev-tools/play-icon.png" class="inline-icon" alt="play icon"/>{:/}) on the top right of the request or press `Ctrl/Cmd+Enter`:
kolchfa-aws marked this conversation as resolved.
Show resolved Hide resolved

<img src="{{site.url}}{{site.baseurl}}/images/dev-tools/dev-tools-send.png" alt="Send request">

Expand Down Expand Up @@ -79,17 +79,17 @@ GET shakespeare/_search

If you paste a `curl` command directly into the console, the command is automatically converted into the format the console uses.

To import a query in cURL format, select the query, then select the wrench icon and choose **Copy as cURL**:
To import a query in cURL format, select the query, then select the wrench icon ({::nomarkdown}<img src="{{site.url}}{{site.baseurl}}/images/dev-tools/wrench-icon.png" class="inline-icon" alt="wrench icon"/>{:/}) and choose **Copy as cURL**:
kolchfa-aws marked this conversation as resolved.
Show resolved Hide resolved

<img src="{{site.url}}{{site.baseurl}}/images/dev-tools/dev-tools-tools.png" alt="Console tools">

## Viewing documentation

To view the OpenSearch documentation, select the wrench icon, and choose **Open documentation**.
To view the OpenSearch documentation, select the wrench icon ({::nomarkdown}<img src="{{site.url}}{{site.baseurl}}/images/dev-tools/wrench-icon.png" class="inline-icon" alt="wrench icon"/>{:/}), and choose **Open documentation**.
kolchfa-aws marked this conversation as resolved.
Show resolved Hide resolved

## Auto indenting

To use auto indent, select the queries that you want to format, select the wrench icon, and choose **Auto indent**.
To use auto indent, select the queries that you want to format, select the wrench icon ({::nomarkdown}<img src="{{site.url}}{{site.baseurl}}/images/dev-tools/wrench-icon.png" class="inline-icon" alt="wrench icon"/>{:/}), and choose **Auto indent**.

Auto indenting a collapsed query expands it.

Expand Down
6 changes: 6 additions & 0 deletions _sass/custom/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ img {
box-shadow: none;
}

.inline-icon {
@extend .no-border;
height: 1.2rem;
vertical-align: middle;
}

.img-border {
border: 1px solid $grey-lt-300;
}
Expand Down
Binary file added images/dev-tools/play-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dev-tools/wrench-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.