From 7df1a7f32f7eb69e0e8ef8e2319e452289d2b9a4 Mon Sep 17 00:00:00 2001 From: Tomasz Konieczny Date: Tue, 19 Sep 2023 15:52:48 +0200 Subject: [PATCH 1/2] dev uri updated (#880) --- .github/workflows/pr_checks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index fe0b4c5b0..0e5cee23e 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -28,13 +28,13 @@ jobs: uses: kubeshop/testkube-run-action@v1 with: # Instance - url: https://dev.testkube.io/results/v1 + url: https://demo.testkube.dev/results/v1 # Options test: dashboard-e2e-tests ref: ${{ github.head_ref }} variables: | BASE_URL="${{ needs.wait-for-vercel.outputs.preview-url }}" API_URL="testkube-api-server.testkube.svc.cluster.local:8088/v1" - DASHBOARD_API_URL="https://dev.testkube.io/results/v1" + DASHBOARD_API_URL="https://demo.testkube.dev/results/v1" BASIC_AUTH_USER="testkube-admin" BASIC_AUTH_PASS="${{ secrets.TESTKUBE_DEVELOP_NGINX_PASS }}" From 69d176c31d9529e303f69d461f4a03c3c67028bc Mon Sep 17 00:00:00 2001 From: Dawid Rusnak Date: Tue, 19 Sep 2023 16:14:25 +0200 Subject: [PATCH 2/2] fix: handle lack of labels, avoid duplicates in the labels combo-box (#881) * fix: handle decomposition of empty labels Resolves: kubeshop/testkube#4375 * fix: mark duplicated labels as disabled with proper tooltip Resolves: kubeshop/testkube#4358 --- .../CreatableMultiSelect.styled.tsx | 23 +++++++--- .../CreatableMultiSelect.tsx | 3 ++ .../CustomComponents/LabelsOption.tsx | 23 +++++----- .../atoms/SplitLabelText/SplitLabelText.tsx | 7 ++-- .../molecules/LabelsSelect/LabelsSelect.tsx | 42 ++++++++++++++----- .../molecules/LabelsSelect/utils.ts | 4 +- 6 files changed, 71 insertions(+), 31 deletions(-) diff --git a/src/components/atoms/CreatableMultiSelect/CreatableMultiSelect.styled.tsx b/src/components/atoms/CreatableMultiSelect/CreatableMultiSelect.styled.tsx index 762ccf91c..d53211a4b 100644 --- a/src/components/atoms/CreatableMultiSelect/CreatableMultiSelect.styled.tsx +++ b/src/components/atoms/CreatableMultiSelect/CreatableMultiSelect.styled.tsx @@ -6,15 +6,28 @@ import {Option} from '@models/form'; import Colors from '@styles/Colors'; -export const StyledOption = styled.div` +export const StyledOption = styled.div<{$disabled: boolean}>` padding: 6px 12px; - cursor: pointer; transition: background-color 0.3s ease; - &:hover { - background-color: ${Colors.slate700}; - } + ${({$disabled}) => + $disabled + ? ` + cursor: not-allowed; + color: ${Colors.slate500}; + + &:hover { + background-color: ${Colors.slate850}; + } + ` + : ` + cursor: pointer; + + &:hover { + background-color: ${Colors.slate700}; + } + `} `; export const StyledMultiLabel = styled.div` diff --git a/src/components/atoms/CreatableMultiSelect/CreatableMultiSelect.tsx b/src/components/atoms/CreatableMultiSelect/CreatableMultiSelect.tsx index 7f95bfa96..221022e18 100644 --- a/src/components/atoms/CreatableMultiSelect/CreatableMultiSelect.tsx +++ b/src/components/atoms/CreatableMultiSelect/CreatableMultiSelect.tsx @@ -22,6 +22,7 @@ type MultiSelectProps = { value?: Option[]; defaultValue?: Option[]; onChange?: (value: readonly Option[]) => void; + isOptionDisabled?: (value: Option, selectValue: readonly Option[]) => boolean; validateCreation?: (inputValue: string) => boolean; CustomOptionComponent?: (props: OptionProps