Skip to content

Conversation

iuliauta
Copy link

@iuliauta iuliauta commented Sep 16, 2025

Description

Picker border color should be hidden in S2 theme

Motivation and context

Fix the regressions found after changing from the express theme to the spectrum-two theme.

Related issue(s)

  • fixes SWC-1074
  • CCEX-230904

Screenshots (if appropriate)

Spectrum 2
Screenshot 2025-09-16 at 16 16 53

Spectrum 1
Screenshot 2025-09-16 at 16 17 13

Express
Screenshot 2025-09-16 at 16 17 30


Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • Descriptive Test Statement

    1. Go picker component
    2. Select Spectrum 2 theme.
    3. Observe that the picker component do not have any borders anymore (the same as the Express theme).

Device review

  • Did it pass in Desktop?
  • Did it pass in (emulated) Mobile?
  • Did it pass in (emulated) iPad?

Copy link

changeset-bot bot commented Sep 16, 2025

🦋 Changeset detected

Latest commit: 55e8216

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

This PR includes changesets to release 84 packages
Name Type
@spectrum-web-components/picker Patch
@spectrum-web-components/action-menu Patch
@spectrum-web-components/custom-vars-viewer Patch
example-project-rollup Patch
example-project-webpack Patch
@spectrum-web-components/story-decorator Patch
@spectrum-web-components/bundle Patch
@spectrum-web-components/breadcrumbs Patch
documentation Patch
@spectrum-web-components/eslint-plugin Patch
@spectrum-web-components/accordion Patch
@spectrum-web-components/action-bar Patch
@spectrum-web-components/action-button Patch
@spectrum-web-components/action-group Patch
@spectrum-web-components/alert-banner Patch
@spectrum-web-components/alert-dialog Patch
@spectrum-web-components/asset Patch
@spectrum-web-components/avatar Patch
@spectrum-web-components/badge Patch
@spectrum-web-components/button-group Patch
@spectrum-web-components/button Patch
@spectrum-web-components/card Patch
@spectrum-web-components/checkbox Patch
@spectrum-web-components/clear-button Patch
@spectrum-web-components/close-button Patch
@spectrum-web-components/coachmark Patch
@spectrum-web-components/color-area Patch
@spectrum-web-components/color-field Patch
@spectrum-web-components/color-handle Patch
@spectrum-web-components/color-loupe Patch
@spectrum-web-components/color-slider Patch
@spectrum-web-components/color-wheel Patch
@spectrum-web-components/combobox Patch
@spectrum-web-components/contextual-help Patch
@spectrum-web-components/dialog Patch
@spectrum-web-components/divider Patch
@spectrum-web-components/dropzone Patch
@spectrum-web-components/field-group Patch
@spectrum-web-components/field-label Patch
@spectrum-web-components/help-text Patch
@spectrum-web-components/icon Patch
@spectrum-web-components/icons-ui Patch
@spectrum-web-components/icons-workflow Patch
@spectrum-web-components/icons Patch
@spectrum-web-components/iconset Patch
@spectrum-web-components/illustrated-message Patch
@spectrum-web-components/infield-button Patch
@spectrum-web-components/link Patch
@spectrum-web-components/menu Patch
@spectrum-web-components/meter Patch
@spectrum-web-components/modal Patch
@spectrum-web-components/number-field Patch
@spectrum-web-components/overlay Patch
@spectrum-web-components/picker-button Patch
@spectrum-web-components/popover Patch
@spectrum-web-components/progress-bar Patch
@spectrum-web-components/progress-circle Patch
@spectrum-web-components/radio Patch
@spectrum-web-components/search Patch
@spectrum-web-components/sidenav Patch
@spectrum-web-components/slider Patch
@spectrum-web-components/split-view Patch
@spectrum-web-components/status-light Patch
@spectrum-web-components/swatch Patch
@spectrum-web-components/switch Patch
@spectrum-web-components/table Patch
@spectrum-web-components/tabs Patch
@spectrum-web-components/tags Patch
@spectrum-web-components/textfield Patch
@spectrum-web-components/thumbnail Patch
@spectrum-web-components/toast Patch
@spectrum-web-components/tooltip Patch
@spectrum-web-components/top-nav Patch
@spectrum-web-components/tray Patch
@spectrum-web-components/underlay Patch
@spectrum-web-components/vrt-compare Patch
@spectrum-web-components/base Patch
@spectrum-web-components/grid Patch
@spectrum-web-components/opacity-checkerboard Patch
@spectrum-web-components/reactive-controllers Patch
@spectrum-web-components/shared Patch
@spectrum-web-components/styles Patch
@spectrum-web-components/theme Patch
@spectrum-web-components/truncated 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 Sep 16, 2025

