spectrum-css icon indicating copy to clipboard operation
spectrum-css copied to clipboard

fix(search): update icon sizing calculation in the quiet variant [CSS-1012]

Open castastrophe opened this issue 1 year ago • 4 comments

Description

A bug fix for the Search component's quiet variant. The --spectrum-search-quiet-button-offset was being calculated using a static workflow icon size of 100 but the search icon sizing is set using t-shirt sizing and varies. This PR updates the calculation to use the variable --spectrum-search-icon-size which updates based on the determined t-shirt size.

This also adds a deprecation notice for the --mod-workflow-icon-size-100 and suggests the use of the --mod-search-icon-size instead.

I didn't add a changeset for the update to clearbutton because it just combines the duplicate selectors for .spectrum-ClearButton.

How and where has this been tested?

Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.

Validation steps

  • [x] Expect VRTs to reflect the updated offset spacing between the search icon and the Search text in the quiet variant.
  • [x] The space between clear icon and the end of the input field should vary based on which t-shirt size is used for the clear icon.
Screenshot 2024-10-22 at 4 56 02 PM Screenshot 2024-10-22 at 4 56 13 PM

Regression testing

Validate:

  1. The documentation pages for at least two other components are still loading, including:
  • [x] The pages render correctly, are accessible, and are responsive.
  1. If components have been modified, VRTs have been run on this branch:
  • [x] VRTs have been run and looked at.
  • [x] Any VRT changes have been accepted (by reviewer and/or PR author), or there are no changes.

To-do list

  • [x] I have read the contribution guidelines.
  • [x] ✨ This pull request is ready to merge. ✨

castastrophe avatar Oct 22 '24 13:10 castastrophe

🦋 Changeset detected

Latest commit: 7d15e040c87194ee8bcf024d2d3c06727573147c

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

This PR includes changesets to release 1 package
Name Type
@spectrum-css/search 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

changeset-bot[bot] avatar Oct 22 '24 13:10 changeset-bot[bot]

File metrics

Summary

Total size: 4.30 MB* Total change (Δ): 🟢 ⬇ 1.00 KB (-0.02%)

Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.

Package Size Δ
clearbutton 7.53 KB 🟢 ⬇ 0.03 KB
search 14.92 KB 🟢 ⬇ 0.31 KB

Details

clearbutton

Filename Head Compared to base
index-base.css 6.75 KB 🟢 ⬇ 0.03 KB (-0.37%)
index-theme.css 1.40 KB -
index-vars.css 7.53 KB 🟢 ⬇ 0.03 KB (-0.34%)
index.css 7.53 KB 🟢 ⬇ 0.03 KB (-0.34%)
themes/express.css 1.03 KB -
themes/spectrum.css 1.00 KB -

search

Filename Head Compared to base
index-base.css 12.38 KB 🟢 ⬇ 0.31 KB (-2.37%)
index-theme.css 3.16 KB -
index-vars.css 14.92 KB 🟢 ⬇ 0.31 KB (-1.98%)
index.css 14.92 KB 🟢 ⬇ 0.31 KB (-1.98%)
themes/express.css 1.93 KB -
themes/spectrum.css 1.84 KB -
* Size determined by adding together the size of the main file for all packages in the library.
* Results are not gzipped or minified.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

github-actions[bot] avatar Oct 22 '24 13:10 github-actions[bot]

🚀 Deployed on https://pr-3297--spectrum-css.netlify.app

github-actions[bot] avatar Oct 22 '24 13:10 github-actions[bot]

VRT run: https://www.chromatic.com/build?appId=64762974a45b8bc5ca1705a2&number=3532

castastrophe avatar Oct 22 '24 20:10 castastrophe