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

Centralize icons #3108

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

colleenmcginnis
Copy link
Contributor

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:

  • Adds EUI SVGs for icons and logos.
  • Creates a class for each icon following the pattern icon-{type}.
  • Styles and sizes each class to fit inline in regular text.
  • Creates a shared attribute for each icon following the pattern icon-{type}.
  • Bumps the CSS file version to ensure the new classes are accessible (bust the cache).

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.

@colleenmcginnis colleenmcginnis self-assigned this Nov 7, 2024
Copy link

github-actions bot commented Nov 7, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant