From c400a59c89e9022fc0d2e4940b6b9b3df90f39c2 Mon Sep 17 00:00:00 2001 From: sjschlapbach Date: Fri, 1 Dec 2023 11:38:44 +0100 Subject: [PATCH 1/9] fix(ColorPicker): prevent submit propagation of color picker change form --- src/ColorPicker.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ColorPicker.tsx b/src/ColorPicker.tsx index 3cefecc4..6db45d0d 100644 --- a/src/ColorPicker.tsx +++ b/src/ColorPicker.tsx @@ -151,7 +151,9 @@ export function ColorPicker({ ), }} type="submit" - onClick={() => { + onClick={(e) => { + e?.preventDefault() + e?.stopPropagation() onSubmit(newColor) setColorPickerOpen(false) }} From 9528f7810faa37f1c143d27f5dcf9238f0898a33 Mon Sep 17 00:00:00 2001 From: sjschlapbach Date: Fri, 1 Dec 2023 11:39:22 +0100 Subject: [PATCH 2/9] chore(release): 2.4.4 --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eef1b830..10bce6af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [2.4.4](https://github.com/uzh-bf/design-system/compare/v2.4.3...v2.4.4) (2023-12-01) + + +### Bug Fixes + +* **ColorPicker:** prevent submit propagation of color picker change form ([c400a59](https://github.com/uzh-bf/design-system/commit/c400a59c89e9022fc0d2e4940b6b9b3df90f39c2)) + ### [2.4.3](https://github.com/uzh-bf/design-system/compare/v2.4.2...v2.4.3) (2023-11-06) diff --git a/package-lock.json b/package-lock.json index 3234b443..2c044b8f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@uzh-bf/design-system", - "version": "2.4.3", + "version": "2.4.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@uzh-bf/design-system", - "version": "2.4.3", + "version": "2.4.4", "license": "MIT", "dependencies": { "@radix-ui/react-checkbox": "1.0.4", diff --git a/package.json b/package.json index 454a172f..105cfe23 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@uzh-bf/design-system", - "version": "2.4.3", + "version": "2.4.4", "license": "MIT", "repository": { "url": "https://github.com/uzh-bf/design-system.git" From e5870d430c3dc44457438929838cb7e83d384b65 Mon Sep 17 00:00:00 2001 From: sjschlapbach Date: Fri, 1 Dec 2023 12:58:45 +0100 Subject: [PATCH 3/9] chore(Modal): add more testing data attributes --- src/Modal.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Modal.tsx b/src/Modal.tsx index c05d7aab..8ab8eaa8 100644 --- a/src/Modal.tsx +++ b/src/Modal.tsx @@ -15,6 +15,14 @@ export interface ModalProps { cy?: string test?: string } + dataOverlay?: { + cy?: string + test?: string + } + dataContent?: { + cy?: string + test?: string + } className?: { overlayOverride?: string contentOverride?: string @@ -47,6 +55,8 @@ export interface ModalProps { * * @param id - The id of the modal. * @param data - The object of data attributes that can be used for testing (e.g. data-test or data-cy) + * @param dataOverlay - The object of data attributes that can be used for testing (e.g. data-test or data-cy) for the overlay + * @param dataContent - The object of data attributes that can be used for testing (e.g. data-test or data-cy) for the content * @param trigger - The optional trigger that opens the modal, if the state is not managed by some parent component already. * @param title - The optional title of the modal. * @param children - The content of the modal. @@ -67,6 +77,8 @@ export interface ModalProps { export function Modal({ id, data, + dataOverlay, + dataContent, trigger, title = '', children, @@ -105,6 +117,8 @@ export function Modal({ 'fixed bottom-0 left-0 right-0 top-0 z-20 flex justify-center gap-4 bg-uzh-grey-100 bg-opacity-50 p-4 md:items-center', className?.overlay )} + data-cy={dataOverlay?.cy} + data-test={dataOverlay?.test} > {(onPrev || onNext) && ( @@ -162,7 +181,11 @@ export function Modal({ {!hideCloseButton && ( - @@ -182,6 +205,7 @@ export function Modal({ className={{ root: twMerge('lg:text-xl', className?.onNext) }} disabled={!onNext} onClick={onNext} + data={dataNextButton} > From 482fc91481be3cb65e56b0fa90f933d446144629 Mon Sep 17 00:00:00 2001 From: sjschlapbach Date: Fri, 1 Dec 2023 13:31:27 +0100 Subject: [PATCH 6/9] chore(release): 2.4.6 --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ea62928..724bda72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [2.4.6](https://github.com/uzh-bf/design-system/compare/v2.4.5...v2.4.6) (2023-12-01) + + +### Other + +* **Modal:** add close, next and previous data attributes ([6d28ae1](https://github.com/uzh-bf/design-system/commit/6d28ae16c7e04947cc2327a69998f43333929c7f)) + ### [2.4.5](https://github.com/uzh-bf/design-system/compare/v2.4.4...v2.4.5) (2023-12-01) diff --git a/package-lock.json b/package-lock.json index 006f0687..2b5cfaf8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@uzh-bf/design-system", - "version": "2.4.5", + "version": "2.4.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@uzh-bf/design-system", - "version": "2.4.5", + "version": "2.4.6", "license": "MIT", "dependencies": { "@radix-ui/react-checkbox": "1.0.4", diff --git a/package.json b/package.json index 7d746946..374efbb7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@uzh-bf/design-system", - "version": "2.4.5", + "version": "2.4.6", "license": "MIT", "repository": { "url": "https://github.com/uzh-bf/design-system.git" From ce8401c1de42c730a5d77ab493bb6be55b15a49b Mon Sep 17 00:00:00 2001 From: sjschlapbach Date: Fri, 22 Dec 2023 00:08:18 +0100 Subject: [PATCH 7/9] fix(Select): ensure that options receive correct data testing attributes --- src/Select.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Select.tsx b/src/Select.tsx index c2130624..3dc81396 100644 --- a/src/Select.tsx +++ b/src/Select.tsx @@ -136,8 +136,7 @@ export function Select({ ? items.map((item, ix) => ( {items.map((item, ix) => ( - + ))} From 0ff5e54e2aad5d8b10544c3261852f235759d745 Mon Sep 17 00:00:00 2001 From: sjschlapbach Date: Fri, 22 Dec 2023 00:09:01 +0100 Subject: [PATCH 8/9] chore(release): 2.4.7 --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 724bda72..b297410e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [2.4.7](https://github.com/uzh-bf/design-system/compare/v2.4.6...v2.4.7) (2023-12-21) + + +### Bug Fixes + +* **Select:** ensure that options receive correct data testing attributes ([ce8401c](https://github.com/uzh-bf/design-system/commit/ce8401c1de42c730a5d77ab493bb6be55b15a49b)) + ### [2.4.6](https://github.com/uzh-bf/design-system/compare/v2.4.5...v2.4.6) (2023-12-01) diff --git a/package-lock.json b/package-lock.json index 2b5cfaf8..b7e1f8c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@uzh-bf/design-system", - "version": "2.4.6", + "version": "2.4.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@uzh-bf/design-system", - "version": "2.4.6", + "version": "2.4.7", "license": "MIT", "dependencies": { "@radix-ui/react-checkbox": "1.0.4", diff --git a/package.json b/package.json index 374efbb7..8954a929 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@uzh-bf/design-system", - "version": "2.4.6", + "version": "2.4.7", "license": "MIT", "repository": { "url": "https://github.com/uzh-bf/design-system.git" From b210f649b2af05e59ed1a83f5b1d49935f501e34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Schl=C3=A4fli?= Date: Sun, 21 Jan 2024 08:36:16 +0100 Subject: [PATCH 9/9] ci: add release-please --- .github/workflows/release.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..f763cfde --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +name: release-please + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v4 + with: + release-type: node