diff --git a/packages/frontend/editor-ui/src/features/shared/tags/components/TagsContainer.vue b/packages/frontend/editor-ui/src/features/shared/tags/components/TagsContainer.vue index 2ebf050b907..d19e5705f22 100644 --- a/packages/frontend/editor-ui/src/features/shared/tags/components/TagsContainer.vue +++ b/packages/frontend/editor-ui/src/features/shared/tags/components/TagsContainer.vue @@ -7,21 +7,20 @@ import IntersectionObserved from '@/app/components/IntersectionObserved.vue'; import { createEventBus } from '@n8n/utils/event-bus'; import debounce from 'lodash/debounce'; -import { ElTag } from 'element-plus'; +import { N8nTag } from '@n8n/design-system'; + interface TagsContainerProps { tagIds: string[]; tagsById: { [id: string]: ITag }; limit?: number; clickable?: boolean; responsive?: boolean; - hoverable?: boolean; } const props = withDefaults(defineProps(), { limit: 20, clickable: false, responsive: false, - hoverable: false, }); const emit = defineEmits<{ @@ -80,8 +79,8 @@ const tags = computed(() => { // Methods const setMaxWidth = () => { - const container = tagsContainer.value?.$el as HTMLElement; - const parent = container?.parentNode as HTMLElement; + const container = (tagsContainer.value as { $el?: HTMLElement })?.$el; + const parent = container?.parentNode as HTMLElement | null; if (parent) { maxWidth.value = 0; @@ -137,16 +136,13 @@ onBeforeUnmount(() => { :class="{ clickable: !tag.hidden }" @click="(e) => onClick(e, tag)" > - - {{ tag.name }} - + /> { :enabled="responsive" :event-bus="intersectionEventBus" > - - {{ tag.name }} - + @@ -175,23 +163,13 @@ onBeforeUnmount(() => { max-width: 300px; } -.tags { - display: block; - white-space: nowrap; - overflow: hidden; - max-width: 100%; - - > span { - padding-right: 4px; // why not margin? for space between tags to be clickable - } -} - .hideTag { visibility: hidden; } -.el-tag.hoverable:hover { - border-color: $color-primary; +.tags { + display: flex; + gap: var(--spacing--4xs); } .count-container { diff --git a/packages/frontend/editor-ui/src/features/shared/tags/components/TagsDropdown.vue b/packages/frontend/editor-ui/src/features/shared/tags/components/TagsDropdown.vue index 5ad73388e7a..7408b52a78c 100644 --- a/packages/frontend/editor-ui/src/features/shared/tags/components/TagsDropdown.vue +++ b/packages/frontend/editor-ui/src/features/shared/tags/components/TagsDropdown.vue @@ -9,6 +9,7 @@ import { v4 as uuid } from 'uuid'; import { useToast } from '@/app/composables/useToast'; import { N8nIcon, N8nOption, N8nSelect } from '@n8n/design-system'; + interface TagsDropdownProps { placeholder: string; modelValue: string[]; @@ -286,17 +287,24 @@ onClickOutside( .el-tag, .el-tag.el-tag--info { - padding: var(--spacing--5xs) var(--spacing--4xs); - color: var(--color--text); - background-color: var(--color--background); - border-radius: var(--radius); - font-size: var(--font-size--2xs); - border: 0; + height: var(--tag--height); + padding: var(--tag--padding); + line-height: var(--tag--line-height); + color: var(--tag--color--text); + background-color: var(--tag--color--background); + border: 1px solid var(--tag--border-color); + border-radius: var(--tag--radius); + font-size: var(--tag--font-size); .el-tag__close { max-height: 14px; max-width: 14px; line-height: 14px; + + &:hover { + background-color: transparent !important; + color: var(--color--primary--shade-1); + } } } } diff --git a/packages/frontend/editor-ui/src/features/shared/tags/components/WorkflowTagsContainer.vue b/packages/frontend/editor-ui/src/features/shared/tags/components/WorkflowTagsContainer.vue index 520a87dadf0..1fc310171c6 100644 --- a/packages/frontend/editor-ui/src/features/shared/tags/components/WorkflowTagsContainer.vue +++ b/packages/frontend/editor-ui/src/features/shared/tags/components/WorkflowTagsContainer.vue @@ -9,7 +9,6 @@ interface Props { limit?: number; clickable?: boolean; responsive?: boolean; - hoverable?: boolean; } defineProps(); @@ -34,7 +33,6 @@ function onClick(tagId: string) { :limit="limit" :clickable="clickable" :responsive="responsive" - :hoverable="hoverable" @click="onClick" />