Skip to content

fix(Icon): enlarge check glyph to fill its viewBox#1068

Open
DreaminDani wants to merge 2 commits into
mainfrom
dani/enlarge-check-glyph
Open

fix(Icon): enlarge check glyph to fill its viewBox#1068
DreaminDani wants to merge 2 commits into
mainfrom
dani/enlarge-check-glyph

Conversation

@DreaminDani

@DreaminDani DreaminDani commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Why?

The check icon glyph rendered noticeably smaller than the other icons. Its
path sat offset within the 24×24 viewBox (≈67% width, ≈46% height), leaving a
lot of empty space, so the standalone glyph looked undersized.

How?

  • Scaled the check path up ~1.25× about the viewBox center so it fills the box
    like the other glyphs (d="M22 5.125L8.25 18.875L2 12.625"); stroke weight
    stays at 2.
  • Rendered the Checkbox's check at 0.8rem (= 1rem / 1.25) so the checkmark
    inside the box keeps its current size — the check in the checkbox will be slightly thinner. If we don't like that, I can make the stroke weight 2.5 so it visually matches... but that might make it too bold in places.
  • The indeterminate (minus) icon is untouched.

Note for reviewers: the icon-gallery visual-regression baseline will change
(intended). The Checkbox baselines should stay unchanged, since the check is
compensated to render at its existing size.

Tickets?

N/A

Contribution checklist?

  • You've done enough research before writing
  • You have reviewed the PR
  • The commit messages are detailed
  • The build command runs locally
  • Assets or static content are linked and stored in the project
  • For documentation, guides or references, you've tested the commands

Security checklist?

  • All user inputs are validated and sanitized
  • No usage of dangerouslySetInnerHTML
  • Sensitive data has been identified and is being protected properly
  • Build output contains no secrets or API keys

Preview?

Verified in Storybook (Icon gallery + Checkbox stories) and in control-plane via 0.6.1-rc2.


Note

Low Risk
Visual-only icon and Checkbox sizing tweaks with no auth, data, or API changes; minor risk of inconsistent check appearance where the icon is used without the Checkbox compensation.

Overview
The standalone check icon is enlarged by rescaling its SVG path (~1.25×) so the glyph fills the 24×24 viewBox and aligns visually with other icons, with stroke weight unchanged.

Checkbox still shows the same check size inside the box by rendering the check icon at 0.8rem (1rem ÷ 1.25); the indeterminate minus icon is unchanged. A patch changeset documents the @clickhouse/click-ui release.

Icon-gallery visual baselines are expected to change; Checkbox baselines should stay the same.

Reviewed by Cursor Bugbot for commit 6c4fe47. Bugbot is set up for automated code reviews on this repo. Configure here.

The `check` glyph was small and offset within its 24x24 viewBox, so it
rendered noticeably smaller than other icons. Scale the path up ~1.25x
about the viewBox center; stroke weight stays at 2.

Render the Checkbox's check at 0.8rem (= 1rem / 1.25) so the checkmark
inside the box keeps its current size; the indeterminate (minus) icon is
unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jun 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6c4fe47

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clickhouse/click-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@DreaminDani DreaminDani requested review from ariser and crisalbu June 5, 2026 22:23
@workflow-authentication-public

Copy link
Copy Markdown
Contributor

Storybook Preview Deployed

✅ Preview URL: https://click-29e5m3a1k-clickhouse.vercel.app

Built from commit: 9b82290f30e4f76b5672f11504ead0990040cd44

The enlarged `check` glyph renders at a compensated size inside the checkbox,
keeping the checkmark's dimensions but with a slightly thinner stroke. Regenerate
the affected checked-state snapshots (default, disabled, var1–var6; light + dark)
via the Docker Playwright suite. Indeterminate and unchecked states are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment on lines +59 to +61
// The `check` glyph was scaled up 1.25x at the SVG level; render it
// here at 1rem / 1.25 = 0.8rem so the checkmark keeps its original
// size inside the box. `minus` (indeterminate) is unaffected.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this comment doesn't carry meaning outside of this PR
“original size” is undefined, “keeps” requires pre-existing knowledge

the comment should state why we need this adjustment rather than why we made it

// size inside the box. `minus` (indeterminate) is unaffected.
{...(checked === 'indeterminate'
? {}
: { width: '0.8rem', height: '0.8rem' })}

@ariser ariser Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

that said, I don't like that we're doing this. Why change the icon size if we need this adjustment? If we are doing this adjustment, why are we not doing it for both check mark and minus? It signals that either one of the icons is incorrect, or the checkbox layout is incorrect. Can this change be made without introducing workarounds for components?

@ariser ariser Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • we can scale both check and minus
    • (need to scale plus then as well)
  • we can accept the new checkbox appearance w/o adjusting it
  • we can resize the checkbox icon for both icons so that minus is a bit smaller, but the layout is consistent (and probably we'll then see that the minus icon should be scaled to match after all)

@ariser ariser Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we can also not scale the check mark, I'm looking at other icons, and plus/minus/arrows/etc all have spacings around them in svg, this change makes the check mark a bit of an outlier. It looks bigger. If we're ok with that, or maybe if we plan to migrate them gradually one by one, fine. But maybe we want to make an approach to unify all icons in a batch, to avoid an inconsistent look of similarly-shaped icons.

before after
image image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@crisalbu this is worth considering. Should we also address these other icons? What about the chevrons?

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.

3 participants