Skip to content

feat(dial)!: migrate to use @adobe/spectrum-tokens #1971

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

Merged
merged 16 commits into from
Oct 13, 2023

Conversation

pfulton
Copy link
Collaborator

@pfulton pfulton commented Jun 26, 2023

Description

Migrates the Dial component to use @adobe/spectrum-tokens instead of the legacy "vars" packages.

This component does not have an updated spec file from design, nor does it have new tokens defined for it. This is a "DIY migration".

How and where has this been tested?

  • How this was tested:
  • Browser(s) and OS(s) this was tested with:

Screenshots

To-do list

  • If my change impacts other components, I have tested to make sure they don't break.
  • If my change impacts documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have tested these changes in Windows High Contrast mode.
  • I have updated any relevant storybook stories and templates.
  • If my change(s) include visual change(s), a designer has reviewed and approved those changes.
  • This pull request is ready to merge.

@pfulton pfulton added the do not merge A flag for a branch indicating it should not be merged. label Jun 26, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 26, 2023

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

@github-actions github-actions bot temporarily deployed to pull request June 26, 2023 14:46 Inactive
@pfulton pfulton force-pushed the pfulton/migration--dial branch from 450c803 to 823cf90 Compare August 31, 2023 20:10
@github-actions github-actions bot temporarily deployed to pull request August 31, 2023 20:17 Inactive
@pfulton pfulton force-pushed the pfulton/migration--dial branch from 823cf90 to 4882705 Compare September 6, 2023 18:04
@github-actions github-actions bot temporarily deployed to pull request September 6, 2023 18:11 Inactive
@pfulton pfulton force-pushed the pfulton/migration--dial branch from 4882705 to aa00c52 Compare September 11, 2023 14:41
@github-actions github-actions bot temporarily deployed to pull request September 11, 2023 14:48 Inactive
@pfulton pfulton force-pushed the pfulton/migration--dial branch from aa00c52 to beae7cc Compare September 11, 2023 20:31
@github-actions github-actions bot temporarily deployed to pull request September 11, 2023 20:36 Inactive
@pfulton pfulton force-pushed the pfulton/migration--dial branch from beae7cc to 9c13b6c Compare September 12, 2023 14:15
@github-actions github-actions bot temporarily deployed to pull request September 12, 2023 14:21 Inactive
@pfulton pfulton force-pushed the pfulton/migration--dial branch from 9c13b6c to 9b3e833 Compare September 15, 2023 20:48
@github-actions github-actions bot temporarily deployed to pull request September 15, 2023 20:55 Inactive
@pfulton pfulton force-pushed the pfulton/migration--dial branch from 9b3e833 to e981892 Compare September 20, 2023 18:18
@github-actions github-actions bot temporarily deployed to pull request September 20, 2023 18:23 Inactive
@pfulton pfulton marked this pull request as ready for review September 20, 2023 18:53
@pfulton pfulton requested review from jawinn and jenndiaz September 20, 2023 18:53
@pfulton pfulton removed the do not merge A flag for a branch indicating it should not be merged. label Sep 20, 2023
@github-actions github-actions bot temporarily deployed to pull request September 20, 2023 18:56 Inactive
@pfulton pfulton force-pushed the pfulton/migration--dial branch from 85d9b3f to 0cc89ee Compare September 20, 2023 19:00
@github-actions github-actions bot temporarily deployed to pull request September 20, 2023 19:06 Inactive
Copy link
Contributor

@jenndiaz jenndiaz left a comment

Choose a reason for hiding this comment

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

Couple of small questions and one issue with the custom token not being applied.

@github-actions github-actions bot temporarily deployed to pull request September 22, 2023 20:02 Inactive
@github-actions github-actions bot temporarily deployed to pull request September 22, 2023 20:20 Inactive
Copy link
Collaborator

@jawinn jawinn left a comment

Choose a reason for hiding this comment

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

This is looking pretty good.

My only questions are around focus and keyboard focus, which also apply to what is in prod. Right now there is no visible focus when tabbing to the dial. On the docs page, is-keyboardFocused is applied by the JS there, which does not trigger the .is-focused styles (the dark grey visible after click and drag). Rather than using .is-focused, should this be using :focus or :focus-visible? The docs currently are allowing focus on the handle with tabindex='0', which allows those pseudo classes to be activated.

I'm also wondering about disabled showing a hover background color. It does it that way in prod, but it seems odd because it makes it look interactive. And it doesn't seem to match how other components' disabled states behave.

@github-actions github-actions bot temporarily deployed to pull request September 26, 2023 15:34 Inactive
@github-actions github-actions bot temporarily deployed to pull request September 28, 2023 16:17 Inactive
@jenndiaz jenndiaz requested a review from jawinn September 28, 2023 17:41
@jawinn
Copy link
Collaborator

jawinn commented Sep 28, 2023

The updates for disabled and focus look great!

One thing I am noticing is that tab focus disappears for one stop as it appears to go from the handle to the range input itself. I'm not sure if we should put a tabindex="0" on the input without some sort of keyboard control behavior/guidelines associated with it? This might also be a good case for adding :focus-within to the existing focus styles, to at least keep the focus style when the input is focused. To have a single stop in the tab order, ideally we could use :focus-within and not have a tabindex on the handle at all, but I don't know if the browser support is enough to use it by default yet (can-i-use says 94.14% global support).

mdt2 pushed a commit that referenced this pull request Oct 11, 2023
Batch adding component-specific custom tokens from PRs #2164, #2168, #2185, #2175, #2188, and #1971
mdt2 pushed a commit that referenced this pull request Oct 11, 2023
Batch adding component-specific custom tokens from PRs #2164, #2168, #2185, #2175, #2188, and #1971
pfulton pushed a commit that referenced this pull request Oct 12, 2023
Batch adding component-specific custom tokens from PRs #2164, #2168, #2185, #2175, #2188, and #1971
@pfulton pfulton force-pushed the pfulton/migration--dial branch from 41996d3 to 942be55 Compare October 13, 2023 16:20
@pfulton pfulton added the run_vrt For use on PRs looking to kick off VRT label Oct 13, 2023
@github-actions github-actions bot temporarily deployed to pull request October 13, 2023 16:26 Inactive
@github-actions github-actions bot removed the run_vrt For use on PRs looking to kick off VRT label Oct 13, 2023
@pfulton pfulton merged commit f116b7e into main Oct 13, 2023
@pfulton pfulton deleted the pfulton/migration--dial branch October 13, 2023 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants