From d4dc0fc54eb4547250a2c9198b0fea76eaed2916 Mon Sep 17 00:00:00 2001 From: Laura Whitaker Date: Fri, 1 Sep 2023 12:21:06 -0700 Subject: [PATCH 01/12] Remove on:blur from TextFilter --- src/lib/components/workflow/filter-search/text-filter.svelte | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/components/workflow/filter-search/text-filter.svelte b/src/lib/components/workflow/filter-search/text-filter.svelte index 981b2b0d4..1b914dc08 100644 --- a/src/lib/components/workflow/filter-search/text-filter.svelte +++ b/src/lib/components/workflow/filter-search/text-filter.svelte @@ -6,8 +6,7 @@ import { FILTER_CONTEXT, type FilterContext } from './index.svelte'; - const { filter, handleSubmit, resetFilter } = - getContext(FILTER_CONTEXT); + const { filter, handleSubmit } = getContext(FILTER_CONTEXT); let value = $filter.value; @@ -31,5 +30,4 @@ unroundLeft bind:value on:keydown={handleKeydown} - on:blur={resetFilter} /> From 25e8f64455ad071dfb85309115ec8bb1e47192ee Mon Sep 17 00:00:00 2001 From: Laura Whitaker Date: Fri, 1 Sep 2023 14:02:09 -0700 Subject: [PATCH 02/12] Add close button button to filters --- .../filter-search/boolean-filter.svelte | 8 +++++++- .../filter-search/close-filter-button.svelte | 19 +++++++++++++++++++ .../filter-search/datetime-filter.svelte | 5 ++--- .../workflow/filter-search/index.svelte | 15 ++++++++++----- .../filter-search/number-filter.svelte | 2 ++ .../workflow/filter-search/text-filter.svelte | 1 + 6 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 src/lib/components/workflow/filter-search/close-filter-button.svelte diff --git a/src/lib/components/workflow/filter-search/boolean-filter.svelte b/src/lib/components/workflow/filter-search/boolean-filter.svelte index 6690cd784..d7515d6cb 100644 --- a/src/lib/components/workflow/filter-search/boolean-filter.svelte +++ b/src/lib/components/workflow/filter-search/boolean-filter.svelte @@ -23,7 +23,13 @@ - + {selectedLabel} diff --git a/src/lib/components/workflow/filter-search/close-filter-button.svelte b/src/lib/components/workflow/filter-search/close-filter-button.svelte new file mode 100644 index 000000000..e55e91a14 --- /dev/null +++ b/src/lib/components/workflow/filter-search/close-filter-button.svelte @@ -0,0 +1,19 @@ + + + From 218ce19f3818601852e25ecd74f51ccb89527a76 Mon Sep 17 00:00:00 2001 From: Laura Whitaker Date: Wed, 6 Sep 2023 12:35:25 -0600 Subject: [PATCH 06/12] Add check for selected prop to MenuItem --- src/lib/holocene/menu/menu-item.svelte | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/lib/holocene/menu/menu-item.svelte b/src/lib/holocene/menu/menu-item.svelte index 6c29dac37..34b91d949 100644 --- a/src/lib/holocene/menu/menu-item.svelte +++ b/src/lib/holocene/menu/menu-item.svelte @@ -5,11 +5,11 @@ + + + (searchAttributeValue = '')} + > + + {#if !$filter.attribute} + + {/if} + + {$filter.attribute || translate('workflows', 'filter')} + + + + + {#each filteredOptions as { value, label }} + {@const disabled = isOptionDisabled(value, $workflowFilters)} + { + handleNewQuery(value); + }} + {disabled} + > + {label} + + {:else} + {translate('no-results')} + {/each} + + From 92794ac2e630fab97851cb504f1ad79caed60440 Mon Sep 17 00:00:00 2001 From: Laura Whitaker Date: Wed, 6 Sep 2023 14:40:48 -0600 Subject: [PATCH 08/12] Use close icon and ghost variant for close filter button --- .../workflow/filter-search/boolean-filter.svelte | 1 - .../workflow/filter-search/close-filter-button.svelte | 11 +++++------ .../workflow/filter-search/datetime-filter.svelte | 1 - .../components/workflow/filter-search/index.svelte | 1 + .../workflow/filter-search/number-filter.svelte | 1 - .../workflow/filter-search/text-filter.svelte | 1 - 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/lib/components/workflow/filter-search/boolean-filter.svelte b/src/lib/components/workflow/filter-search/boolean-filter.svelte index d7515d6cb..eb80f2623 100644 --- a/src/lib/components/workflow/filter-search/boolean-filter.svelte +++ b/src/lib/components/workflow/filter-search/boolean-filter.svelte @@ -25,7 +25,6 @@ import { getContext } from 'svelte'; - + import Button from '$lib/holocene/button.svelte'; import { translate } from '$lib/i18n/translate'; - + import { FILTER_CONTEXT, type FilterContext } from './index.svelte'; const { resetFilter } = getContext(FILTER_CONTEXT); @@ -11,9 +11,8 @@ "`; +exports[`Table_header_cell$ > Status renders 1`] = `"
"`; exports[`Table_header_cell$ > Task Queue renders 1`] = `"Task Queue"`; From b02f7c80a8c574c7185d114a73e55a085f16ce8b Mon Sep 17 00:00:00 2001 From: Ross Edfort Date: Thu, 7 Sep 2023 09:42:09 -0600 Subject: [PATCH 11/12] fix icon button so it stays rounded --- .../workflow/filter-search/index.svelte | 10 +++++----- src/lib/holocene/icon-button.svelte | 15 ++++++++++----- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/lib/components/workflow/filter-search/index.svelte b/src/lib/components/workflow/filter-search/index.svelte index e62865d61..1ce44c184 100644 --- a/src/lib/components/workflow/filter-search/index.svelte +++ b/src/lib/components/workflow/filter-search/index.svelte @@ -156,7 +156,7 @@ {:else}
@@ -168,7 +168,7 @@ {/if} {#if isTextFilter($filter.attribute)} -
+
@@ -178,17 +178,17 @@
--> {:else if isNumberFilter($filter.attribute)} -
+
{:else if isDateTimeFilter($filter.attribute)} -
+
{:else if isBooleanFilter($filter.attribute)} -
+
diff --git a/src/lib/holocene/icon-button.svelte b/src/lib/holocene/icon-button.svelte index a16ae7493..b57b8b34b 100644 --- a/src/lib/holocene/icon-button.svelte +++ b/src/lib/holocene/icon-button.svelte @@ -16,17 +16,22 @@ export let label = ''; - -