Repository navigation
Conversation
Two components truncated text with a bare `span:first-of-type` selector ported verbatim from styled-components. After #1302 made the Icon wrapper a <span>, these matched icon wrappers instead of (or in addition to) text. - Select: `.select-trigger span:first-of-type` never truncated the value text (it is a <div class="ellipsis-content"> that self-truncates, as do .select-value and .select-value-container). The rule was inert before #1302 and only mis-targeted icon spans after, so remove it. - InputWrapper: `.wrapper span:first-of-type` does truncate the range date pickers' composed value <span>, which sits inside an `as="div"` .input. Scope the rule to `.input > span` so it keeps truncating that value but no longer matches icons (which live in start/end content), nor NumberField start/end adornment spans. Closes #1303 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 08bfb54 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Chromatic Storybook
Built from commit: Statuses as of the end of the run. The build link shows the live review state. |
Contributor
Storybook Preview Deployed✅ Preview URL: https://click-ro3p0ir31-clickhouse.vercel.app Built from commit: |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to #1302 (Icon wrapper
div→span), closing #1303.Two components truncated text with a bare-element selector,
span:first-of-type, ported verbatim from the styled-components era. Because icons are now<span>s, these selectors started matching icon wrappers — the opposite of their intent. This replaces the bare-element targeting with class-scoped targeting..select-trigger span:first-of-typenever truncated the value text: the value is a<div class="ellipsis-content">(EllipsisContent defaults to a div) that self-truncates, as do.select-value-container(single) and.select-value. The rule was inert before fix(Icon): render wrapper as span for valid inline nesting #1302 and only mis-targeted the sort/item icon spans after it. Removed..wrapper span:first-of-typedoes do real work: it truncates the composed value<span>of the range date pickers, which sits as a direct child of anas="div"InputElement(.inputhaswidth:100%but nooverflow, so this rule is what clips it). Every icon lives in.start-content/.end-content/.icon-button, never in.input. Scoped to.input > span— same declarations, same target span, icons excluded.Good to know
Accepted behavior change:
NumberFieldstart/end adornment spans (e.g.$,units) are no longer force-truncated (they losewhite-space:nowrap+ ellipsis) and lay out naturally. Icons share those containers, so truncation can't be kept selectively for adornments; content is short, so this is normally invisible (confirmed: zero visual diffs below). Field values still truncate as before.Checklist
A
patchchangeset is included. No visual change (see below).Contribution
buildandbuild-storybookwork locallyVerified locally:
typecheck,lint(0 errors),format,circular-dependency:check, unit tests for the Select + input families (245 passing),build+ health check,storybook:build. Visual regression in Docker — 108/108 passing with zero diffs acrossselect,inputfield(incl. NumberField),daterangepicker,datetimerangepicker,datepicker. No snapshots regenerated.Accessibility
CSS-only; no markup, behavior, or ARIA changes. Icons and field/trigger values render as before.
Screenshots
No visual change — all existing snapshots match with zero diffs.
🤖 Generated with Claude Code
Note
Low Risk
CSS-only selector scoping with patch-level UI behavior (adornment wrapping); no logic, ARIA, or data-path changes, and visual regression reported clean.
Overview
Follow-up to icon wrappers becoming
<span>elements: truncation rules that used barespan:first-of-typenow target the right nodes only.Select drops the unused
.select-trigger span:first-of-typerule (value text already truncates viaEllipsisContent/ value container styles; the old selector only hit icon spans after the icon change).InputWrapper keeps the same ellipsis behavior for range date picker composed values by moving truncation to
.input > span, so start/end icon wrappers and adornments outside.inputare no longer clipped.NumberField$/unit adornments may layout without forced ellipsis; field values still truncate as before.Reviewed by Cursor Bugbot for commit 08bfb54. Bugbot is set up for automated code reviews on this repo. Configure here.