Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(infield-button): updated border color for disabled state #3615

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Rajdeepc
Copy link
Collaborator

@Rajdeepc Rajdeepc commented Mar 12, 2025

Description

The design feedback for number field revealed some requests regarding the border colors of the stepper/number field, and most recently related to the nested infield button. This PR aims to address that feedback.

Updates the value of disabled border of infield-button

Disabled state (in-field button)
Expected: gray-300 border

Additional feedback included:

  • Focus hover state (textfield)
    Expected: gray-900 border
  • Default state (in-field button)
    Expected: gray-100 button background
  • Disabled state (in-field button)
    Expected: gray-300 border
  • Hover state (in-field button)
    Expected: gray-200 button background
  • Key focus state (in-field button)
    Expected: gray-200 button background
    Expected: gray-900 chevron color

The green checkmarks above are styles that are already found for the stepper/number field styles in the CSS repo. The PRs that addressed these already can be found here:
#3536 (for the infield button background color corrections)
#3621 (for the focus+hover border color correction)

NOTE: We received some updated feedback from design regarding the key focus state, which means that no further CSS changes were necessary!

  • Key focus state (in-field button)
    Expected: gray-100 button background (incorrectly had this as gray-200 originally)
    Expected: gray-800 chevron color (incorrectly had this as gray-900 originally)

Jira/Specs

SWC-576

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

Screenshot 2025-04-03 at 11 57 58 AM

