Skip to content

[EuiIcon] Add ruler icon - #10194

Merged
mgadewoll merged 5 commits into
elastic:mainfrom
andreadelrio:add-ruler-icon
Oct 12, 2026
Merged

mgadewoll merged 5 commits into
elastic:mainfrom
andreadelrio:add-ruler-icon

Conversation

@andreadelrio

@andreadelrio andreadelrio commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • What: Adds a new ruler icon to EuiIcon.
  • Why: We need this icon for Dashboards to allow users to choose between different widths available for controls. We currently use gear but want something more specific.
image
  • How: Designed following the Creating icons guidelines:
    • 16×16 viewbox, 1px strokes, square endpoints, 1px rounded outer corners with square inner corners.
    • Drawn at 45° (like tag and pencil) with its corners on whole-pixel grid points, (1,11), (11,1), (15,5) and (5,15), and the 1px safe zone kept clear.
    • Four alternating tick marks; the whole glyph is a single flattened path (no overlapping shapes).
    • Optical sizing checked against the keyline template and against similar diagonal icons (tag, pencil, magnify, wrench, key, pin). Its ink stays within the keylines more closely than any of them, and its optical center is within 0.1px of the viewbox center.
    • Added synonyms metadata so it shows up in docs icon search.
Glyph Docs
image image

API Changes

component / parent prop / child change description
EuiIcon type Added New ruler glyph icon

Screenshots

{Screenshot of the icon at 16/24/32px, light and dark mode}

Impact Assessment

  • 🔴 Breaking changes
  • 💅 Visual changes
  • 🧪 Test impact
  • 🔧 Hard to integrate

Impact level: 🟢 None. This is an additive new icon.

Release Readiness

  • Documentation: Appears automatically on the Icons docs page
  • Figma: {link to Figma}
  • Migration guide:
  • Adoption plan (new features): {who will use this icon and where}

QA instructions for reviewer

  • Open the Icons docs page (or the EuiIcon story in Storybook) and find ruler.
  • Confirm the icon renders crisply at 16px and scales cleanly at larger sizes.
  • Confirm it is visible in both light and dark mode.
  • Confirm searching "measure" in the docs icon search finds it.

Checklist before marking Ready for Review

  • Filled out all sections above
  • QA: Tested light/dark modes, high contrast, mobile, Chrome/Safari/Edge/Firefox, keyboard-only, screen reader
  • QA: Tested in CodeSandbox and Kibana
  • QA: Tested docs changes
  • Tests: Added/updated Jest snapshot ✅ and VRT (all-icons story baseline needs updating)
  • Changelog: Added changelog entry
  • Breaking changes: Added breaking change label (if applicable)

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 9, 2026 00:02
@andreadelrio
andreadelrio requested review from a team as code owners October 9, 2026 00:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The source, generated asset, registration metadata, and snapshot are consistent and complete.

0 open findings

What changed in this PR

Adds the ruler glyph to EuiIcon, including search metadata and test coverage.

Changes:

  • Adds the 16×16 ruler SVG and generated React asset.
  • Registers ruler with measurement-related synonyms.
  • Adds the rendered icon snapshot.
File Description
packages/​eui/​src/​components/​icon/​svgs/​ruler.svg Defines the source glyph.
packages/​eui/​src/​components/​icon/​assets/​ruler.tsx Provides the generated React asset.
packages/​eui/​src/​components/​icon/​icon_map.ts Registers the icon and search metadata.
packages/​eui/​src/​components/​icon/​__snapshots__/​icon.test.tsx.snap Covers rendered output.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

📷 1 visual difference(s) found

Look at the visual diff below. If everything is expected, run Approve visual changes to update baselines, re-run the job or make appropriate fixes.

See the visual regression testing wiki for more information.

Expand to review

euiicon (1 difference)

StoryDiff %BeforeAfterDiff
all icons desktop 3.09%

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

📷 1 visual difference(s) found

Look at the visual diff below. If everything is expected, run Approve visual changes to update baselines, re-run the job or make appropriate fixes.

See the visual regression testing wiki for more information.

Expand to review

euiicon (1 difference)

StoryDiff %BeforeAfterDiff
all icons desktop 3.09%

@bpotselastic

Copy link
Copy Markdown

The ruler icon looks good!

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

📷 1 visual difference(s) found

Look at the visual diff below. If everything is expected, run Approve visual changes to update baselines, re-run the job or make appropriate fixes.

See the visual regression testing wiki for more information.

Expand to review

euiicon (1 difference)

StoryDiff %BeforeAfterDiff
all icons desktop 3.09%

@mgadewoll

Copy link
Copy Markdown
Contributor

buildkite test this

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

📷 1 visual difference(s) found

Look at the visual diff below. If everything is expected, run Approve visual changes to update baselines, re-run the job or make appropriate fixes.

See the visual regression testing wiki for more information.

Expand to review

euiicon (1 difference)

StoryDiff %BeforeAfterDiff
all icons desktop 3.09%

@mgadewoll mgadewoll left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 LGTM

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

History

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

History

@mgadewoll
mgadewoll merged commit 0e5f218 into elastic:main Oct 12, 2026
7 checks passed
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.

5 participants