elastic / docs

25 stars 335 forks source link

Centralize icons #3108

Open colleenmcginnis opened 3 weeks ago

colleenmcginnis commented 3 weeks ago

When we migrated serverless docs to AsciiDoc, we had to add SVGs for icons that were previously handled by the DocIcon component. To allow us to move more quickly, I added the SVGs to each content repo, but planned to centralize those icons in this repo later (i.e. now 😄).

The approach I used in this PR would mean the new way to include icons in AsciiDoc files would be to use a shared attribute following the pattern icon-{type} where type in the string that was used in DocIcon (and is listed in EUI icon docs).

For example:

** **Add note to timeline** ({icon-editorComment}): Add the selected text to your currently active Timeline as a note.
** **Add to existing case** ({icon-appAddData}): Add a comment to an existing case using the selected text.
** **Copy to clipboard** ({icon-copyClipboard}): Copy the text to clipboard to paste elsewhere. Also helpful for resubmitting a previous prompt.
** **Add to timeline** ({icon-timeline}): Add a filter or query to Timeline using the text. This button appears for particular queries in AI Assistant's responses.

For the reviewer — here's specifically what this PR does:

After this is merged, I can open a PR in /docs-content, /security-docs, and /observability-docs to remove the local SVGs and update the syntax to use the new shared attributes.

github-actions[bot] commented 3 weeks ago

A documentation preview will be available soon.

Request a new doc build by commenting * Rebuild this PR: `run docs-build` * Rebuild this PR and all Elastic docs: `run docs-build rebuild` `run docs-build` is much faster than `run docs-build rebuild`. A `rebuild` should only be needed in rare situations. If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status [here](https://buildkite.com/elastic/docs-build).