-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(editor): create new workflows page (#4267)
* feat(editor): extract credentials view into reusable layout components for workflows view * feat(editor): add workflow card and start work on empty state * feat: add hoverable card and finish workflows empty state * fix: undo workflows response interface changes * chore: fix linting issues. * fix: remove enterprise sharing env schema * fix(editor): fix workflows resource view when sharing is enabled * fix: change owner tag design and order * feat: add personalization survey on workflows page * fix: update component snapshots * feat: refactored workflow card to use workflow-activator properly * fix: fix workflow activator and proptypes * fix: hide owner tag for workflow card until sharing is available * fix: fixed ownedBy and sharedWith appearing for workflows list * feat: update tags component design * refactor: change resource filter select to n8n-user-select * fix: made telemetry messages reusable * chore: remove unused import * refactor: fix component name casing * refactor: use Vue.set to make workflow property reactive * feat: add support for clicking on tags for filtering * chore: fix tags linting issues * fix: fix resources list layout when title words are very long * refactor: add active and inactive status text to workflow activator * fix: fix credentials and workflows sorting when name contains leading whitespace * fix: remove wrongfully added style tag * feat: add translations and storybook examples for truncated tags * fix: remove enterprise sharing env from schema * refactor: fix workflows module and workflows field store naming conflict * fix: fix workflow activator wrapping * feat: updated empty workflows list cards design * feat: update workflow activator margins and workflow card * feat: add duplicate workflow functionality and update tags * feat: fix duplicate workflow flow * fix: fix status color for workflow activator with could not be started status * fix: remove createdAt and updatedAt from workflow duplication
- Loading branch information
1 parent
bb4e08c
commit be7aac3
Showing
44 changed files
with
1,610 additions
and
968 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
packages/design-system/src/components/N8nCard/__tests__/__snapshots__/Card.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ages/design-system/src/components/N8nInfoTip/__tests__/__snapshots__/InfoTip.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
// Vitest Snapshot v1 | ||
|
||
exports[`N8nInfoTip > should render correctly as note 1`] = `"<div class=\\"n8n-info-tip _info_3egb8_33 _note_3egb8_16 _base_3egb8_1 _bold_3egb8_12\\"><span class=\\"_iconText_3egb8_28\\"><span class=\\"n8n-icon n8n-text _compact_91pa9_34 _size-medium_91pa9_19 _regular_91pa9_5\\"></span><span>Need help doing something?<a href=\\"/docs\\" target=\\"_blank\\">Open docs</a></span></span></div>"`; | ||
exports[`N8nInfoTip > should render correctly as note 1`] = `"<div class=\\"n8n-info-tip _info_3egb8_33 _note_3egb8_16 _base_3egb8_1 _bold_3egb8_12\\"><span class=\\"_iconText_3egb8_28\\"><span class=\\"n8n-icon n8n-text _compact_odhsl_34 _size-medium_odhsl_19 _regular_odhsl_5\\"></span><span>Need help doing something?<a href=\\"/docs\\" target=\\"_blank\\">Open docs</a></span></span></div>"`; | ||
exports[`N8nInfoTip > should render correctly as tooltip 1`] = ` | ||
"<div class=\\"n8n-info-tip _info_3egb8_33 _tooltip_3egb8_23 _base_3egb8_1 _bold_3egb8_12\\"> | ||
<n8n-tooltip-stub justifybuttons=\\"flex-end\\" buttons=\\"\\" placement=\\"top\\"><span class=\\"_iconText_3egb8_28\\"><span class=\\"n8n-icon n8n-text _compact_91pa9_34 _size-medium_91pa9_19 _regular_91pa9_5\\"></span></span><span>Need help doing something?<a href=\\"/docs\\" target=\\"_blank\\">Open docs</a></span></n8n-tooltip-stub> | ||
<n8n-tooltip-stub justifybuttons=\\"flex-end\\" buttons=\\"\\" placement=\\"top\\"><span class=\\"_iconText_3egb8_28\\"><span class=\\"n8n-icon n8n-text _compact_odhsl_34 _size-medium_odhsl_19 _regular_odhsl_5\\"></span></span><span>Need help doing something?<a href=\\"/docs\\" target=\\"_blank\\">Open docs</a></span></n8n-tooltip-stub> | ||
</div>" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,90 @@ | ||
<template> | ||
<div :class="['n8n-tags', $style.tags]"> | ||
<n8n-tag v-for="tag in tags" :key="tag.id" :text="tag.name" @click="$emit('click', tag.id, $event)"/> | ||
<n8n-tag v-for="tag in visibleTags" :key="tag.id" :text="tag.name" @click="$emit('click', tag.id, $event)"/> | ||
<n8n-link | ||
v-if="truncate && !showAll && hiddenTagsLength > 0" | ||
theme="text" | ||
underline | ||
size="small" | ||
@click.stop.prevent="showAll = true" | ||
> | ||
{{ t('tags.showMore', hiddenTagsLength) }} | ||
</n8n-link> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import N8nTag from '../N8nTag'; | ||
import Vue from 'vue'; | ||
import N8nLink from '../N8nLink'; | ||
import Locale from "../../mixins/locale"; | ||
import Vue, {PropType} from 'vue'; | ||
import mixins from "vue-typed-mixins"; | ||
export default Vue.extend({ | ||
interface ITag { | ||
id: string; | ||
name: string; | ||
} | ||
export default mixins(Locale).extend({ | ||
name: 'n8n-tags', | ||
components: { | ||
N8nTag, | ||
N8nLink, | ||
}, | ||
data() { | ||
return { | ||
showAll: false, | ||
}; | ||
}, | ||
props: { | ||
tags: { | ||
type: Array, | ||
type: Array as PropType<ITag[]>, | ||
default: () => [], | ||
}, | ||
truncate: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
truncateAt: { | ||
type: Number, | ||
default: 3, | ||
}, | ||
}, | ||
computed: { | ||
visibleTags(): ITag[] { | ||
if (this.truncate && !this.showAll && this.tags.length > this.truncateAt) { | ||
return this.tags.slice(0, this.truncateAt); | ||
} | ||
return this.tags; | ||
}, | ||
hiddenTagsLength(): number { | ||
return this.tags.length - this.truncateAt; | ||
}, | ||
}, | ||
}); | ||
</script> | ||
|
||
<style lang="scss" module> | ||
.tags { | ||
display: flex; | ||
display: inline-flex; | ||
flex-wrap: wrap; | ||
overflow-x: scroll; | ||
align-items: center; | ||
overflow-x: scroll; | ||
/* Hide scrollbar for Chrome, Safari and Opera */ | ||
&::-webkit-scrollbar { | ||
display: none; | ||
} | ||
/* Hide scrollbar for Chrome, Safari and Opera */ | ||
&::-webkit-scrollbar { | ||
display: none; | ||
} | ||
/* Hide scrollbar for IE, Edge and Firefox */ | ||
-ms-overflow-style: none; /* IE and Edge */ | ||
scrollbar-width: none; /* Firefox */ | ||
/* Hide scrollbar for IE, Edge and Firefox */ | ||
-ms-overflow-style: none; /* IE and Edge */ | ||
scrollbar-width: none; /* Firefox */ | ||
margin-top: calc(var(--spacing-4xs) * -1); // Cancel out top margin of first tags row | ||
* { | ||
margin: 0 var(--spacing-4xs) var(--spacing-4xs) 0; | ||
margin: var(--spacing-4xs) var(--spacing-4xs) 0 0; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.