Skip to content

improvement(emcn): normalize the chevron geometry and consolidate consumers - #6258

Merged
waleedlatif1 merged 3 commits into
stagingfrom
improvement/emcn-icon-geometry
Aug 4, 2026
Merged

improvement(emcn): normalize the chevron geometry and consolidate consumers#6258
waleedlatif1 merged 3 commits into
stagingfrom
improvement/emcn-icon-geometry

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

The sidebar folder arrow reads as much larger than the icons beside it. It measurably is — ChevronRight was a triple outlier in the icon set.

ChevronRight house standard
viewBox 0 0 6 10 24-based — 149 of 173 icons
glyph fill 80% of the box 54% median
strokeWidth 1.2 1.55153 of 173
cap / join square / miter round / round175 / 177

Because the box is tight-cropped, a square size-[16px] scales the glyph to 12.8px tall where a standard icon shows ~8.6px — about 50% larger, with a relatively ~85% heavier stroke. The lucide icon it replaced was a 24-box at 50% fill, which is why this only surfaced after #6241.

The fix

chevron-down, chevron-right and chevron-left are rebuilt as the exact mirror and transpose of chevron-up, which already sets the house standard. Their optical weight now matches that sibling by construction rather than by eye:

chevron-up     M3 13.25 L10.25 6.25  L17.5 13.25
chevron-down   M3 6.25  L10.25 13.25 L17.5 6.25
chevron-left   M13.25 3 L6.25 10.25  L13.25 17.5
chevron-right  M6.25 3  L13.25 10.25 L6.25 17.5

Why the viewBox change alone would have broken things

36 call sites sized these to the old tight aspect (h-[7px] w-[9px], h-[6px] w-[10px], h-[9px] w-[7px]), which would letterboxe against a square box. All move to size-[14px] — the documented default and the app's dominant size (212 uses). All 94 chevron call sites are now square-sized.

Three would have regressed silently, since they are only reachable through indirection:

  • STYLES.chevron in the terminal's structured output (a string constant)
  • the sidebar-section chevron inside a multi-line cn()
  • the dropdown submenu chevron carried no size at all — it relied on the icon's intrinsic 6×10 and would have jumped to 24×24

Also unifies folder-input, which carried both 1.55 and 2 within a single icon.

Docs consolidation (same theme)

Docs was forking shared components:

  • SidebarChevron was a private inline copy of the old 6×10 chevron → now wraps the shared ChevronRight
  • ThemeToggle inlined lucide's sun and moon at strokeWidth 1.5 → both now come from @sim/emcn/icons at the house 1.55

Docs inline <svg> files drop from 9 to 7; the rest are the brand icon set, the logo, OG-image generation, and bespoke hand-positioned shapes.

Deliberately not touched

16 icons whose stroke or box still differs are fill-based glyphs and brand marks (sim, wordmark, folder, more-horizontal, play, connections, …). Changing their stroke means redrawing the icon — that wants visual review, not a sweep. They are listed in the commit body.

Verification

23/23 type-check --force, biome, api-validation, 18361 tests, and production builds of both apps. Merged latest staging and re-verified.

…sumers

The sidebar folder arrow read as much larger than the icons beside it. It was
measurably so: `ChevronRight` was a triple outlier in the icon set.

| | ChevronRight | house standard |
|---|---|---|
| viewBox | `0 0 6 10` | 24-based — 149 of 173 icons |
| glyph fill | 80% of the box | 54% median |
| strokeWidth | 1.2 | 1.55 — 153 of 173 |
| cap/join | square/miter | round/round — 175/177 |

Because the box was tight-cropped, a square `size-[16px]` scaled the glyph to
12.8px tall where a standard icon shows ~8.6px — about 50% larger, with a
relatively ~85% heavier stroke. The lucide icon it replaced was a 24-box at 50%
fill, which is why this only appeared after the migration.

`chevron-down`, `chevron-right` and `chevron-left` are rebuilt as the exact
mirror and transpose of `chevron-up`, which already sets the house standard, so
their optical weight is identical to that sibling by construction rather than by
eye.

Changing the viewBox is not safe on its own: 36 call sites sized these to the
old tight aspect (`h-[7px] w-[9px]`, `h-[6px] w-[10px]`, ...), which would
letterbox against a square box. All of them move to `size-[14px]`, the documented
default and the app's dominant size (212 uses). Every one of the 94 chevron call
sites is now square-sized.

