spectrum-web-components icon indicating copy to clipboard operation
spectrum-web-components copied to clipboard

fix(number-field): add support for scrubbing

Open Westbrook opened this issue 1 year ago • 3 comments

Description

This had been bopping around in a branch for a long while thanks to the work of @bengfarrell and I wanted to get it into a PR in case people were interested in adopting it.

Allow click and drag on the input of a Number Field to scrub the value.

Related issue(s)

  • fixes #1528

How has this been tested?

  • [ ] Test case 1
    1. Go here
    2. Click and drag across the input field to change the value

Types of changes

  • [x] New feature (non-breaking change which adds functionality)

Checklist

  • [x] I have signed the Adobe Open Source CLA.
  • [x] My code follows the code style of this project.
  • [ ] If my change required a change to the documentation, I have updated the documentation in this pull request.
  • [x] I have read the CONTRIBUTING document.
  • [ ] I have added tests to cover my changes.
  • [x] All new and existing tests passed.

Westbrook avatar May 21 '24 18:05 Westbrook

Branch preview

Review the following VRT differences

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file. If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

github-actions[bot] avatar May 21 '24 18:05 github-actions[bot]

Lighthouse scores

Category Latest (report) Main (report) Branch (report)
Performance 0.99 0.98 0.98
Accessibility 1 1 1
Best Practices 1 1 1
SEO 1 0.92 0.92
PWA 1 1 1
What is this?

Lighthouse scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on main ("Main"). Higher scores are better, but note that the SEO scores on Netlify URLs are artifically constrained to 0.92.

Transfer Size

Category Latest Main Branch
Total 243.855 kB 230.917 kB 🏆 230.968 kB
Scripts 60.298 kB 54.216 kB 🏆 54.463 kB
Stylesheet 47.464 kB 42.117 kB 42.013 kB 🏆
Document 6.238 kB 5.491 kB 5.486 kB 🏆
Font 127.011 kB 126.745 kB 126.632 kB 🏆

Request Count

Category Latest Main Branch
Total 52 52 52
Scripts 41 41 41
Stylesheet 5 5 5
Document 1 1 1
Font 2 2 2

github-actions[bot] avatar May 21 '24 18:05 github-actions[bot]

Tachometer results

Currently, no packages are changed by this PR...

github-actions[bot] avatar May 21 '24 19:05 github-actions[bot]

⚠️ No Changeset found

Latest commit: 02dc301f23f96078329b9aae0217f1ab9ab4c60d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

changeset-bot[bot] avatar Jan 07 '25 14:01 changeset-bot[bot]

Pull Request Test Coverage Report for Build 14054150137

Details

  • 84 of 109 (77.06%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.06%) to 97.922%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/number-field/src/NumberField.ts 84 109 77.06%
<!-- Total: 84 109
Totals Coverage Status
Change from base Build 14053943570: -0.06%
Covered Lines: 33755
Relevant Lines: 34278

💛 - Coveralls

coveralls avatar Feb 26 '25 16:02 coveralls