From 796372ee8432ed731e3a49405b153ef05c41a8b3 Mon Sep 17 00:00:00 2001 From: Eliza Khachatryan Date: Tue, 14 May 2024 13:07:07 -0700 Subject: [PATCH 01/10] fix(block): update text hierarchy and spacing (#9329) **Related Issue:** #9323 ## Summary Update `block`'s padding. --- packages/calcite-components/src/components/block/block.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/calcite-components/src/components/block/block.scss b/packages/calcite-components/src/components/block/block.scss index f98e933fdc9..4de07e9741d 100644 --- a/packages/calcite-components/src/components/block/block.scss +++ b/packages/calcite-components/src/components/block/block.scss @@ -140,8 +140,8 @@ calcite-handle { .content { @apply animate-in flex-1 relative min-h-0; - padding-block: var(--calcite-block-padding, theme("spacing.2")); - padding-inline: var(--calcite-block-padding, theme("spacing[2.5]")); + padding-block: var(--calcite-block-padding, var(--calcite-spacing-sm)); + padding-inline: var(--calcite-block-padding, var(--calcite-spacing-md)); } .control-container { From d5eb77931ffebaf53b9475a31b58786abb51b968 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 May 2024 20:08:41 +0000 Subject: [PATCH 02/10] chore: release next --- package-lock.json | 10 +++++----- .../projects/component-library/CHANGELOG.md | 4 ++++ .../projects/component-library/package.json | 4 ++-- packages/calcite-components-react/CHANGELOG.md | 4 ++++ packages/calcite-components-react/package.json | 4 ++-- packages/calcite-components/CHANGELOG.md | 6 ++++++ packages/calcite-components/package.json | 2 +- 7 files changed, 24 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9bb97ecd4b8..ac0374c0146 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36696,7 +36696,7 @@ }, "packages/calcite-components": { "name": "@esri/calcite-components", - "version": "2.9.0-next.7", + "version": "2.9.0-next.8", "license": "SEE LICENSE.md", "dependencies": { "@floating-ui/dom": "1.6.4", @@ -38395,10 +38395,10 @@ }, "packages/calcite-components-angular/projects/component-library": { "name": "@esri/calcite-components-angular", - "version": "2.9.0-next.7", + "version": "2.9.0-next.8", "license": "SEE LICENSE.md", "dependencies": { - "@esri/calcite-components": "^2.9.0-next.7", + "@esri/calcite-components": "^2.9.0-next.8", "tslib": "2.6.2" }, "peerDependencies": { @@ -38408,10 +38408,10 @@ }, "packages/calcite-components-react": { "name": "@esri/calcite-components-react", - "version": "2.9.0-next.7", + "version": "2.9.0-next.8", "license": "SEE LICENSE.md", "dependencies": { - "@esri/calcite-components": "^2.9.0-next.7" + "@esri/calcite-components": "^2.9.0-next.8" }, "peerDependencies": { "react": ">=16.7", diff --git a/packages/calcite-components-angular/projects/component-library/CHANGELOG.md b/packages/calcite-components-angular/projects/component-library/CHANGELOG.md index 68a0ae2c630..17eccf23817 100644 --- a/packages/calcite-components-angular/projects/component-library/CHANGELOG.md +++ b/packages/calcite-components-angular/projects/component-library/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.9.0-next.8](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-angular@2.9.0-next.7...@esri/calcite-components-angular@2.9.0-next.8) (2024-05-14) + +**Note:** Version bump only for package @esri/calcite-components-angular + ## [2.9.0-next.7](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-angular@2.9.0-next.6...@esri/calcite-components-angular@2.9.0-next.7) (2024-05-14) **Note:** Version bump only for package @esri/calcite-components-angular diff --git a/packages/calcite-components-angular/projects/component-library/package.json b/packages/calcite-components-angular/projects/component-library/package.json index f32fdcc0d0f..6cd466ca3e5 100644 --- a/packages/calcite-components-angular/projects/component-library/package.json +++ b/packages/calcite-components-angular/projects/component-library/package.json @@ -1,6 +1,6 @@ { "name": "@esri/calcite-components-angular", - "version": "2.9.0-next.7", + "version": "2.9.0-next.8", "sideEffects": false, "homepage": "https://developers.arcgis.com/calcite-design-system/", "description": "A set of Angular components that wrap Esri's Calcite Components.", @@ -20,7 +20,7 @@ "@angular/core": ">=16.0.0" }, "dependencies": { - "@esri/calcite-components": "^2.9.0-next.7", + "@esri/calcite-components": "^2.9.0-next.8", "tslib": "2.6.2" }, "lerna": { diff --git a/packages/calcite-components-react/CHANGELOG.md b/packages/calcite-components-react/CHANGELOG.md index 4a1c2368d03..507d660f6ae 100644 --- a/packages/calcite-components-react/CHANGELOG.md +++ b/packages/calcite-components-react/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.9.0-next.8](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@2.9.0-next.7...@esri/calcite-components-react@2.9.0-next.8) (2024-05-14) + +**Note:** Version bump only for package @esri/calcite-components-react + ## [2.9.0-next.7](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@2.9.0-next.6...@esri/calcite-components-react@2.9.0-next.7) (2024-05-14) **Note:** Version bump only for package @esri/calcite-components-react diff --git a/packages/calcite-components-react/package.json b/packages/calcite-components-react/package.json index abff2d758ed..6133f381db4 100644 --- a/packages/calcite-components-react/package.json +++ b/packages/calcite-components-react/package.json @@ -1,7 +1,7 @@ { "name": "@esri/calcite-components-react", "sideEffects": false, - "version": "2.9.0-next.7", + "version": "2.9.0-next.8", "homepage": "https://developers.arcgis.com/calcite-design-system/", "description": "A set of React components that wrap calcite components", "license": "SEE LICENSE.md", @@ -23,7 +23,7 @@ "dist/" ], "dependencies": { - "@esri/calcite-components": "^2.9.0-next.7" + "@esri/calcite-components": "^2.9.0-next.8" }, "peerDependencies": { "react": ">=16.7", diff --git a/packages/calcite-components/CHANGELOG.md b/packages/calcite-components/CHANGELOG.md index 6133788ebb2..e750458618d 100644 --- a/packages/calcite-components/CHANGELOG.md +++ b/packages/calcite-components/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.9.0-next.8](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@2.9.0-next.7...@esri/calcite-components@2.9.0-next.8) (2024-05-14) + +### Bug Fixes + +- **block:** update text hierarchy and spacing ([#9329](https://github.com/Esri/calcite-design-system/issues/9329)) ([796372e](https://github.com/Esri/calcite-design-system/commit/796372ee8432ed731e3a49405b153ef05c41a8b3)), closes [#9323](https://github.com/Esri/calcite-design-system/issues/9323) + ## [2.9.0-next.7](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@2.9.0-next.6...@esri/calcite-components@2.9.0-next.7) (2024-05-14) ### Features diff --git a/packages/calcite-components/package.json b/packages/calcite-components/package.json index 6ccb0e5ae1f..5e57fce81a3 100644 --- a/packages/calcite-components/package.json +++ b/packages/calcite-components/package.json @@ -1,6 +1,6 @@ { "name": "@esri/calcite-components", - "version": "2.9.0-next.7", + "version": "2.9.0-next.8", "homepage": "https://developers.arcgis.com/calcite-design-system/", "description": "Web Components for Esri's Calcite Design System.", "main": "dist/index.cjs.js", From 6647d18f77051073871c37458b4088e1bad77af8 Mon Sep 17 00:00:00 2001 From: Ben Elan Date: Tue, 14 May 2024 14:31:37 -0700 Subject: [PATCH 03/10] fix: add type-fest as dependency due to build error (#9334) **Related Issue:** #9307 ## Summary Add `type-fest` to the dependencies of `@esri/calcite-components` to prevent build errors. `type-fest` can also be used to simplify/remove the [preact type generator](https://github.com/Esri/calcite-design-system/blob/27a82dcaf8b091c609b3bf765d8c8617c447d8e7/packages/calcite-components/support/preact.ts#L8) in the future. --- package-lock.json | 27 ++++++++++++------------ package.json | 1 - packages/calcite-components/package.json | 3 ++- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index ac0374c0146..4a7ee7b59e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -101,7 +101,6 @@ "ts-jest": "29.1.2", "tsx": "4.7.2", "turbo": "1.13.2", - "type-fest": "4.16.0", "typescript": "5.4.4", "updtr": "4.0.0", "workbox-build": "7.0.0" @@ -33823,18 +33822,6 @@ "node": ">=4" } }, - "node_modules/type-fest": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.16.0.tgz", - "integrity": "sha512-z7Rf5PXxIhbI6eJBTwdqe5bO02nUUmctq4WqviFSstBAWV0YNtEQRhEnZw73WJ8sZOqgFG6Jdl8gYZu7NBJZnA==", - "dev": true, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -36708,7 +36695,8 @@ "focus-trap": "7.5.4", "lodash-es": "4.17.21", "sortablejs": "1.15.1", - "timezone-groups": "0.8.0" + "timezone-groups": "0.8.0", + "type-fest": "4.18.2" }, "devDependencies": { "@esri/calcite-design-tokens": "^2.2.1-next.0", @@ -38736,6 +38724,17 @@ "node": ">=18" } }, + "packages/calcite-components/node_modules/type-fest": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.18.2.tgz", + "integrity": "sha512-+suCYpfJLAe4OXS6+PPXjW3urOS4IoP9waSiLuXfLgqZODKw/aWwASvzqE886wA0kQgGy0mIWyhd87VpqIy6Xg==", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "packages/calcite-components/node_modules/webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", diff --git a/package.json b/package.json index 47c870caf4b..1400a1a5f25 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,6 @@ "ts-jest": "29.1.2", "tsx": "4.7.2", "turbo": "1.13.2", - "type-fest": "4.16.0", "typescript": "5.4.4", "updtr": "4.0.0", "workbox-build": "7.0.0" diff --git a/packages/calcite-components/package.json b/packages/calcite-components/package.json index 5e57fce81a3..45e9f0f4b95 100644 --- a/packages/calcite-components/package.json +++ b/packages/calcite-components/package.json @@ -71,7 +71,8 @@ "focus-trap": "7.5.4", "lodash-es": "4.17.21", "sortablejs": "1.15.1", - "timezone-groups": "0.8.0" + "timezone-groups": "0.8.0", + "type-fest": "4.18.2" }, "devDependencies": { "@esri/calcite-design-tokens": "^2.2.1-next.0", From 8468c3c3b917ad8343117694badb28cd0e839842 Mon Sep 17 00:00:00 2001 From: Ben Elan Date: Tue, 14 May 2024 14:32:32 -0700 Subject: [PATCH 04/10] build(deps): update dependency @esri/calcite-ui-icons to v3.28.1 (#9336) **Related Issue:** n/a ## Summary Manually updates the `@esri/calcite-ui-icons` dependency to [`3.28.1`](https://github.com/Esri/calcite-ui-icons/releases/tag/v3.28.1). Co-authored-by: Kitty Hurley --- package-lock.json | 8 ++++---- packages/calcite-components/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4a7ee7b59e2..4121c46b7ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3830,9 +3830,9 @@ "link": true }, "node_modules/@esri/calcite-ui-icons": { - "version": "3.27.9", - "resolved": "https://registry.npmjs.org/@esri/calcite-ui-icons/-/calcite-ui-icons-3.27.9.tgz", - "integrity": "sha512-bsmXAkWCI/WMr5bCOqsBp3MXu/OAGtF0pgcLWjSx29X5qKQbOIepHT1XNLYWi3ywLp+RQGy6l72Ut76IGmF9Ww==", + "version": "3.28.1", + "resolved": "https://registry.npmjs.org/@esri/calcite-ui-icons/-/calcite-ui-icons-3.28.1.tgz", + "integrity": "sha512-nJn140va7xG01FlAbeYZiwmy1vT8Jx4eA/sJZc1Lhk3k0T9l+koB+ydIZ2HlO4YS12OTohvVO4b3PNxogUQZ+Q==", "dev": true, "bin": { "spriter": "bin/spriter.js" @@ -36700,7 +36700,7 @@ }, "devDependencies": { "@esri/calcite-design-tokens": "^2.2.1-next.0", - "@esri/calcite-ui-icons": "3.27.9", + "@esri/calcite-ui-icons": "3.28.1", "@esri/eslint-plugin-calcite-components": "^1.2.1-next.0", "@stencil-community/eslint-plugin": "0.7.2", "@stencil-community/postcss": "2.2.0", diff --git a/packages/calcite-components/package.json b/packages/calcite-components/package.json index 45e9f0f4b95..0a40b8be95b 100644 --- a/packages/calcite-components/package.json +++ b/packages/calcite-components/package.json @@ -76,7 +76,7 @@ }, "devDependencies": { "@esri/calcite-design-tokens": "^2.2.1-next.0", - "@esri/calcite-ui-icons": "3.27.9", + "@esri/calcite-ui-icons": "3.28.1", "@esri/eslint-plugin-calcite-components": "^1.2.1-next.0", "@stencil-community/eslint-plugin": "0.7.2", "@stencil-community/postcss": "2.2.0", From 630b84518763242e3dc608a329d0e3b1c26eb824 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 May 2024 21:34:14 +0000 Subject: [PATCH 05/10] chore: release next --- package-lock.json | 10 +++++----- .../projects/component-library/CHANGELOG.md | 4 ++++ .../projects/component-library/package.json | 4 ++-- packages/calcite-components-react/CHANGELOG.md | 4 ++++ packages/calcite-components-react/package.json | 4 ++-- packages/calcite-components/CHANGELOG.md | 6 ++++++ packages/calcite-components/package.json | 2 +- 7 files changed, 24 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4121c46b7ef..13294d2cc9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36683,7 +36683,7 @@ }, "packages/calcite-components": { "name": "@esri/calcite-components", - "version": "2.9.0-next.8", + "version": "2.9.0-next.9", "license": "SEE LICENSE.md", "dependencies": { "@floating-ui/dom": "1.6.4", @@ -38383,10 +38383,10 @@ }, "packages/calcite-components-angular/projects/component-library": { "name": "@esri/calcite-components-angular", - "version": "2.9.0-next.8", + "version": "2.9.0-next.9", "license": "SEE LICENSE.md", "dependencies": { - "@esri/calcite-components": "^2.9.0-next.8", + "@esri/calcite-components": "^2.9.0-next.9", "tslib": "2.6.2" }, "peerDependencies": { @@ -38396,10 +38396,10 @@ }, "packages/calcite-components-react": { "name": "@esri/calcite-components-react", - "version": "2.9.0-next.8", + "version": "2.9.0-next.9", "license": "SEE LICENSE.md", "dependencies": { - "@esri/calcite-components": "^2.9.0-next.8" + "@esri/calcite-components": "^2.9.0-next.9" }, "peerDependencies": { "react": ">=16.7", diff --git a/packages/calcite-components-angular/projects/component-library/CHANGELOG.md b/packages/calcite-components-angular/projects/component-library/CHANGELOG.md index 17eccf23817..df640dcc049 100644 --- a/packages/calcite-components-angular/projects/component-library/CHANGELOG.md +++ b/packages/calcite-components-angular/projects/component-library/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.9.0-next.9](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-angular@2.9.0-next.8...@esri/calcite-components-angular@2.9.0-next.9) (2024-05-14) + +**Note:** Version bump only for package @esri/calcite-components-angular + ## [2.9.0-next.8](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-angular@2.9.0-next.7...@esri/calcite-components-angular@2.9.0-next.8) (2024-05-14) **Note:** Version bump only for package @esri/calcite-components-angular diff --git a/packages/calcite-components-angular/projects/component-library/package.json b/packages/calcite-components-angular/projects/component-library/package.json index 6cd466ca3e5..eaf287567b2 100644 --- a/packages/calcite-components-angular/projects/component-library/package.json +++ b/packages/calcite-components-angular/projects/component-library/package.json @@ -1,6 +1,6 @@ { "name": "@esri/calcite-components-angular", - "version": "2.9.0-next.8", + "version": "2.9.0-next.9", "sideEffects": false, "homepage": "https://developers.arcgis.com/calcite-design-system/", "description": "A set of Angular components that wrap Esri's Calcite Components.", @@ -20,7 +20,7 @@ "@angular/core": ">=16.0.0" }, "dependencies": { - "@esri/calcite-components": "^2.9.0-next.8", + "@esri/calcite-components": "^2.9.0-next.9", "tslib": "2.6.2" }, "lerna": { diff --git a/packages/calcite-components-react/CHANGELOG.md b/packages/calcite-components-react/CHANGELOG.md index 507d660f6ae..cddb075f74d 100644 --- a/packages/calcite-components-react/CHANGELOG.md +++ b/packages/calcite-components-react/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.9.0-next.9](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@2.9.0-next.8...@esri/calcite-components-react@2.9.0-next.9) (2024-05-14) + +**Note:** Version bump only for package @esri/calcite-components-react + ## [2.9.0-next.8](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@2.9.0-next.7...@esri/calcite-components-react@2.9.0-next.8) (2024-05-14) **Note:** Version bump only for package @esri/calcite-components-react diff --git a/packages/calcite-components-react/package.json b/packages/calcite-components-react/package.json index 6133f381db4..91337a880e7 100644 --- a/packages/calcite-components-react/package.json +++ b/packages/calcite-components-react/package.json @@ -1,7 +1,7 @@ { "name": "@esri/calcite-components-react", "sideEffects": false, - "version": "2.9.0-next.8", + "version": "2.9.0-next.9", "homepage": "https://developers.arcgis.com/calcite-design-system/", "description": "A set of React components that wrap calcite components", "license": "SEE LICENSE.md", @@ -23,7 +23,7 @@ "dist/" ], "dependencies": { - "@esri/calcite-components": "^2.9.0-next.8" + "@esri/calcite-components": "^2.9.0-next.9" }, "peerDependencies": { "react": ">=16.7", diff --git a/packages/calcite-components/CHANGELOG.md b/packages/calcite-components/CHANGELOG.md index e750458618d..1c0ab7a360e 100644 --- a/packages/calcite-components/CHANGELOG.md +++ b/packages/calcite-components/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.9.0-next.9](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@2.9.0-next.8...@esri/calcite-components@2.9.0-next.9) (2024-05-14) + +### Bug Fixes + +- add type-fest as dependency due to build error ([#9334](https://github.com/Esri/calcite-design-system/issues/9334)) ([6647d18](https://github.com/Esri/calcite-design-system/commit/6647d18f77051073871c37458b4088e1bad77af8)), closes [#9307](https://github.com/Esri/calcite-design-system/issues/9307) [/github.com/Esri/calcite-design-system/blob/27a82dcaf8b091c609b3bf765d8c8617c447d8e7/packages/calcite-components/support/preact.ts#L8](https://github.com/Esri//github.com/Esri/calcite-design-system/blob/27a82dcaf8b091c609b3bf765d8c8617c447d8e7/packages/calcite-components/support/preact.ts/issues/L8) + ## [2.9.0-next.8](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@2.9.0-next.7...@esri/calcite-components@2.9.0-next.8) (2024-05-14) ### Bug Fixes diff --git a/packages/calcite-components/package.json b/packages/calcite-components/package.json index 0a40b8be95b..5cc3d6936d6 100644 --- a/packages/calcite-components/package.json +++ b/packages/calcite-components/package.json @@ -1,6 +1,6 @@ { "name": "@esri/calcite-components", - "version": "2.9.0-next.8", + "version": "2.9.0-next.9", "homepage": "https://developers.arcgis.com/calcite-design-system/", "description": "Web Components for Esri's Calcite Design System.", "main": "dist/index.cjs.js", From af43d153523cb7a121b440ed56e2f92a493e1f39 Mon Sep 17 00:00:00 2001 From: Ben Elan Date: Tue, 14 May 2024 14:52:26 -0700 Subject: [PATCH 06/10] fix(carousel): animate items with the same direction (#9335) **Related Issue:** #9232 ## Summary Updates carousel to wait for item animations before each slide. **Note**: I'll submit a follow-up PR to refactor [`openCloseComponent.onToggleOpenCloseComponent`](https://github.com/Esri/calcite-design-system/blob/main/packages/calcite-components/src/utils/openCloseComponent.ts#L91) to use the same DOM util as carousel. Co-authored-by: JC Franco --- .../src/components/carousel/carousel.e2e.ts | 51 ++++++++++++++++ .../src/components/carousel/carousel.tsx | 36 +++++++++++- packages/calcite-components/src/utils/dom.ts | 58 +++++++++++++++++++ 3 files changed, 142 insertions(+), 3 deletions(-) diff --git a/packages/calcite-components/src/components/carousel/carousel.e2e.ts b/packages/calcite-components/src/components/carousel/carousel.e2e.ts index 33c767870fc..02313e8ea9e 100644 --- a/packages/calcite-components/src/components/carousel/carousel.e2e.ts +++ b/packages/calcite-components/src/components/carousel/carousel.e2e.ts @@ -930,4 +930,55 @@ describe("calcite-carousel", () => { expect(selectedItem.id).toEqual("two"); }); }); + + it("item slide animation finishes between paging/selection", async () => { + const page = await newE2EPage(); + await page.setContent( + html` +

first

+

second

+

third

+
`, + ); + + const container = await page.find(`calcite-carousel >>> .${CSS.container}`); + const animationStartSpy = await container.spyOnEvent("animationstart"); + const animationEndSpy = await container.spyOnEvent("animationend"); + const nextButton = await page.find(`calcite-carousel >>> .${CSS.pageNext}`); + + await nextButton.click(); + await page.waitForChanges(); + await nextButton.click(); + await page.waitForChanges(); + + expect(animationStartSpy).toHaveReceivedEventTimes(2); + expect(animationEndSpy).toHaveReceivedEventTimes(2); + + const previousButton = await page.find(`calcite-carousel >>> .${CSS.pagePrevious}`); + await previousButton.click(); + await page.waitForChanges(); + await previousButton.click(); + await page.waitForChanges(); + + expect(animationStartSpy).toHaveReceivedEventTimes(4); + expect(animationEndSpy).toHaveReceivedEventTimes(4); + + const [item1, item2, item3] = await page.findAll(`calcite-carousel >>> .${CSS.paginationItemIndividual}`); + + await item2.click(); + await page.waitForChanges(); + await item3.click(); + await page.waitForChanges(); + + expect(animationStartSpy).toHaveReceivedEventTimes(6); + expect(animationEndSpy).toHaveReceivedEventTimes(6); + + await item2.click(); + await page.waitForChanges(); + await item1.click(); + await page.waitForChanges(); + + expect(animationStartSpy).toHaveReceivedEventTimes(8); + expect(animationEndSpy).toHaveReceivedEventTimes(8); + }); }); diff --git a/packages/calcite-components/src/components/carousel/carousel.tsx b/packages/calcite-components/src/components/carousel/carousel.tsx index bdcde962148..5d1da2948b7 100644 --- a/packages/calcite-components/src/components/carousel/carousel.tsx +++ b/packages/calcite-components/src/components/carousel/carousel.tsx @@ -16,6 +16,7 @@ import { getElementDir, slotChangeGetAssignedElements, toAriaBoolean, + whenAnimationDone, } from "../../utils/dom"; import { connectLocalized, disconnectLocalized, LocalizedComponent } from "../../utils/locale"; import { guid } from "../../utils/guid"; @@ -215,7 +216,20 @@ export class Carousel @State() items: HTMLCalciteCarouselItemElement[] = []; - @State() direction: "forward" | "backward"; + @State() direction: "forward" | "backward" | "standby" = "standby"; + + @Watch("direction") + async directionWatcher(direction: string): Promise { + if (direction === "standby") { + return; + } + + await whenAnimationDone( + this.itemContainer, + direction === "forward" ? "item-forward" : "item-backward", + ); + this.direction = "standby"; + } @State() defaultMessages: CarouselMessages; @@ -394,18 +408,26 @@ export class Carousel private handleArrowClick = (event: MouseEvent): void => { const direction = (event.target as HTMLDivElement).dataset.direction; if (direction === "next") { + this.direction = "forward"; this.nextItem(true); } else if (direction === "previous") { + this.direction = "backward"; this.previousItem(); } }; private handleItemSelection = (event: MouseEvent): void => { + const item = event.target as HTMLCalciteActionElement; + const requestedPosition = parseInt(item.dataset.index); + + if (requestedPosition === this.selectedIndex) { + return; + } + if (this.playing) { this.handlePause(true); } - const item = event.target as HTMLCalciteActionElement; - const requestedPosition = parseInt(item.dataset.index); + this.direction = requestedPosition > this.selectedIndex ? "forward" : "backward"; this.setSelectedItem(requestedPosition, true); }; @@ -528,6 +550,12 @@ export class Carousel this.container = el; }; + private itemContainer: HTMLDivElement; + + private storeItemContainerRef = (el: HTMLDivElement): void => { + this.itemContainer = el; + }; + // -------------------------------------------------------------------------- // // Render Methods @@ -651,6 +679,8 @@ export class Carousel [CSS.itemContainerBackward]: direction === "backward", }} id={this.containerId} + // eslint-disable-next-line react/jsx-sort-props -- auto-generated by @esri/calcite-components/enforce-ref-last-prop + ref={this.storeItemContainerRef} > diff --git a/packages/calcite-components/src/utils/dom.ts b/packages/calcite-components/src/utils/dom.ts index ae1de19b596..32bc69c429e 100644 --- a/packages/calcite-components/src/utils/dom.ts +++ b/packages/calcite-components/src/utils/dom.ts @@ -653,3 +653,61 @@ export function isBefore(a: HTMLElement, b: HTMLElement): boolean { const children = Array.from(a.parentNode.children); return children.indexOf(a) < children.indexOf(b); } + +/** + * This util helps determine when an animation has completed. + * + * @param targetEl The element to watch for the animation to complete. + * @param animationName The name of the animation to watch for completion. + */ +export async function whenAnimationDone(targetEl: HTMLElement, animationName: string): Promise { + const { animationDuration: allDurations, animationName: allNames } = getComputedStyle(targetEl); + + const allDurationsArray = allDurations.split(","); + const allPropsArray = allNames.split(","); + const propIndex = allPropsArray.indexOf(animationName); + const duration = + allDurationsArray[propIndex] ?? + /* Safari will have a single duration value for the shorthand prop when multiple, separate names/props are defined, + so we fall back to it if there's no matching prop duration */ + allDurationsArray[0]; + + if (duration === "0s") { + return Promise.resolve(); + } + + const startEvent = "animationstart"; + const endEvent = "animationend"; + const cancelEvent = "animationcancel"; + + return new Promise((resolve) => { + const fallbackTimeoutId = setTimeout( + (): void => { + targetEl.removeEventListener(startEvent, onStart); + targetEl.removeEventListener(endEvent, onEndOrCancel); + targetEl.removeEventListener(cancelEvent, onEndOrCancel); + resolve(); + }, + parseFloat(duration) * 1000, + ); + + targetEl.addEventListener(startEvent, onStart); + targetEl.addEventListener(endEvent, onEndOrCancel); + targetEl.addEventListener(cancelEvent, onEndOrCancel); + + function onStart(event: AnimationEvent): void { + if (event.animationName === animationName && event.target === targetEl) { + clearTimeout(fallbackTimeoutId); + targetEl.removeEventListener(startEvent, onStart); + } + } + + function onEndOrCancel(event: AnimationEvent): void { + if (event.animationName === animationName && event.target === targetEl) { + targetEl.removeEventListener(endEvent, onEndOrCancel); + targetEl.removeEventListener(cancelEvent, onEndOrCancel); + resolve(); + } + } + }); +} From 85a04b66557c4dc290d11627caa21c3d57c6f2d6 Mon Sep 17 00:00:00 2001 From: Ben Elan Date: Tue, 14 May 2024 14:52:45 -0700 Subject: [PATCH 07/10] ci: setup hotfix releasing scripts and settings (#9337) **Related Issue:** N/A ## Summary Setup continuous integration for releasing hotfixes from a separate branch so normal work can continue on `main`. --- .github/workflows/chromatic-rc.yml | 44 ---------- .../{chromatic-main.yml => chromatic.yml} | 8 +- .github/workflows/deploy-latest.yml | 24 ++++-- .github/workflows/pr-bot.yml | 2 +- .github/workflows/pr-e2e.yml | 2 +- ...tests_eslint-plugin-calcite-components.yml | 4 +- lerna.json | 2 +- package.json | 17 ++-- support/release.sh | 83 +++++++++++++++++++ support/syncLinkedPackageVersions.ts | 2 +- 10 files changed, 119 insertions(+), 69 deletions(-) delete mode 100644 .github/workflows/chromatic-rc.yml rename .github/workflows/{chromatic-main.yml => chromatic.yml} (89%) create mode 100755 support/release.sh diff --git a/.github/workflows/chromatic-rc.yml b/.github/workflows/chromatic-rc.yml deleted file mode 100644 index ea94d5c8f8e..00000000000 --- a/.github/workflows/chromatic-rc.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: "Chromatic - RC" -on: - push: - branches: [rc] - pull_request: - branches: [rc] - types: [labeled, synchronize] -jobs: - run: - if: | - (github.event.action == 'labeled' && github.event.label.name == 'pr ready for visual snapshots') || github.event_name == 'push' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: actions/setup-node@v4 - with: - node-version-file: package.json - - run: npm install - - run: npm --workspace="packages/calcite-design-tokens" run build - - name: Publish to Chromatic - uses: chromaui/action@v1 - with: - projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} - zip: true - exitOnceUploaded: true - autoAcceptChanges: rc - workingDir: packages/calcite-components - env: - STORYBOOK_SCREENSHOT_TEST_BUILD: true - CHROMATIC_DIFF_THRESHOLD: ${{ secrets.CHROMATIC_DIFF_THRESHOLD }} - skip: - if: contains(github.event.pull_request.labels.*.name, 'skip visual snapshots') - runs-on: ubuntu-latest - steps: - - name: Skip Chromatic - uses: Sibz/github-status-action@v1 - with: - authToken: ${{ secrets.GITHUB_TOKEN }} - context: UI Tests - description: Chromatic run skipped - state: success - sha: ${{github.event.pull_request.head.sha || github.sha}} diff --git a/.github/workflows/chromatic-main.yml b/.github/workflows/chromatic.yml similarity index 89% rename from .github/workflows/chromatic-main.yml rename to .github/workflows/chromatic.yml index 8c59c832ffb..faa8e133107 100644 --- a/.github/workflows/chromatic-main.yml +++ b/.github/workflows/chromatic.yml @@ -1,9 +1,9 @@ -name: "Chromatic - Main" +name: Chromatic on: push: - branches: [main] + branches: [main, hotfix, rc] pull_request: - branches: [main] + branches: [main, hotfix, rc] types: [labeled, synchronize] jobs: run: @@ -25,7 +25,7 @@ jobs: projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} zip: true exitOnceUploaded: true - autoAcceptChanges: main + autoAcceptChanges: ${{ github.base_ref || github.ref_name }} workingDir: packages/calcite-components env: STORYBOOK_SCREENSHOT_TEST_BUILD: true diff --git a/.github/workflows/deploy-latest.yml b/.github/workflows/deploy-latest.yml index d6dd50931db..c5d4b4ae97e 100644 --- a/.github/workflows/deploy-latest.yml +++ b/.github/workflows/deploy-latest.yml @@ -2,7 +2,7 @@ name: Deploy Latest on: workflow_dispatch: push: - branches: [main] + branches: [main, hotfix] permissions: contents: write pull-requests: write @@ -15,7 +15,7 @@ jobs: with: command: manifest token: ${{ secrets.ADMIN_TOKEN }} - default-branch: main + default-branch: ${{ github.ref_name }} extra-files: | packages/calcite-components/readme.md - name: Checkout Repository @@ -24,7 +24,6 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.ADMIN_TOKEN }} - ref: main - name: Setup Node if: ${{ steps.release.outputs.releases_created }} uses: actions/setup-node@v4 @@ -41,9 +40,22 @@ jobs: # For more info, see: https://github.com/Esri/calcite-design-system/pull/9011 git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" - # the "|| true" prevents failure if there are no changes - git add packages/calcite-components/src/components.d.ts || true - git commit -m "build: update types" || true + + # The "|| true" prevents failure if there are no changes + git add packages/calcite-components/src/components.d.ts package-lock.json || true + + # The release-please PR only updates when there are new deployable + # commits, e.g., fixes, features, or breaking changes. This is fine + # but it means autogenerated files can become outdated. + # + # Lerna will only publish when the working tree is clean, so changes + # to autogenerated files cause the release to fail. + # + # The workaround is to commit the files before releasing so everything + # will be up to date in the dists. The commit will be discarded once + # the container is destroyed, and then the autogenerated files will be + # updated in a subsequent PR. + git commit -m "build: update types and package-lock" || true npm run publish:latest env: diff --git a/.github/workflows/pr-bot.yml b/.github/workflows/pr-bot.yml index c6f4b87e224..c1fc87dd027 100644 --- a/.github/workflows/pr-bot.yml +++ b/.github/workflows/pr-bot.yml @@ -1,7 +1,7 @@ name: PR Bot on: pull_request: - branches: [main, rc] + branches: [main, rc, hotfix] permissions: pull-requests: write issues: write diff --git a/.github/workflows/pr-e2e.yml b/.github/workflows/pr-e2e.yml index 0dc38364e70..cbe5e9c6c31 100644 --- a/.github/workflows/pr-e2e.yml +++ b/.github/workflows/pr-e2e.yml @@ -2,7 +2,7 @@ name: E2E on: workflow_dispatch: pull_request: - branches: [main, rc] + branches: [main, rc, hotfix] jobs: e2e: runs-on: ubuntu-20.04 diff --git a/.github/workflows/pr-tests_eslint-plugin-calcite-components.yml b/.github/workflows/pr-tests_eslint-plugin-calcite-components.yml index 9ea510d7ba3..5eecf132457 100644 --- a/.github/workflows/pr-tests_eslint-plugin-calcite-components.yml +++ b/.github/workflows/pr-tests_eslint-plugin-calcite-components.yml @@ -3,10 +3,10 @@ name: Run eslint-plugin-calcite-components tests on: pull_request: paths: ["packages/eslint-plugin-calcite-components/**"] - branches: [main, rc] + branches: [main, rc, hotfix] push: paths: ["packages/eslint-plugin-calcite-components/**"] - branches: [main, rc] + branches: [main, rc, hotfix] jobs: build: diff --git a/lerna.json b/lerna.json index 29ec8ebb685..6df7a3f8da8 100644 --- a/lerna.json +++ b/lerna.json @@ -5,7 +5,7 @@ "command": { "version": { "conventionalCommits": true, - "allowBranch": ["main", "rc"] + "allowBranch": ["main", "rc", "hotfix"] } } } diff --git a/package.json b/package.json index 1400a1a5f25..0ab1372df7f 100644 --- a/package.json +++ b/package.json @@ -14,19 +14,18 @@ "lint:md": "prettier --write \"**/*.md\" >/dev/null && markdownlint \"{,documentation}/*.md\" --fix --dot --ignore-path .gitignore", "lint:yml": "prettier --write \".github/**/*.yml\" >/dev/null", "lint:json": "prettier --write \"*.json\" >/dev/null", - "publish:next": "lerna publish from-package --dist-tag next --yes", - "publish:rc": "lerna publish from-package --dist-tag rc --yes", - "publish:latest": "lerna publish from-package --yes", - "version:next": "npm run util:is-in-sync-with-origin-main && npm run util:is-working-tree-clean && lerna version --conventional-prerelease --preid next --no-git-tag-version --no-push --yes && npm run util:sync-linked-package-versions -- next", - "version:rc": "npm run util:is-in-sync-with-origin-rc && npm run util:is-working-tree-clean && lerna version --conventional-prerelease --preid rc --no-git-tag-version --no-push --yes && npm run util:sync-linked-package-versions -- rc", - "version:latest": "npm run util:is-in-sync-with-origin-main && npm run util:is-working-tree-clean && lerna version --conventional-commits --create-release github --no-git-tag-version --no-push --yes && npm run util:sync-linked-package-versions -- latest", + "version:latest": "./support/release.sh version", + "publish:latest": "./support/release.sh publish", + "version:next": "./support/release.sh version next", + "publish:next": "./support/release.sh publish next", + "version:rc": "./support/release.sh version rc", + "publish:rc": "./support/release.sh publish rc", + "version:hotfix": "./support/release.sh version hotfix", + "publish:hotfix": "./support/release.sh publish hotfix", "prepare": "husky install", "start": "turbo run start --log-order=stream", "test": "turbo run test --log-order=stream", - "util:is-in-sync-with-origin-main": "[ \"$(git rev-parse --abbrev-ref HEAD)\" = \"main\" ] && [ \"$(git rev-parse main)\" = \"$(git rev-parse origin/main)\" ]", - "util:is-in-sync-with-origin-rc": "[ \"$(git rev-parse --abbrev-ref HEAD)\" = \"rc\" ] && [ \"$(git rev-parse rc)\" = \"$(git rev-parse origin/rc)\" ]", "util:is-next-deployable": "tsx support/isNextDeployable.ts", - "util:is-working-tree-clean": "[ -z \"$(git status --porcelain=v1)\" ]", "util:push-tags": "git push origin main --follow-tags", "util:remove-next-changelog-entries": "tsx support/removeNextChangelogEntries.ts", "util:sync-linked-package-versions": "tsx support/syncLinkedPackageVersions.ts" diff --git a/support/release.sh b/support/release.sh new file mode 100755 index 00000000000..1ef3efb7889 --- /dev/null +++ b/support/release.sh @@ -0,0 +1,83 @@ +#!/usr/bin/env bash +set -e + +# This script is used to version and publish releases and pre-releases. +# +# @arg1 The deployment step to run, must be either "version" or "publish". +# @arg2 [optional] The pre-release tag, e.g., "next", "hotfix", or "rc". +# Omit this optional argument for a "latest" release + +help() { + [ -n "$1" ] && printf "%s\n" "$@" + echo "Usage: ./release.sh []" + exit 1 +} + +correct_branch_checked_out() { + [ "$(git rev-parse --abbrev-ref HEAD)" = "$branch" ] +} + +in_sync_with_origin() { + [ "$(git rev-parse "$branch")" = "$(git rev-parse "origin/$branch")" ] +} + +working_tree_clean() { + [ -z "$(git status --porcelain=v1)" ] +} + +sanity_checks() { + if ! correct_branch_checked_out; then + help "The '$branch' branch must be checked out before deploying $dist_tag" + elif ! in_sync_with_origin; then + help "The repository must be in sync with 'origin/$branch'" + elif ! working_tree_clean; then + help "The working tree must be clean before running this script." \ + "Use 'git stash push' to save your changes for later." + fi +} + +version() { + sanity_checks + + if [ -z "$dist_tag" ]; then + lerna version --no-push --no-git-tag-version --yes \ + --conventional-commits \ + --create-release github + else + lerna version --no-push --no-git-tag-version --yes \ + --conventional-prerelease \ + --preid "$dist_tag" + fi + + # default to latest if no dist tag was provided in the second argument + npm run util:sync-linked-package-versions -- "${dist_tag:-latest}" +} + +publish() { + # only add the dist-tag flag if the second argument was provided + lerna publish from-package --yes ${dist_tag:+--dist-tag $dist_tag} +} + +main() { + cmd="$1" + dist_tag="$2" + + if [ -z "$dist_tag" ] || [ "$dist_tag" = "next" ]; then + branch="main" + else + branch="$dist_tag" + fi + + if [ -z "$cmd" ]; then + help "missing argument(s). Specify the command: 'version' or 'publish'" + elif [ "$cmd" = "version" ]; then + version + elif [ "$cmd" = "publish" ]; then + publish + else + help "invalid command: '$cmd'" + exit 1 + fi +} + +main "$@" diff --git a/support/syncLinkedPackageVersions.ts b/support/syncLinkedPackageVersions.ts index 2cf104a84ed..b2dc8f18b5b 100644 --- a/support/syncLinkedPackageVersions.ts +++ b/support/syncLinkedPackageVersions.ts @@ -8,7 +8,7 @@ const exec = promisify(childProcess.exec); const releaseTarget = process.argv[2]; - if (!["latest", "next", "rc"].includes(releaseTarget)) { + if (!["latest", "next", "rc", "hotfix"].includes(releaseTarget)) { throw new Error(`Invalid release target: "${releaseTarget}"`); } From 3153012316e84e26fbdfbd98e0752c412d0b04c5 Mon Sep 17 00:00:00 2001 From: Ben Elan Date: Tue, 14 May 2024 14:59:20 -0700 Subject: [PATCH 08/10] chore: release hotfix (#9338) :robot: I have created a release *beep* *boop* ---
@esri/calcite-components: 2.8.1 [2.8.1](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@2.8.0...@esri/calcite-components@2.8.1) (2024-05-14) * Add type-fest as dependency due to build error ([3819688](https://github.com/Esri/calcite-design-system/commit/38196883cb33f16915d4537affce63441bd316a4)) * **carousel:** Animate items with the same direction ([#9325](https://github.com/Esri/calcite-design-system/issues/9325)) ([6bf7b74](https://github.com/Esri/calcite-design-system/commit/6bf7b740641d0bff366ae109405468f80bf87852)) * **input, input-number, input-text:** Restore `autofocus`, `enter-key-mode` and `input-mode` attributes ([#9245](https://github.com/Esri/calcite-design-system/issues/9245)) ([#9306](https://github.com/Esri/calcite-design-system/issues/9306)) ([0498c6e](https://github.com/Esri/calcite-design-system/commit/0498c6ecf3b881e2fec9e18aa5b28211b44b654a)) * **list-item:** Decrease horizontal spacing between selection icon and content ([#9304](https://github.com/Esri/calcite-design-system/issues/9304)) ([0e828b6](https://github.com/Esri/calcite-design-system/commit/0e828b64905818feb65d153e37d44650ebebf9f6))
@esri/calcite-components-angular: 2.8.1 [2.8.1](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-angular@2.8.0...@esri/calcite-components-angular@2.8.1) (2024-05-14) * **@esri/calcite-components-angular:** Synchronize components versions * The following workspace dependencies were updated * dependencies * @esri/calcite-components bumped from ^2.8.1-hotfix.0 to ^2.8.1
@esri/calcite-components-react: 2.8.1 [2.8.1](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@2.8.0...@esri/calcite-components-react@2.8.1) (2024-05-14) * **@esri/calcite-components-react:** Synchronize components versions * The following workspace dependencies were updated * dependencies * @esri/calcite-components bumped from ^2.8.1-hotfix.0 to ^2.8.1
--- This PR was generated with [ReleasePlease](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Calcite Admin --- .release-please-manifest.json | 6 +++--- .../projects/component-library/CHANGELOG.md | 12 ++++++++++++ packages/calcite-components-react/CHANGELOG.md | 12 ++++++++++++ packages/calcite-components/CHANGELOG.md | 9 +++++++++ packages/calcite-components/readme.md | 4 ++-- 5 files changed, 38 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 444310ba9ee..f764ff8c2fc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,7 +1,7 @@ { - "packages/calcite-components": "2.8.0", - "packages/calcite-components-react": "2.8.0", + "packages/calcite-components": "2.8.1", + "packages/calcite-components-react": "2.8.1", "packages/calcite-design-tokens": "2.2.0", "packages/eslint-plugin-calcite-components": "1.2.0", - "packages/calcite-components-angular/projects/component-library": "2.8.0" + "packages/calcite-components-angular/projects/component-library": "2.8.1" } diff --git a/packages/calcite-components-angular/projects/component-library/CHANGELOG.md b/packages/calcite-components-angular/projects/component-library/CHANGELOG.md index df640dcc049..c4f1bea819c 100644 --- a/packages/calcite-components-angular/projects/component-library/CHANGELOG.md +++ b/packages/calcite-components-angular/projects/component-library/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.8.1](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-angular@2.8.0...@esri/calcite-components-angular@2.8.1) (2024-05-14) + +### Miscellaneous Chores + +- **@esri/calcite-components-angular:** Synchronize components versions + +### Dependencies + +- The following workspace dependencies were updated + - dependencies + - @esri/calcite-components bumped from ^2.8.1-hotfix.0 to ^2.8.1 + ## [2.9.0-next.9](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-angular@2.9.0-next.8...@esri/calcite-components-angular@2.9.0-next.9) (2024-05-14) **Note:** Version bump only for package @esri/calcite-components-angular diff --git a/packages/calcite-components-react/CHANGELOG.md b/packages/calcite-components-react/CHANGELOG.md index cddb075f74d..1f5fc30e256 100644 --- a/packages/calcite-components-react/CHANGELOG.md +++ b/packages/calcite-components-react/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.8.1](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@2.8.0...@esri/calcite-components-react@2.8.1) (2024-05-14) + +### Miscellaneous Chores + +- **@esri/calcite-components-react:** Synchronize components versions + +### Dependencies + +- The following workspace dependencies were updated + - dependencies + - @esri/calcite-components bumped from ^2.8.1-hotfix.0 to ^2.8.1 + ## [2.9.0-next.9](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@2.9.0-next.8...@esri/calcite-components-react@2.9.0-next.9) (2024-05-14) **Note:** Version bump only for package @esri/calcite-components-react diff --git a/packages/calcite-components/CHANGELOG.md b/packages/calcite-components/CHANGELOG.md index 1c0ab7a360e..33469526adb 100644 --- a/packages/calcite-components/CHANGELOG.md +++ b/packages/calcite-components/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.8.1](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@2.8.0...@esri/calcite-components@2.8.1) (2024-05-14) + +### Bug Fixes + +- Add type-fest as dependency due to build error ([3819688](https://github.com/Esri/calcite-design-system/commit/38196883cb33f16915d4537affce63441bd316a4)) +- **carousel:** Animate items with the same direction ([#9325](https://github.com/Esri/calcite-design-system/issues/9325)) ([6bf7b74](https://github.com/Esri/calcite-design-system/commit/6bf7b740641d0bff366ae109405468f80bf87852)) +- **input, input-number, input-text:** Restore `autofocus`, `enter-key-mode` and `input-mode` attributes ([#9245](https://github.com/Esri/calcite-design-system/issues/9245)) ([#9306](https://github.com/Esri/calcite-design-system/issues/9306)) ([0498c6e](https://github.com/Esri/calcite-design-system/commit/0498c6ecf3b881e2fec9e18aa5b28211b44b654a)) +- **list-item:** Decrease horizontal spacing between selection icon and content ([#9304](https://github.com/Esri/calcite-design-system/issues/9304)) ([0e828b6](https://github.com/Esri/calcite-design-system/commit/0e828b64905818feb65d153e37d44650ebebf9f6)) + ## [2.9.0-next.9](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@2.9.0-next.8...@esri/calcite-components@2.9.0-next.9) (2024-05-14) ### Bug Fixes diff --git a/packages/calcite-components/readme.md b/packages/calcite-components/readme.md index 805a11c59ae..c67d094eaf6 100644 --- a/packages/calcite-components/readme.md +++ b/packages/calcite-components/readme.md @@ -17,12 +17,12 @@ The most common approach for loading Calcite Components is to use the version ho ```html ``` From f099db3cf3ab54138ba23661fac1594c71ea3ed1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 May 2024 22:01:13 +0000 Subject: [PATCH 09/10] chore: release next --- package-lock.json | 10 +++++----- .../projects/component-library/CHANGELOG.md | 4 ++++ .../projects/component-library/package.json | 4 ++-- packages/calcite-components-react/CHANGELOG.md | 4 ++++ packages/calcite-components-react/package.json | 4 ++-- packages/calcite-components/CHANGELOG.md | 6 ++++++ packages/calcite-components/package.json | 2 +- 7 files changed, 24 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 13294d2cc9a..6b61223ce01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36683,7 +36683,7 @@ }, "packages/calcite-components": { "name": "@esri/calcite-components", - "version": "2.9.0-next.9", + "version": "2.9.0-next.10", "license": "SEE LICENSE.md", "dependencies": { "@floating-ui/dom": "1.6.4", @@ -38383,10 +38383,10 @@ }, "packages/calcite-components-angular/projects/component-library": { "name": "@esri/calcite-components-angular", - "version": "2.9.0-next.9", + "version": "2.9.0-next.10", "license": "SEE LICENSE.md", "dependencies": { - "@esri/calcite-components": "^2.9.0-next.9", + "@esri/calcite-components": "^2.9.0-next.10", "tslib": "2.6.2" }, "peerDependencies": { @@ -38396,10 +38396,10 @@ }, "packages/calcite-components-react": { "name": "@esri/calcite-components-react", - "version": "2.9.0-next.9", + "version": "2.9.0-next.10", "license": "SEE LICENSE.md", "dependencies": { - "@esri/calcite-components": "^2.9.0-next.9" + "@esri/calcite-components": "^2.9.0-next.10" }, "peerDependencies": { "react": ">=16.7", diff --git a/packages/calcite-components-angular/projects/component-library/CHANGELOG.md b/packages/calcite-components-angular/projects/component-library/CHANGELOG.md index c4f1bea819c..98af8ba836e 100644 --- a/packages/calcite-components-angular/projects/component-library/CHANGELOG.md +++ b/packages/calcite-components-angular/projects/component-library/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.9.0-next.10](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-angular@2.9.0-next.9...@esri/calcite-components-angular@2.9.0-next.10) (2024-05-14) + +**Note:** Version bump only for package @esri/calcite-components-angular + ## [2.8.1](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-angular@2.8.0...@esri/calcite-components-angular@2.8.1) (2024-05-14) ### Miscellaneous Chores diff --git a/packages/calcite-components-angular/projects/component-library/package.json b/packages/calcite-components-angular/projects/component-library/package.json index eaf287567b2..7cc0f4b868e 100644 --- a/packages/calcite-components-angular/projects/component-library/package.json +++ b/packages/calcite-components-angular/projects/component-library/package.json @@ -1,6 +1,6 @@ { "name": "@esri/calcite-components-angular", - "version": "2.9.0-next.9", + "version": "2.9.0-next.10", "sideEffects": false, "homepage": "https://developers.arcgis.com/calcite-design-system/", "description": "A set of Angular components that wrap Esri's Calcite Components.", @@ -20,7 +20,7 @@ "@angular/core": ">=16.0.0" }, "dependencies": { - "@esri/calcite-components": "^2.9.0-next.9", + "@esri/calcite-components": "^2.9.0-next.10", "tslib": "2.6.2" }, "lerna": { diff --git a/packages/calcite-components-react/CHANGELOG.md b/packages/calcite-components-react/CHANGELOG.md index 1f5fc30e256..702c8964469 100644 --- a/packages/calcite-components-react/CHANGELOG.md +++ b/packages/calcite-components-react/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.9.0-next.10](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@2.9.0-next.9...@esri/calcite-components-react@2.9.0-next.10) (2024-05-14) + +**Note:** Version bump only for package @esri/calcite-components-react + ## [2.8.1](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@2.8.0...@esri/calcite-components-react@2.8.1) (2024-05-14) ### Miscellaneous Chores diff --git a/packages/calcite-components-react/package.json b/packages/calcite-components-react/package.json index 91337a880e7..c93e7b650d8 100644 --- a/packages/calcite-components-react/package.json +++ b/packages/calcite-components-react/package.json @@ -1,7 +1,7 @@ { "name": "@esri/calcite-components-react", "sideEffects": false, - "version": "2.9.0-next.9", + "version": "2.9.0-next.10", "homepage": "https://developers.arcgis.com/calcite-design-system/", "description": "A set of React components that wrap calcite components", "license": "SEE LICENSE.md", @@ -23,7 +23,7 @@ "dist/" ], "dependencies": { - "@esri/calcite-components": "^2.9.0-next.9" + "@esri/calcite-components": "^2.9.0-next.10" }, "peerDependencies": { "react": ">=16.7", diff --git a/packages/calcite-components/CHANGELOG.md b/packages/calcite-components/CHANGELOG.md index 33469526adb..965b9f148e5 100644 --- a/packages/calcite-components/CHANGELOG.md +++ b/packages/calcite-components/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.9.0-next.10](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@2.9.0-next.9...@esri/calcite-components@2.9.0-next.10) (2024-05-14) + +### Bug Fixes + +- **carousel:** animate items with the same direction ([#9335](https://github.com/Esri/calcite-design-system/issues/9335)) ([af43d15](https://github.com/Esri/calcite-design-system/commit/af43d153523cb7a121b440ed56e2f92a493e1f39)), closes [#9232](https://github.com/Esri/calcite-design-system/issues/9232) [/github.com/Esri/calcite-design-system/blob/main/packages/calcite-components/src/utils/openCloseComponent.ts#L91](https://github.com/Esri//github.com/Esri/calcite-design-system/blob/main/packages/calcite-components/src/utils/openCloseComponent.ts/issues/L91) + ## [2.8.1](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@2.8.0...@esri/calcite-components@2.8.1) (2024-05-14) ### Bug Fixes diff --git a/packages/calcite-components/package.json b/packages/calcite-components/package.json index 5cc3d6936d6..e49232ab995 100644 --- a/packages/calcite-components/package.json +++ b/packages/calcite-components/package.json @@ -1,6 +1,6 @@ { "name": "@esri/calcite-components", - "version": "2.9.0-next.9", + "version": "2.9.0-next.10", "homepage": "https://developers.arcgis.com/calcite-design-system/", "description": "Web Components for Esri's Calcite Design System.", "main": "dist/index.cjs.js", From 5a3832b6c6777fd8d53ced3fb4ba1f10bc4e52e4 Mon Sep 17 00:00:00 2001 From: Ben Elan Date: Tue, 14 May 2024 15:21:15 -0700 Subject: [PATCH 10/10] ci: ensure all pre-release changelog sections are removed (#9342) ## Summary Ensure all pre-release changelog sections are removed before a `latest` release-please pull request is installed into the `main` or `hotfix` branches. --- ...og-entries.yml => remove-prerelease-changelog-entries.yml} | 3 ++- documentation/monorepo.md | 2 +- package.json | 2 +- ...hangelogEntries.ts => removePrereleaseChangelogEntries.ts} | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) rename .github/workflows/{remove-next-changelog-entries.yml => remove-prerelease-changelog-entries.yml} (89%) rename support/{removeNextChangelogEntries.ts => removePrereleaseChangelogEntries.ts} (79%) diff --git a/.github/workflows/remove-next-changelog-entries.yml b/.github/workflows/remove-prerelease-changelog-entries.yml similarity index 89% rename from .github/workflows/remove-next-changelog-entries.yml rename to .github/workflows/remove-prerelease-changelog-entries.yml index 3618d180a92..20308a1729d 100644 --- a/.github/workflows/remove-next-changelog-entries.yml +++ b/.github/workflows/remove-prerelease-changelog-entries.yml @@ -2,6 +2,7 @@ on: push: branches: - release-please--branches--main + - release-please--branches--hotfix permissions: contents: write pull-requests: write @@ -23,7 +24,7 @@ jobs: run: | git pull npm install - npm run util:remove-next-changelog-entries + npm run util:remove-prerelease-changelog-entries - name: Push Changes run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" diff --git a/documentation/monorepo.md b/documentation/monorepo.md index 7ee9b5d6d2e..0f4a876cd0b 100644 --- a/documentation/monorepo.md +++ b/documentation/monorepo.md @@ -162,7 +162,7 @@ A `deploy-latest.yml` GitHub Action runs `release-please`, which creates the rel After installing the PR, the Action creates [git tags](#git-tags) and [GitHub releases](#github-releases) for each bumped package, and then deploys to NPM. -A `remove-next-changelog-entries.yml` GitHub Action runs the `removeNextChangelogEntries.ts` script every time `release-please` pushes changes to its branch. This ensures all `next` changelog sections created by Lerna are removed before a dev installs the PR. +A `remove-prerelease-changelog-entries.yml` GitHub Action runs the `removePrereleaseChangelogEntries.ts` script every time `release-please` pushes changes to its branch. This ensures all `next`, `hotfix`, and `rc` changelog sections created by Lerna are removed before a dev installs the PR. ### Steps to release diff --git a/package.json b/package.json index 0ab1372df7f..e971a6b08fd 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "test": "turbo run test --log-order=stream", "util:is-next-deployable": "tsx support/isNextDeployable.ts", "util:push-tags": "git push origin main --follow-tags", - "util:remove-next-changelog-entries": "tsx support/removeNextChangelogEntries.ts", + "util:remove-prerelease-changelog-entries": "tsx support/removePrereleaseChangelogEntries.ts", "util:sync-linked-package-versions": "tsx support/syncLinkedPackageVersions.ts" }, "devDependencies": { diff --git a/support/removeNextChangelogEntries.ts b/support/removePrereleaseChangelogEntries.ts similarity index 79% rename from support/removeNextChangelogEntries.ts rename to support/removePrereleaseChangelogEntries.ts index 35c63869ce3..3021bf7e9d8 100644 --- a/support/removeNextChangelogEntries.ts +++ b/support/removePrereleaseChangelogEntries.ts @@ -6,7 +6,7 @@ const { resolve } = await import("path"); const exec = promisify(childProcess.exec); - const nextChangelogSectionPattern = /##\s\[?\d+\.\d+\.\d+-next\.\d+(.*?)\n(?=##\s)/gs; + const prereleaseChangelogSectionPattern = /##\s\[?\d+\.\d+\.\d+-(next|hotfix|rc)\.\d+(.*?)\n(?=##\s)/gs; const changedFiles = (await exec("git diff --name-only origin/main")).stdout.trim(); const changelogs = changedFiles.split("\n").filter((file: string) => file.match("CHANGELOG.md")); @@ -14,7 +14,7 @@ changelogs.forEach(async (changelog: string) => { const changelogPath = resolve(changelog); const changelogContent = await fs.readFile(changelogPath, "utf8"); - const updatedChangelogContent = changelogContent.replace(nextChangelogSectionPattern, ""); + const updatedChangelogContent = changelogContent.replace(prereleaseChangelogSectionPattern, ""); await fs.writeFile(changelogPath, updatedChangelogContent); }); } catch (error) {