Skip to content

[number field] Expand test coverage#5280

Merged
atomiks merged 3 commits into
mui:masterfrom
atomiks:claude/number-field-full-coverage-cf36d3
Jul 20, 2026
Merged

[number field] Expand test coverage#5280
atomiks merged 3 commits into
mui:masterfrom
atomiks:claude/number-field-full-coverage-cf36d3

Conversation

@atomiks

@atomiks atomiks commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Expands Number Field test coverage to 100% across statements, branches, functions, and lines on merged jsdom and Chromium results, and removes the dead code the sweep uncovered.

Changes

  • Added behavior tests for consumer-prevented focus, blur, change, and keydown defaults, single sign-character replacement, hidden-input focus and autofill, vertical scrubbing, virtual cursor wrapping, multi-touch pinch, non-primary pointer buttons, the iOS input mode, the Gecko pointer lock delay, and the missing-context errors.
  • Restored the scrub area's isScrubbingRef guard on pointer move. Effects can tear down and re-run without unmounting under <Activity>, which clears the ref while isScrubbing stays true and re-attaches the listener, so a bare mouse move changed the value.
  • Made getNumberLocaleDetails always return a decimal separator, which drops the optional-decimal branches in parseNumber and NumberField.Root.
  • Replaced the willSetHome/willSetEnd pair in NumberField.Input with a single boundary value, removing an unreachable ?? null.
  • Removed the commit fallbacks in the blur, keyboard, and wheel paths. setValue always records the stored value before those run, so the fallback could never fire.
  • Removed the null guard in parseNumber, the redundant cursor null check in NumberField.ScrubArea, and the unused SCROLLING_POINTER_MOVE_DISTANCE constant.

@atomiks atomiks added component: number field Changes related to the number field component. test labels Jul 20, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 20, 2026

Copy link
Copy Markdown

commit: 9794890

@code-infra-dashboard

code-infra-dashboard Bot commented Jul 20, 2026

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react ▼-77B(-0.02%) ▼-14B(-0.01%)

Details of bundle changes

Performance

Total duration: 1,283.32 ms -137.51 ms(-9.7%) | Renders: 78 (+0) | Paint: 2,025.83 ms -193.07 ms(-8.7%)

Test Duration Renders
Menu mount (300 instances) 127.84 ms ▼-57.90 ms(-31.2%) 2 (+0)
Menu open (500 items) 62.84 ms ▼-24.32 ms(-27.9%) 12 (+0)
Combobox type — 500 items, narrows to ~11 (type "Row 25") 34.40 ms ▼-9.65 ms(-21.9%) 15 (+0)

12 tests within noise — details


Check out the code infra dashboard for more information about this PR.

@netlify

netlify Bot commented Jul 20, 2026

Copy link
Copy Markdown

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 23bc764
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a5dfee94ebfda000862ef6b
😎 Deploy Preview https://deploy-preview-5280--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@atomiks
atomiks force-pushed the claude/number-field-full-coverage-cf36d3 branch from 81181f2 to 614d807 Compare July 20, 2026 04:57
@atomiks
atomiks force-pushed the claude/number-field-full-coverage-cf36d3 branch from 9794890 to 23bc764 Compare July 20, 2026 10:56
@atomiks
atomiks marked this pull request as ready for review July 20, 2026 10:56
@atomiks
atomiks merged commit b6b05c7 into mui:master Jul 20, 2026
5 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: number field Changes related to the number field component. test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant