Skip to content

chore: Adds internal style api v2 to text filter, date input and time input - #5198

Merged
vvaliyev merged 1 commit into
mainfrom
style-v2-input-forwards
Oct 29, 2026
Merged

vvaliyev merged 1 commit into
mainfrom
style-v2-input-forwards

Conversation

@vvaliyev

@vvaliyev vvaliyev commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Description

Adds the internal Style API v2 to Text filter, Date input and Time input. All three render an Input, and each exposes it as a whole-component forward: the input slot takes Input's style class names object ({ root, input, inlineLabel, searchIcon, clearButton }) and consumers style it through the generated Input mixins. Text filter additionally has its own countText slot (the results count rendered after the input; shown while filteringText and countText are set and the filter is not disabled) with color, font-family, font-size, font-weight.

The styleClassNames props are internal and not part of the public props. Design-token values and the v1 inline styles are unchanged; no CSS changes.

The style-docs snapshot is regenerated with component-toolkit 1.0.0-beta.192, which lists shorthand properties as their longhands; the existing entries for Alert, Badge, Button, Dropdown, Input and Textarea change accordingly, and the three new entries are added. The generated styling/date-input.scss and styling/time-input.scss contain no mixins because these components only forward.

Tracker sections: P3d34KdbCd6o.

How has this been tested?

  • npm run build; unit tests for src/text-filter, src/date-input, src/time-input, src/input, the masked input, and the style-docs snapshot; prettier, stylelint, eslint.
  • New unit tests per component: the forwarded Input classes land on the Input's field box and native input, the countText class lands on the count element and is absent when the count is not shown, unknown keys are ignored, the prop does not reach the DOM.
  • New dev pages pages/{text-filter,date-input,time-input}/style-api-v2 styled only through the generated input.root(), input.input(), input.searchIcon(), button.root() and text-filter.countText() mixins, covering the documented states; checked in the browser. Not in the visual regression suite yet, like the other style-api-v2 pages.

@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.74%. Comparing base (396e7f1) to head (b69a1a3).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5198   +/-   ##
=======================================
  Coverage   97.73%   97.74%           
=======================================
  Files         998     1000    +2     
  Lines       32294    32314   +20     
  Branches    11945    11953    +8     
=======================================
+ Hits        31564    31584   +20     
  Misses        685      685           
  Partials       45       45           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

🟡 Changes recommended

Duplicated Input styling across DateInput, TimeInput, and TextFilter demos should be extracted into shared Sass mixins to avoid repeating fixes, with component-specific overrides kept local.

1 open issue
What changed in this PR

Adds internal Style API v2 support to TextFilter, DateInput, and TimeInput by forwarding Input styling slots, without changing public props or default component styling.

Changes:

  • Forwards Input style classes and adds TextFilter’s countText slot.
  • Supports whole-component documentation forwards and refreshes style-docs snapshots.
  • Adds unit tests and styled demo pages for the three components.
File Description
src/​time-input/​styles.scss Documents the Input forward.
src/​time-input/​internal.tsx Forwards internal Input style classes.
src/​time-input/​__tests__/​style-api.test.tsx Tests forwarding, states, and DOM prop isolation.
src/​text-filter/​styles.scss Documents Input forwarding and countText styling.
src/​text-filter/​search-results.tsx Applies a custom results-count class.
src/​text-filter/​internal.tsx Routes Input and count-text style classes.
src/​text-filter/​__tests__/​style-api.test.tsx Tests slot classes, disabled behavior, and prop isolation.
src/​internal/​styles/​style-api.scss Makes the forwarded slot optional.
src/​date-input/​styles.scss Documents the Input forward.
src/​date-input/​internal.tsx Forwards internal Input style classes.
src/​date-input/​__tests__/​style-api.test.tsx Tests forwarding, states, and DOM prop isolation.
src/​__tests__/​snapshot-tests/​__snapshots__/​style-docs.test.ts.snap Adds component entries and refreshes property lists.
pages/​time-input/​style-api-v2.scss Defines demo styling through Input mixins.
pages/​time-input/​style-api-v2.page.tsx Demonstrates TimeInput styling across states and formats.
pages/​text-filter/​style-api-v2.scss Styles Input slots and results count.
pages/​text-filter/​style-api-v2.page.tsx Demonstrates TextFilter styling and count visibility.
pages/​date-input/​style-api-v2.scss Defines demo styling through Input mixins.
pages/​date-input/​style-api-v2.page.tsx Demonstrates DateInput styling across states and formats.

Review effort: Balanced

Comment thread pages/date-input/style-api-v2.scss
Comment thread pages/date-input/style-api-v2.page.tsx Outdated
pan-kot
pan-kot previously approved these changes Oct 28, 2026
pan-kot
pan-kot previously approved these changes Oct 29, 2026
@vvaliyev
vvaliyev disabled auto-merge October 29, 2026 10:23
@vvaliyev
vvaliyev added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 544e428 Oct 29, 2026
68 checks passed
@vvaliyev
vvaliyev deleted the style-v2-input-forwards branch October 29, 2026 13:37

This branch was successfully deployed

3 active deployments
dev-pages-react18 — b69a1a3e Deployed Oct 29, 2026 by vvaliyev via deploy (React 18) / deploy #3037
dev-pages-react16 — b69a1a3e Deployed Oct 29, 2026 by vvaliyev via deploy (React 16) / deploy #3037
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