Two of those were only reachable through indirection and would have regressed
silently: `STYLES.chevron` in the terminal's structured output, and the
sidebar-section chevron inside a multi-line `cn()`. The dropdown submenu chevron
carried no size at all and was relying on the icon's intrinsic 6x10 — it would
have jumped to 24x24.

Also unifies `folder-input`, which carried both 1.55 and 2 within one icon.

Docs consolidation, same theme — it was forking shared components:
- `SidebarChevron` was a private inline copy of the old 6x10 chevron; it now
  wraps the shared `ChevronRight`.
- `ThemeToggle` inlined lucide's sun and moon at strokeWidth 1.5; both now come
  from `@sim/emcn/icons` at the house 1.55.

Docs inline `<svg>` files drop from 9 to 7; the remainder are the brand icon set,
the logo, OG-image generation and bespoke hand-positioned shapes.

Left alone: 16 icons whose stroke or box still differs. They are fill-based
glyphs and brand marks (`sim`, `wordmark`, `folder`, `more-horizontal`, ...)
where changing the stroke means redrawing the icon — that wants visual review,
not a sweep.

Verified: 23/23 type-check (--force), biome, api-validation, 18361 tests, and
production builds of both apps.
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 4, 2026 7:37pm

Request Review

@cursor

cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Visual and icon-sizing consistency only; no auth, data, or API behavior changes.

Overview
Realigns chevron-left, chevron-right, and chevron-down with the house chevron-up standard: 24-based viewBox, round caps/joins, strokeWidth 1.55, and matching path geometry so sidebar and chip chevrons no longer read oversized next to other icons.

Because the old icons were tight-cropped, call sites that used mixed h/w classes are updated to size-[14px] across workspace UI, landing previews, emcn chips/dropdowns, and docs. DropdownMenuSubTrigger now explicitly sizes its submenu ChevronRight so it does not inherit the new 24×24 intrinsic box.

Docs drops bespoke SVGs: the sidebar folder arrow uses shared ChevronRight, and ThemeToggle uses Sun/Moon from @sim/emcn/icons instead of inline lucide copies. folder-input stroke weights are unified to 1.55.

Reviewed by Cursor Bugbot for commit daf1b80. Configure here.

@github-actions github-actions Bot added the requires-mothership-merge Has a companion PR on the mothership/copilot side — merge in lockstep label Aug 4, 2026
@waleedlatif1 waleedlatif1 removed the requires-mothership-merge Has a companion PR on the mothership/copilot side — merge in lockstep label Aug 4, 2026
@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR normalizes directional chevrons to shared 24-based geometry and consolidates icon consumers around the EMCN icon set.

  • Rebuilds left, right, and down chevrons with consistent stroke geometry.
  • Updates consumers to use square 14px sizing.
  • Replaces private docs-site SVG implementations with shared icons.
  • Corrects the previously reported stale sizing documentation.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported stale geometry documentation is corrected in the current code.

Important Files Changed

Filename Overview
packages/emcn/src/icons/chevron-down.tsx Rebuilds the down chevron with normalized viewBox, stroke, cap, and join geometry.
packages/emcn/src/icons/chevron-left.tsx Rebuilds the left chevron as the directional counterpart of the normalized icon family.
packages/emcn/src/icons/chevron-right.tsx Rebuilds the right chevron with normalized geometry used by sidebar and submenu consumers.
packages/emcn/src/components/chip/chip-chevron.tsx Updates the shared chip adornment and its TSDoc to consistently describe and render a 14px chevron.
apps/docs/components/docs-layout/sidebar-components.tsx Replaces the private sidebar SVG with the shared normalized ChevronRight component.

Reviews (2): Last reviewed commit: "docs(emcn): correct the chevron geometry..." | Re-trigger Greptile

Comment thread packages/emcn/src/components/chip/chip-chevron.tsx
ChipChevronDown's TSDoc still described centring a 10x6 glyph, and the
enterprise sidebar's chip-parity comment still cited a 6x10 chevron. Both
now read 14px, matching what the components actually render.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit daf1b80. Configure here.

@waleedlatif1
waleedlatif1 merged commit c14818b into staging Aug 4, 2026
30 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/emcn-icon-geometry branch August 4, 2026 19:38
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