Additional validation (the remaining validation steps likely were already completed in #3536 and #3621. This CSS already exists and functions as design expects 🥳 )

  • Verify the border color of the infield button resolves to gray-200 in both the S1 and Express contexts. [@cdransf]
Screenshot 2025-04-03 at 11 59 58 AM Screenshot 2025-04-03 at 11 59 34 AM Screenshot 2025-04-03 at 12 02 19 PM
  • Inspect the hover state stepper. Inspect the .spectrum-InfieldButton element (one of the stepper buttons) and turn on the :hover state in your dev tools. Verify the nested infield button has a background color of gray-200. [@cdransf]
Screenshot 2025-04-03 at 5 02 43 PM
  • Inspect the keyboardFocus state stepper. Verify the nested infield button also has a background color of gray-100. [@cdransf]
  • Still in the keyboardFocus stepper, inspect the chevron within the infield button. It should have a color of gray-800. [@cdransf]
Screenshot 2025-04-04 at 4 27 25 PM
  • Inspect the focus state stepper. In your browser dev tools, turn on the :hover state of .spectrum-Stepper and .spectrum-Stepper-textfield. [@cdransf]
  • Verify in this focus+hover state, verify the textfield has a border of gray-900. [@cdransf]
Screenshot 2025-04-03 at 12 11 05 PM

Regression testing

Validate:

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

Screenshots

Before 🚫
Screenshot 2025-04-04 at 4 48 12 PM
Screenshot 2025-04-04 at 4 51 38 PM

After ✅
Screenshot 2025-04-04 at 4 47 58 PM
Screenshot 2025-04-04 at 4 51 32 PM

To-do list

  • I have read the contribution guidelines.
  • I have tested these changes in Windows High Contrast mode.
  • If my change impacts other components, I have tested to make sure they don't break.
  • ✨ This pull request is ready to merge. ✨

@Rajdeepc Rajdeepc self-assigned this Mar 12, 2025
Copy link

changeset-bot bot commented Mar 12, 2025

🦋 Changeset detected

Latest commit: 9e84946

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

This PR includes changesets to release 2 packages
Name Type
@spectrum-css/infieldbutton Patch
@spectrum-css/stepper 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

Copy link
Contributor

github-actions bot commented Mar 12, 2025

File metrics

Summary

Total size: 2.24 MB*

Package Size Minified Gzipped
infieldbutton 15.65 KB 15.06 KB 1.88 KB

infieldbutton

Filename Head Minified Gzipped Compared to base
index-base.css 14.77 KB 14.22 KB 1.78 KB 🔴 ⬆ < 0.01 KB
index-theme.css 1.77 KB 1.73 KB 0.59 KB 🔴 ⬆ 0.13 KB
index.css 15.65 KB 15.06 KB 1.88 KB 🔴 ⬆ 0.11 KB
metadata.json 7.82 KB - - 🔴 ⬆ 0.08 KB
themes/express.css 1.44 KB 1.40 KB 0.58 KB 🔴 ⬆ 0.07 KB
themes/spectrum-two.css 1.45 KB 1.42 KB 0.58 KB 🔴 ⬆ 0.07 KB
themes/spectrum.css 1.47 KB 1.43 KB 0.59 KB 🔴 ⬆ 0.07 KB
* Size is the sum of all main files for packages in the library.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

Copy link
Contributor

github-actions bot commented Mar 12, 2025

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

@rise-erpelding rise-erpelding self-requested a review March 12, 2025 15:31
Copy link
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CSS changes look good, I'd recommend a few updates to the changeset to make our changelogs read more nicely!

@castastrophe castastrophe force-pushed the main branch 10 times, most recently from c68f4e3 to d2272ea Compare March 12, 2025 21:56
Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! Just to clarify- this PR is only focused on the feedback for the disabled state, and is not addressing everything in the ticket, correct? If that's the case, I can approve once Rise's changes have been addressed! Thank you!

@castastrophe castastrophe force-pushed the rajdeep/infield-button-fast-follow branch from 9ed6e2a to e67cfc7 Compare March 13, 2025 13:09
@rise-erpelding rise-erpelding dismissed their stale review March 14, 2025 16:23

Dismissing review so as not to block approval/merging from others while I'm out!

@castastrophe castastrophe added the fast-follows An issue or PR that quickly follows a release label Mar 20, 2025
@@ -27,5 +27,9 @@
--spectrum-infield-button-background-color-hover: var(--spectrum-gray-200);
--spectrum-infield-button-background-color-down: var(--spectrum-gray-200);
--spectrum-infield-button-background-color-key-focus: var(--spectrum-gray-200);

&:disabled {
--spectrum-infield-button-border-color: var(--spectrum-gray-300);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably could be set to disabled-border-color if we wanted. I think that's also gray-300.

@marissahuysentruyt marissahuysentruyt self-assigned this Apr 1, 2025
Rajdeep Chandra and others added 4 commits April 3, 2025 09:20
@marissahuysentruyt marissahuysentruyt force-pushed the rajdeep/infield-button-fast-follow branch from b0a6b06 to dd337f5 Compare April 3, 2025 15:30
@marissahuysentruyt
Copy link
Collaborator

TODO: run VRTs

@marissahuysentruyt marissahuysentruyt added the size-1 XS ~1-6hrs; nearly trivial, a few hours, could do more than one in a single day. label Apr 3, 2025
Copy link
Member

@cdransf cdransf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran through the validation steps and everything looks good! ✨

@marissahuysentruyt marissahuysentruyt added the do not merge A flag for a branch indicating it should not be merged. label Apr 3, 2025
@@ -131,7 +131,7 @@
}
}

&:not(.is-disabled).is-keyboardFocused {
&:not(.is-disabled).is-keyboardFocused:not(.spectrum-Stepper--quiet) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to ask about the keyboard focus state once more. Pausing review...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this block? When I remove it nothing seems to break or change. @marissahuysentruyt @Rajdeepc

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can double check.I thought I was having issues with the quiet variant, but I wonder if it was actually due to the mods I was trying to set instead...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aramos-adobe Thanks for catching this- I don't see anything broken with it removed again, so I yanked it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge A flag for a branch indicating it should not be merged. fast-follows An issue or PR that quickly follows a release size-1 XS ~1-6hrs; nearly trivial, a few hours, could do more than one in a single day.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants