Skip to content

Conversation

@bernhard-adobe
Copy link
Contributor

@bernhard-adobe bernhard-adobe commented Sep 1, 2022

Adds a beta version of the new Switch component.

Uses beta release, hold for full release.

Description

Related issue(s)

CSS JIra. https://jira.corp.adobe.com/browse/CSS-100 Implement%20Switch%20Core%20Tokens
CSS-100) #1496

adobe/spectrum-css#1496 feat(switch)!: migrating switch to core-tokens (CSS-42, CSS-100) #1496

Motivation and context

Core Tokens migration in Spectrum CSS.
Also breaking change as we are adding t-shirt sizing as well.
Screen Shot 2022-09-08 at 23 05 55
Screen Shot 2022-09-08 at 23 05 10

How has this been tested?

  • Test case 1
    1. Go here
    2. Do this
  • Test case 2
    1. Go here
    2. Do this

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Checklist

  • I have signed the Adobe Open Source CLA.
  • 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.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices

Best practices

This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against main.

@Westbrook Westbrook marked this pull request as draft September 1, 2022 20:59
@Westbrook
Copy link
Contributor

From these VRTs: https://ccaa0f962774b405b6b634e0a9dc979c--spectrum-web-components.netlify.app/review/ this either is expecting a newer version of the Tokens package or some update HTML. Can you clarify @bernhard-adobe?

The branch is also out of date and might not have the latest versions from main if it is expecting a non-beta version of the Tokens package.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2022

Tachometer results

Chrome

action-bar permalink

Version Bytes Avg Time vs remote vs branch
npm latest 233 kB 54.02ms - 55.73ms - unsure 🔍
-2% - +2%
-0.86ms - +1.24ms
branch 234 kB 54.08ms - 55.29ms unsure 🔍
-2% - +2%
-1.24ms - +0.86ms
-

action-menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 595 kB 347.10ms - 352.36ms - unsure 🔍
-2% - +0%
-6.70ms - +1.00ms
branch 597 kB 349.77ms - 355.39ms unsure 🔍
-0% - +2%
-1.00ms - +6.70ms
-

card permalink

Version Bytes Avg Time vs remote vs branch
npm latest 379 kB 149.36ms - 155.17ms - unsure 🔍
-2% - +2%
-3.65ms - +3.32ms
branch 381 kB 150.52ms - 154.35ms unsure 🔍
-2% - +2%
-3.32ms - +3.65ms
-

illustrated-message permalink

Version Bytes Avg Time vs remote vs branch
npm latest 282 kB 73.75ms - 76.76ms - unsure 🔍
-0% - +5%
-0.18ms - +3.35ms
branch 283 kB 72.74ms - 74.60ms unsure 🔍
-4% - +0%
-3.35ms - +0.18ms
-

menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 297 kB 399.41ms - 405.74ms - unsure 🔍
-2% - +0%
-8.91ms - +1.12ms
branch 299 kB 402.58ms - 410.36ms unsure 🔍
-0% - +2%
-1.12ms - +8.91ms
-

overlay permalink

Version Bytes Avg Time vs remote vs branch
npm latest 336 kB 124.29ms - 127.16ms - unsure 🔍
-1% - +2%
-1.47ms - +3.09ms
branch 337 kB 123.14ms - 126.69ms unsure 🔍
-2% - +1%
-3.09ms - +1.47ms
-

picker permalink

Version Bytes Avg Time vs remote vs branch
npm latest 442 kB 1218.08ms - 1249.87ms - unsure 🔍
-2% - +1%
-30.90ms - +12.76ms
branch 443 kB 1228.09ms - 1258.00ms unsure 🔍
-1% - +3%
-12.76ms - +30.90ms
-

popover permalink

Version Bytes Avg Time vs remote vs branch
npm latest 230 kB 51.83ms - 53.25ms - unsure 🔍
-2% - +2%
-1.07ms - +1.09ms
branch 231 kB 51.71ms - 53.34ms unsure 🔍
-2% - +2%
-1.09ms - +1.07ms
-

slider permalink

Version Bytes Avg Time vs remote vs branch
npm latest 330 kB 231.20ms - 234.54ms - unsure 🔍
-1% - +1%
-2.62ms - +2.46ms
branch 331 kB 231.04ms - 234.86ms unsure 🔍
-1% - +1%
-2.46ms - +2.62ms
-

split-button permalink

Version Bytes Avg Time vs remote vs branch
npm latest 534 kB 1976.77ms - 1980.66ms - unsure 🔍
-0% - -0%
-7.34ms - -0.65ms
branch 535 kB 1979.98ms - 1985.43ms unsure 🔍
+0% - +0%
+0.65ms - +7.34ms
-

switch permalink

Version Bytes Avg Time vs remote vs branch
npm latest 246 kB 58.45ms - 59.58ms - faster ✔
4% - 7%
2.23ms - 4.31ms
branch 253 kB 61.41ms - 63.16ms slower ❌
4% - 7%
2.23ms - 4.31ms
-

tooltip permalink

Version Bytes Avg Time vs remote vs branch
npm latest 236 kB 57.63ms - 59.53ms - unsure 🔍
-4% - +3%
-2.09ms - +1.57ms
branch 237 kB 57.28ms - 60.40ms unsure 🔍
-3% - +4%
-1.57ms - +2.09ms
-
Firefox

action-bar permalink

Version Bytes Avg Time vs remote vs branch
npm latest 233 kB 127.83ms - 139.05ms - unsure 🔍
-5% - +7%
-7.11ms - +8.79ms
branch 234 kB 126.96ms - 138.24ms unsure 🔍
-7% - +5%
-8.79ms - +7.11ms
-

action-menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 595 kB 442.61ms - 456.39ms - faster ✔
0% - 5%
1.67ms - 21.13ms
branch 597 kB 454.04ms - 467.76ms slower ❌
0% - 5%
1.67ms - 21.13ms
-

card permalink

Version Bytes Avg Time vs remote vs branch
npm latest 379 kB 205.75ms - 216.61ms - unsure 🔍
-7% - +1%
-15.29ms - +2.97ms
branch 381 kB 210.00ms - 224.68ms unsure 🔍
-1% - +7%
-2.97ms - +15.29ms
-

illustrated-message permalink

Version Bytes Avg Time vs remote vs branch
npm latest 282 kB 105.18ms - 117.02ms - unsure 🔍
-9% - +6%
-10.34ms - +7.18ms
branch 283 kB 106.23ms - 119.13ms unsure 🔍
-7% - +9%
-7.18ms - +10.34ms
-

menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 297 kB 587.66ms - 608.02ms - unsure 🔍
-2% - +3%
-10.29ms - +16.97ms
branch 299 kB 585.44ms - 603.56ms unsure 🔍
-3% - +2%
-16.97ms - +10.29ms
-

overlay permalink

Version Bytes Avg Time vs remote vs branch
npm latest 336 kB 193.71ms - 206.25ms - unsure 🔍
-5% - +4%
-9.25ms - +8.85ms
branch 337 kB 193.65ms - 206.71ms unsure 🔍
-4% - +5%
-8.85ms - +9.25ms
-

picker permalink

Version Bytes Avg Time vs remote vs branch
npm latest 442 kB 1221.14ms - 1252.46ms - unsure 🔍
-2% - +2%
-25.36ms - +19.12ms
branch 443 kB 1224.13ms - 1255.71ms unsure 🔍
-2% - +2%
-19.12ms - +25.36ms
-

popover permalink

Version Bytes Avg Time vs remote vs branch
npm latest 230 kB 111.98ms - 126.90ms - unsure 🔍
-15% - +1%
-19.83ms - +1.87ms
branch 231 kB 120.54ms - 136.30ms unsure 🔍
-2% - +17%
-1.87ms - +19.83ms
-

slider permalink

Version Bytes Avg Time vs remote vs branch
npm latest 330 kB 385.31ms - 396.73ms - unsure 🔍
-3% - +1%
-12.13ms - +5.81ms
branch 331 kB 387.26ms - 401.10ms unsure 🔍
-1% - +3%
-5.81ms - +12.13ms
-

split-button permalink

Version Bytes Avg Time vs remote vs branch
npm latest 534 kB 2111.36ms - 2125.32ms - unsure 🔍
-1% - +0%
-11.20ms - +7.60ms
branch 535 kB 2113.85ms - 2126.43ms unsure 🔍
-0% - +1%
-7.60ms - +11.20ms
-

switch permalink

Version Bytes Avg Time vs remote vs branch
npm latest 246 kB 119.67ms - 130.85ms - faster ✔
1% - 11%
0.84ms - 15.16ms
branch 253 kB 128.79ms - 137.73ms slower ❌
0% - 12%
0.84ms - 15.16ms
-

tooltip permalink

Version Bytes Avg Time vs remote vs branch
npm latest 236 kB 89.81ms - 100.99ms - unsure 🔍
-12% - +4%
-12.19ms - +4.15ms
branch 237 kB 93.46ms - 105.38ms unsure 🔍
-5% - +13%
-4.15ms - +12.19ms
-

@bernhard-adobe
Copy link
Contributor Author

From these VRTs: https://ccaa0f962774b405b6b634e0a9dc979c--spectrum-web-components.netlify.app/review/ this either is expecting a newer version of the Tokens package or some update HTML. Can you clarify @bernhard-adobe?

The branch is also out of date and might not have the latest versions from main if it is expecting a non-beta version of the Tokens package.

Thanks @Westbrook . We made HTML changes and I will update the docs accordingly. We now offer t-shirt sizing for Switch and I think that requires the updates.
I will also pull in the latest tokens package through that one should make a difference.

@Westbrook
Copy link
Contributor

Starting to look good here @bernhard-adobe!

Can you add documentation for the t-shirt sizing, a la: https://github.com/adobe/spectrum-web-components/pull/2471/files#diff-8bae4c0fc7a00665c41e46959ef1459db31ef40dee44e9a6587a08ac118f6832 and update the stories to exhibit the t-shirt sizes singularly, a la: https://github.com/adobe/spectrum-web-components/pull/2471/files#diff-81d397bcd494c209576bbcaa66ee5243b133b827d13498a23e4ac52555bf74cd then we should be good to update the new Golden Images Cache and, baring a full release at the CSS level, ship this!

@bernhard-adobe
Copy link
Contributor Author

Starting to look good here @bernhard-adobe!

Can you add documentation for the t-shirt sizing, a la: https://github.com/adobe/spectrum-web-components/pull/2471/files#diff-8bae4c0fc7a00665c41e46959ef1459db31ef40dee44e9a6587a08ac118f6832 and update the stories to exhibit the t-shirt sizes singularly, a la: https://github.com/adobe/spectrum-web-components/pull/2471/files#diff-81d397bcd494c209576bbcaa66ee5243b133b827d13498a23e4ac52555bf74cd then we should be good to update the new Golden Images Cache and, baring a full release at the CSS level, ship this!

Makes sense! I added the t-shirt sizing
Screen Shot 2022-09-12 at 23 58 26
as it's own story.

Copy link
Contributor

@Westbrook Westbrook left a comment

Choose a reason for hiding this comment

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

Those two missed lines and the stable release and this is looking great! Thanks @bernhard-adobe

@bernhard-adobe
Copy link
Contributor Author

@Westbrook I committed your suggested changes.
Do I need to manually kick off any of the CI rules? https://github.com/adobe/spectrum-web-components#keeping-ci-assets-updated

@Westbrook
Copy link
Contributor

For the VRT updates, you can checkout https://vrt--spectrum-web-components.netlify.app/bschmidt/switch-core-tokens to ensure that things are looking as expected across all of the themes, etc. If so, grab the has in the third Side Nav Item there and update it following the instructions you linked and CI should start to pass.

@bernhard-adobe
Copy link
Contributor Author

For the VRT updates, you can checkout https://vrt--spectrum-web-components.netlify.app/bschmidt/switch-core-tokens to ensure that things are looking as expected across all of the themes, etc. If so, grab the has in the third Side Nav Item there and update it following the instructions you linked and CI should start to pass.

Wow that is awesome, you are doing very well in VRT things.
Looks good to me, we now have tiny to giant Switch :)
Screen Shot 2022-09-13 at 14 15 52

pfulton
pfulton previously approved these changes Sep 16, 2022
Copy link
Collaborator

@pfulton pfulton left a comment

Choose a reason for hiding this comment

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

Looks good to me, @bernhard-adobe! Thanks for taking care of this and seeing it through.

},
"devDependencies": {
"@spectrum-css/switch": "^1.0.23"
"@spectrum-css/switch": "^2.0.0-beta.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

With this approved, does that mean you'll move to a stable release here? @pfulton

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, that's correct @Westbrook. I just merged and released, and we're now at @spectrum-css/switch@2.0.0

@Westbrook Westbrook force-pushed the bschmidt/switch-core-tokens branch from 317b849 to 522a9ed Compare September 16, 2022 14:35
@Westbrook Westbrook force-pushed the bschmidt/switch-core-tokens branch from 522a9ed to d79be7e Compare September 16, 2022 14:40
@Westbrook Westbrook marked this pull request as ready for review September 16, 2022 14:41
- adding switch t-shirt size support
- documenting switch t-shirt sizing
@Westbrook Westbrook force-pushed the bschmidt/switch-core-tokens branch from d79be7e to 0272c09 Compare September 16, 2022 14:52
@Westbrook Westbrook force-pushed the bschmidt/switch-core-tokens branch from ca4b99d to d29b5eb Compare September 16, 2022 15:08
Copy link
Contributor

@Westbrook Westbrook left a comment

Choose a reason for hiding this comment

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

LGTM! Caught one work around internally that obsolesced and bumped the golden images, so we're good to go.

@bernhard-adobe thanks for diving so deep on this. You really grabbed onto some lower level pieces bringing this together! 🙏🏼 When you have time, I'd love to hear if there were any places you saw where we could make the contribution process easier/clearer.

@Westbrook Westbrook merged commit a03dd85 into main Sep 16, 2022
@Westbrook Westbrook deleted the bschmidt/switch-core-tokens branch September 16, 2022 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants