Skip to content

Commit

Permalink
feat(theme)!: spectrum-web-components now supports Spectrum 2 system (#…
Browse files Browse the repository at this point in the history
…4829)

- feat(styles): add Spectrum 2 styles
- feat(icons-workflow): add support for new Spectrum 2 icons (#4747)
- feat(icon): add support for Spectrum 2 icons (#4747)
- chore: remove pre-1.0.0 deprecations (#4828)
- feat(coach-indicator)!: remove 'variant' and 'static' attributes from coach-indicator (#4772)
- feat(split-button)!: remove split-button component (#4729)
- feat(banner)!: remove banner component (#4723)
- feat(badge)!: remove deprecated badge values (#4742)
- feat(quick-actions)!: remove sp-quick-actions (#4761)
- feat(popover)!: remove popover's dialog property (#4751)
- feat(thumbnail)!: remove thumbnail deprecated sizes (#4760)
- feat(progress-circle)!: remove progress-circle overBackground property (#4750)
- feat(action-button,action-group,action-menu,button,link,meter,progress-bar): remove deprecated 'static' references (#4818)
- feat(action-button)!: remove action-button variant property (#4741)
- feat(theme)!: remove 'theme' attribute from sp-theme (#4765)
- chore: make the spectrum-two theme fully functional (#4859)
- chore: add 1.0.0 migration guide (#4776)
  • Loading branch information
Rajdeepc authored Oct 30, 2024
1 parent 5c9ad4e commit 4d47368
Show file tree
Hide file tree
Showing 617 changed files with 57,354 additions and 23,278 deletions.
34 changes: 16 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ executors:
parameters:
current_golden_images_hash:
type: string
default: ef7c7c0e0b5827a2f5e95bf6aba539959453f5dc
default: 08de0cb86affdc8cec2cb320aa9899b07032fcf8
wireit_cache_name:
type: string
default: wireit
Expand Down Expand Up @@ -40,7 +40,7 @@ commands:
at: /
run-regressions:
parameters:
regression_theme:
regression_system:
type: string
regression_color:
type: string
Expand All @@ -52,9 +52,9 @@ commands:
- restore_cache:
name: Restore Golden Images Cache
keys:
- v2-golden-images-<< pipeline.parameters.current_golden_images_hash >>-<< parameters.regression_theme >>-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>-
- v2-golden-images-<< pipeline.parameters.current_golden_images_hash >>-<< parameters.regression_system >>-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>-
- v2-golden-images-<< pipeline.parameters.current_golden_images_hash >>-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>-
- v2-golden-images-main-<< parameters.regression_theme >>-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>-
- v2-golden-images-main-<< parameters.regression_system >>-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>-
- v2-golden-images-main-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>-
- run:
name: Count baseline images
Expand All @@ -63,7 +63,7 @@ commands:
when: always
name: VRT Run
command: |
yarn test:ci --config web-test-runner.config.vrt.js --group vrt-<< parameters.regression_theme >>-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>
yarn test:ci --config web-test-runner.config.vrt.js --group vrt-<< parameters.regression_system >>-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>
# store results and artifacts before rearranging things for the new cache.
- store_test_results:
path: /root/project/results/
Expand All @@ -85,15 +85,15 @@ commands:
name: Create review site
command: |
branch=$(git symbolic-ref --short HEAD)
node test/visual/review.js --branch=$branch --commit=<< pipeline.git.revision >> --system="<< parameters.regression_theme >> << parameters.regression_color >> << parameters.regression_scale >> << parameters.regression_dir >>"
node test/visual/review.js --branch=$branch --commit=<< pipeline.git.revision >> --system="<< parameters.regression_system >> << parameters.regression_color >> << parameters.regression_scale >> << parameters.regression_dir >>"
yarn rollup -c test/visual/rollup.config.js
- run:
when: on_fail
name: Publish review site
command: |
cp projects/documentation/content/favicon.ico test/visual
branch=$(git symbolic-ref --short HEAD)
hash=$(echo -n $branch-<< parameters.regression_theme >>-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >> | md5sum | cut -c 1-32)
hash=$(echo -n $branch-<< parameters.regression_system >>-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >> | md5sum | cut -c 1-32)
echo hash
yarn netlify deploy --alias=$hash --cwd test/visual
# move "updated" screenshot into the baseline directory before making the new cache
Expand All @@ -107,12 +107,12 @@ commands:
name: Build Golden Images Revision Cache
paths:
- test/visual/screenshots-baseline
key: v2-golden-images-{{ .Revision }}-<< parameters.regression_theme >>-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>-{{ epoch }}
key: v2-golden-images-{{ .Revision }}-<< parameters.regression_system >>-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>-{{ epoch }}
- save_cache:
name: Build Golden Images Branch Cache
paths:
- test/visual/screenshots-baseline
key: v2-golden-images-{{ .Branch }}-<< parameters.regression_theme >>-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>-{{ epoch }}
key: v2-golden-images-{{ .Branch }}-<< parameters.regression_system >>-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>-{{ epoch }}

jobs:
commitlint:
Expand Down Expand Up @@ -243,7 +243,6 @@ jobs:
keys:
- v2-golden-images-<< pipeline.parameters.current_golden_images_hash >>-hcm-
- v2-golden-images-main-hcm-
- v2-golden-images-main-spectrum-lightest-medium-ltr-
- run:
name: Count baseline images
command: find test/visual/screenshots-baseline -type f | wc -l > count_start.txt
Expand Down Expand Up @@ -305,7 +304,7 @@ jobs:
visual:
executor: node
parameters:
theme:
system:
type: string
color:
type: string
Expand All @@ -316,7 +315,7 @@ jobs:
steps:
- downstream
- run-regressions:
regression_theme: << parameters.theme >>
regression_system: << parameters.system >>
regression_color: << parameters.color >>
regression_scale: << parameters.scale >>
regression_dir: << parameters.dir >>
Expand Down Expand Up @@ -349,23 +348,22 @@ workflows:
# Beta docs are only published from main
only: main
- visual:
name: << matrix.theme >>-<< matrix.color >>-<< matrix.scale >>-<< matrix.dir >>
name: << matrix.system >>-<< matrix.color >>-<< matrix.scale >>-<< matrix.dir >>
matrix:
parameters:
theme: [spectrum, express]
color: [lightest, light, dark, darkest]
system: [spectrum, express]
color: [light, dark]
scale: [medium, large]
dir: [ltr, rtl]
filters:
branches:
# Forked pull requests have CIRCLE_BRANCH set to pull/XXX
ignore: /pull\/[0-9]+/
- visual:
name: << matrix.theme >>-<< matrix.color >>-<< matrix.scale >>-<< matrix.dir >>
name: << matrix.system >>-<< matrix.color >>-<< matrix.scale >>-<< matrix.dir >>
matrix:
parameters:
# Spectrum-two doesn't support the lightest and darkest themes
theme: [spectrum-two]
system: [spectrum-two]
color: [light, dark]
scale: [medium, large]
dir: [ltr, rtl]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node 18
- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/setup-node@v4
with:
cache: yarn
node-version: 18
node-version: 20
- name: Install dependencies
run: yarn install --frozen-lockfile
# README: https://github.com/castastrophe/actions-pr-auto-update#auto-update-pull-requests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/rc-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: RC Release

on:
push:
branches:
- feature/SWC-1.0-RC

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Set Git identity
run: |
git config --global user.email "[email protected]"
git config --global user.name "github-actions-bot"
- name: Get latest published 1.0.0-rc version
id: get_latest_published_rc
run: |
LATEST_RC_VERSION=$(npm view @spectrum-web-components/button@rc version || echo "none")
echo "latest_rc_version=$LATEST_RC_VERSION" >> $GITHUB_OUTPUT
- name: Calculate next rc version
id: calculate_next_rc_version
run: |
BASE_VERSION="1.0.0"
LATEST_RC_VERSION="${{ steps.get_latest_published_rc.outputs.latest_rc_version }}"
if [ "$LATEST_RC_VERSION" == "none" ]; then
RC_VERSION="$BASE_VERSION-rc.0"
else
CURRENT_RC_NUMBER=$(echo "$LATEST_RC_VERSION" | sed 's/.*-rc\.\([0-9]\+\)/\1/')
NEXT_RC_NUMBER=$((CURRENT_RC_NUMBER + 1))
RC_VERSION="$BASE_VERSION-rc.$NEXT_RC_NUMBER"
fi
echo "rc_version=$RC_VERSION" >> $GITHUB_OUTPUT
- name: Update package versions for rc release
run: |
npx lerna version "${{ steps.calculate_next_rc_version.outputs.rc_version }}" --no-git-tag-version --no-push --yes
- name: Configure NPM for Lerna publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish 1.0.0 rc release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
git commit -am "chore: publish rc version ${{ steps.calculate_next_rc_version.outputs.rc_version }}"
npx lerna publish from-package --dist-tag rc --no-git-tag-version --no-push --yes
2 changes: 1 addition & 1 deletion .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:

- uses: actions/checkout@v4

- name: Setup Node 18
- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

Expand All @@ -48,10 +48,10 @@ jobs:

- uses: actions/checkout@v4

- name: Setup Node 18
- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

Expand Down Expand Up @@ -100,10 +100,10 @@ jobs:

- uses: actions/checkout@v4

- name: Setup Node 18
- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

Expand Down Expand Up @@ -141,10 +141,10 @@ jobs:

- uses: actions/checkout@v4

- name: Setup Node 18
- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

Expand Down Expand Up @@ -181,10 +181,10 @@ jobs:

- uses: actions/checkout@v4

- name: Setup Node 18
- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ lib
# build artifacts
custom-elements.json

!packages/icons-workflow/bin/build.js
!packages/icons-workflow/src/DefaultIcon.ts

packages/*/src/**/*.css.js
packages/*/custom-elements.json
packages/**/*.js
Expand Down
6 changes: 5 additions & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
"length-zero-no-unit": [true, { "ignore": "custom-properties" }],
"selector-type-no-unknown": [true, { "ignore": ["custom-elements"] }],
"selector-pseudo-element-colon-notation": ["single", {}],
"custom-property-pattern": "^_?([a-z][a-z0-9]*)(-[a-z0-9]+)*$"
"custom-property-pattern": "^_?([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
"no-duplicate-selectors": null,
"selector-class-pattern": null,
"no-descending-specificity": null,
"declaration-block-no-redundant-longhand-properties": null
},
"overrides": [
{
Expand Down
4 changes: 0 additions & 4 deletions INVENTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ and [Spectrum Web Components](https://opensource.adobe.com/spectrum-web-componen
| assetlist || [📄](https://opensource.adobe.com/spectrum-css/assetlist.html) ||
| avatar || [📄](https://opensource.adobe.com/spectrum-css/avatar.html) | [📄](https://opensource.adobe.com/spectrum-web-components/components/avatar) |
| badge || [📄](https://opensource.adobe.com/spectrum-css/badge.html) | [📄](https://opensource.adobe.com/spectrum-web-components/components/badge) |
| banner | | | [📄](https://opensource.adobe.com/spectrum-web-components/components/banner) |
| body || | |
| bottomnavigation || | |
| breadcrumb || [📄](https://opensource.adobe.com/spectrum-css/breadcrumb.html) ||
Expand Down Expand Up @@ -74,8 +73,6 @@ and [Spectrum Web Components](https://opensource.adobe.com/spectrum-web-componen
| popover || [📄](https://opensource.adobe.com/spectrum-css/popover.html) | [📄](https://opensource.adobe.com/spectrum-web-components/components/popover) |
| progressbar || [📄](https://opensource.adobe.com/spectrum-css/progressbar.html) | [📄](https://opensource.adobe.com/spectrum-web-components/components/progress-bar) |
| progresscircle || [📄](https://opensource.adobe.com/spectrum-css/progresscircle.html) | [📄](https://opensource.adobe.com/spectrum-web-components/components/progress-circle) |
| quickaction | | [📄](https://opensource.adobe.com/spectrum-css/quickaction.html) | [📄](https://opensource.adobe.com/spectrum-web-components/components/quick-actions) |
| quickactions || | |
| radio || [📄](https://opensource.adobe.com/spectrum-css/radio.html) | [📄](https://opensource.adobe.com/spectrum-web-components/components/radio) |
| radiogroup || | |
| rating || [📄](https://opensource.adobe.com/spectrum-css/rating.html) ||
Expand All @@ -84,7 +81,6 @@ and [Spectrum Web Components](https://opensource.adobe.com/spectrum-web-componen
| searchwithin || [📄](https://opensource.adobe.com/spectrum-css/searchwithin.html) ||
| sidenav || [📄](https://opensource.adobe.com/spectrum-css/sidenav.html) | [📄](https://opensource.adobe.com/spectrum-web-components/components/sidenav) |
| slider || [📄](https://opensource.adobe.com/spectrum-css/slider.html) | [📄](https://opensource.adobe.com/spectrum-web-components/components/slider) |
| splitbutton || [📄](https://opensource.adobe.com/spectrum-css/splitbutton.html) | [📄](https://opensource.adobe.com/spectrum-web-components/components/split-button) |
| splitview | | [📄](https://opensource.adobe.com/spectrum-css/splitview.html) | [📄](https://opensource.adobe.com/spectrum-web-components/components/split-view) |
| statuslight || [📄](https://opensource.adobe.com/spectrum-css/statuslight.html) | [📄](https://opensource.adobe.com/spectrum-web-components/components/status-light) |
| steplist || [📄](https://opensource.adobe.com/spectrum-css/steplist.html) ||
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ To this end, Spectrum Web Components only targets _modern_, evergreen browsers t

# Requirements

- NodeJS >= 18.17.0
- NodeJS >= 20.0.0
- Typescript
- Supported desktop browsers:
- Last 2 versions of Chrome
Expand Down
Loading

0 comments on commit 4d47368

Please sign in to comment.