📚 Branch Preview

🔍 Visual Regression Test Results

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

Deployed to Azure Blob Storage: pr-5733

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.

Copy link
Contributor

Tachometer results

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

@iuliauta iuliauta marked this pull request as ready for review September 17, 2025 07:37
@iuliauta iuliauta requested a review from a team as a code owner September 17, 2025 07:37
current_golden_images_hash:
type: string
default: 5cb7586aae24a30d566d452d4e0b3c934fe3b9f0
default: 545766d1fd28704c1920e13b3fb8bf24f9c7dbba
Copy link
Contributor

Choose a reason for hiding this comment

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

We usually update the hash once the PR is approved to make sure we are not overriding any unintended visual changes to main

Copy link
Author

Choose a reason for hiding this comment

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

Did not know, sorry! I reverted it right now, thank you!

--system-picker-border-color-key-focus: transparent;
--system-picker-border-color-disabled: transparent;
--system-picker-border-width: 0px;
--system-picker-border-width: var(--spectrum-border-width-100);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I was also noticing that the label text was positioned further up within the picker before, so reverting back to border-width-100 also solves that issue!

But I'm wondering if this border-width is desired for the invalid variant, or do we want to adjust maybe to border-width-200?
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

@iuliauta definitely knows best, but the border-width-200 is in the specs for picker in S2. This suggestion makes sense to me!

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it seems that I should use --system-picker-border-width: var(--spectrum-border-width-200); for s2. I will update it, thank you for all the details, I was not aware of the label positioning, but it is good information for me.

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.

Thanks @iuliauta, this looks great!

One thing I want to call out that I think is out of scope for this work, is that there's a diff in the VRTs for the position of the text (just for L, it looks like), where there's more spacing above the text where we increased the border width, so it sits lower within the Picker.

image

I'm wondering if part of the issue is that we're not calculating the border-width out of the spacing like we do with button, for instance doing something like:

--spectrum-picker-spacing-edge-to-text: calc(var(--spectrum-component-edge-to-text-100) - var(--spectrum-picker-border-width));

This would help keep the spacing consistent even if the border width changes.

All of that said though, since the fix would need to happen outside of the theme files, I think it's out of scope, but I wanted to explain what I think might be happening here.

@iuliauta
Copy link
Author

  • Spectrum | Light | Medium | LTR

Thanks @iuliauta, this looks great!

One thing I want to call out that I think is out of scope for this work, is that there's a diff in the VRTs for the position of the text (just for L, it looks like), where there's more spacing above the text where we increased the border width, so it sits lower within the Picker.

image I'm wondering if part of the issue is that we're not calculating the border-width out of the spacing like we do with [button](https://github.com/adobe/spectrum-web-components/blob/main/packages/button/src/spectrum-button.css#L76), for instance doing something like:
--spectrum-picker-spacing-edge-to-text: calc(var(--spectrum-component-edge-to-text-100) - var(--spectrum-picker-border-width));

This would help keep the spacing consistent even if the border width changes.

All of that said though, since the fix would need to happen outside of the theme files, I think it's out of scope, but I wanted to explain what I think might be happening here.

Thank you for pointing it out! I tried to see how this change will influence the themes and it seems that it impacts spectrum-1 theme and I suggest to address this improvement in another PR, unrelated to CSS themes PRs (as you already mentioned in your message).

@rise-erpelding rise-erpelding added ready-for-merge Will auto-update until merged and removed ready-for-review labels Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Picker ready-for-merge Will auto-update until merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants