-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(editor): Improve trigger panel (#3509)
* add panel * add workflow activation hints * support service trigger nodes * update polling state * support more views * update when trigger panel shows * update start/error nodes * add cron/interval info box * clean up start node * fix up webhook views * remove console log * add listening state * clean up loading state * update loading state * fix up animation * update views * add executions hint * update views * update accordian styling * address more issues * disable execute button if issues * disable if it has issues * add stop waiting button * can activate workflow when dsiabled * update el * fix has issues * add margin bttm * update views * close ndv * add shake * update copies * add error when polling node is missing one * update package lock * hide switch * hide binary data that's missing keys * hide main bar if ndv is open * remove waiting to execute * change accordion bg color * capitalize text * disable trigger panel in read only views * remove webhook title * update webhook desc * update component * update webhook executions note * update header * update webhook url * update exec help * bring back waiting to execute for non triggers * add transition fade * set shake * add helpful tooltip * add nonactive text * add inactive text * hide trigger panel by default * remove unused import * update pulse animation * handle empty values for options * update text * add flag for mock manual executions * add overrides * Add overrides * update check * update package lock; show button for others * hide more info * update other core nodes * update service name * remove panel from nodes * update panel * last tweaks * add telemetry event * add telemetry; address issues * address feedback * address feedback * address feedback * fix previous * fix previous * fix bug * fix bug with webhookbased * add extra break * update telemetry * update telemetry * add telemetry req * add info icon story; use icon component * clean css; en.json * clean en.json * rename key * add key * sort keys alpha * handle activation if active + add previous state to telemetry * stop activation if active * remove unnessary tracking * remove unused import * remove unused * remove unnessary flag * rewrite in ts * move pulse to design system * clean up * clean up * clean up * disable tslint check * disable tslint check
- Loading branch information
Showing
43 changed files
with
44,574 additions
and
108,041 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
packages/design-system/src/components/N8nInfoAccordion/InfoAccordion.stories.ts
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* tslint:disable:variable-name */ | ||
|
||
import N8nInfoAccordion from './InfoAccordion.vue'; | ||
import { StoryFn } from "@storybook/vue"; | ||
|
||
export default { | ||
title: 'Atoms/Info Accordion', | ||
component: N8nInfoAccordion, | ||
argTypes: { | ||
}, | ||
parameters: { | ||
backgrounds: { default: '--color-background-light' }, | ||
}, | ||
}; | ||
|
||
export const Default: StoryFn = (args, {argTypes}) => ({ | ||
props: Object.keys(argTypes), | ||
components: { | ||
N8nInfoAccordion, | ||
}, | ||
template: '<n8n-info-accordion v-bind="$props" @click="onClick" />', | ||
}); | ||
|
||
Default.args = { | ||
title: 'my title', | ||
description: 'my description', | ||
}; |
87 changes: 87 additions & 0 deletions
87
packages/design-system/src/components/N8nInfoAccordion/InfoAccordion.vue
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 |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<template> | ||
<div :class="['accordion', $style.container]" > | ||
<div :class="{[$style.header]: true, [$style.expanded]: expanded}" @click="toggle"> | ||
<n8n-text color="text-base" size="small" align="left" bold>{{ title }}</n8n-text> | ||
|
||
<n8n-icon | ||
:icon="expanded? 'chevron-up' : 'chevron-down'" | ||
bold | ||
/> | ||
|
||
</div> | ||
<div v-if="expanded" :class="{[$style.description]: true, [$style.collapsed]: !expanded}" @click="onClick"> | ||
<n8n-text color="text-base" size="small" align="left"> | ||
<span v-html="description"></span> | ||
</n8n-text> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import N8nText from '../N8nText'; | ||
import N8nIcon from '../N8nIcon'; | ||
export default { | ||
name: 'n8n-info-accordion', | ||
components: { | ||
N8nText, | ||
N8nIcon, | ||
}, | ||
props: { | ||
title: { | ||
type: String, | ||
}, | ||
description: { | ||
type: String, | ||
}, | ||
}, | ||
mounted() { | ||
this.$on('expand', () => { | ||
this.expanded = true; | ||
}); | ||
}, | ||
data() { | ||
return { | ||
expanded: false, | ||
}; | ||
}, | ||
methods: { | ||
toggle() { | ||
this.expanded = !this.expanded; | ||
}, | ||
onClick(e) { | ||
this.$emit('click', e); | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="scss" module> | ||
.container { | ||
background-color: var(--color-background-base); | ||
} | ||
.header { | ||
cursor: pointer; | ||
display: flex; | ||
padding: var(--spacing-s); | ||
*:first-child { | ||
flex-grow: 1; | ||
} | ||
} | ||
.expanded { | ||
padding: var(--spacing-s) var(--spacing-s) var(--spacing-2xs) var(--spacing-s); | ||
} | ||
.description { | ||
display: flex; | ||
padding: 0 var(--spacing-s) var(--spacing-s) var(--spacing-s); | ||
b { | ||
font-weight: var(--font-weight-bold); | ||
} | ||
} | ||
</style> |
3 changes: 3 additions & 0 deletions
3
packages/design-system/src/components/N8nInfoAccordion/index.ts
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import N8nInfoAccordion from './InfoAccordion.vue'; | ||
|
||
export default N8nInfoAccordion; |
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
21 changes: 21 additions & 0 deletions
21
packages/design-system/src/components/N8nPulse/Pulse.stories.ts
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* tslint:disable:variable-name */ | ||
|
||
import N8nPulse from './Pulse.vue'; | ||
import { StoryFn } from "@storybook/vue"; | ||
|
||
export default { | ||
title: 'Atoms/Pulse', | ||
component: N8nPulse, | ||
argTypes: { | ||
}, | ||
parameters: { | ||
backgrounds: { default: '--color-background-light' }, | ||
}, | ||
}; | ||
|
||
export const Default: StoryFn = (args, {argTypes}) => ({ | ||
components: { | ||
N8nPulse, | ||
}, | ||
template: '<n8n-pulse> yo </n8n-pulse>', | ||
}); |
114 changes: 114 additions & 0 deletions
114
packages/design-system/src/components/N8nPulse/Pulse.vue
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 |
---|---|---|
@@ -0,0 +1,114 @@ | ||
<template> | ||
<div :class="['pulse', $style.pulseContainer]"> | ||
<div :class="$style.pulse"> | ||
<div :class="$style.pulse2"> | ||
<slot></slot> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'n8n-pulse', | ||
}; | ||
</script> | ||
|
||
<style lang="scss" module> | ||
$--light-pulse-color: hsla( | ||
var(--color-primary-h), | ||
var(--color-primary-s), | ||
var(--color-primary-l), | ||
0.4 | ||
); | ||
$--dark-pulse-color: hsla( | ||
var(--color-primary-h), | ||
var(--color-primary-s), | ||
var(--color-primary-l), | ||
0 | ||
); | ||
.pulseContainer { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 240px; | ||
width: 100%; | ||
} | ||
.pulse { | ||
width: 74px; | ||
height: 74px; | ||
border-radius: 50%; | ||
box-shadow: 0 0 0 $--light-pulse-color; | ||
animation: pulse 6s infinite cubic-bezier(0.33, 1, 0.68, 1); | ||
} | ||
.pulse2 { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 74px; | ||
height: 74px; | ||
border-radius: 50%; | ||
box-shadow: 0 0 0 $--light-pulse-color; | ||
animation: pulse2 6s infinite cubic-bezier(0.33, 1, 0.68, 1); | ||
} | ||
@keyframes pulse { | ||
0% { | ||
-moz-box-shadow: 0 0 0 0 $--light-pulse-color; | ||
box-shadow: 0 0 0 0 $--light-pulse-color; | ||
} | ||
58.33% { | ||
// 3s | ||
-moz-box-shadow: 0 0 0 60px $--dark-pulse-color; | ||
box-shadow: 0 0 0 60px $--dark-pulse-color; | ||
} | ||
66.6% { | ||
// 4s | ||
-moz-box-shadow: 0 0 0 66px transparent; | ||
box-shadow: 0 0 0 66px transparent; | ||
} | ||
66.7% { | ||
-moz-box-shadow: 0 0 0 0 transparent; | ||
box-shadow: 0 0 0 0 transparent; | ||
} | ||
} | ||
@keyframes pulse2 { | ||
0% { | ||
-moz-box-shadow: 0 0 0 0 $--light-pulse-color; | ||
box-shadow: 0 0 0 0 $--light-pulse-color; | ||
} | ||
16.66% { | ||
// 1s | ||
-moz-box-shadow: 0 0 0 0 $--light-pulse-color; | ||
box-shadow: 0 0 0 0 $--light-pulse-color; | ||
} | ||
50% { | ||
// 3s | ||
-moz-box-shadow: 0 0 0 60px $--dark-pulse-color; | ||
box-shadow: 0 0 0 60px $--dark-pulse-color; | ||
} | ||
83.3% { | ||
// 5s | ||
-moz-box-shadow: 0 0 0 66px transparent; | ||
box-shadow: 0 0 0 66px transparent; | ||
} | ||
83.4% { | ||
-moz-box-shadow: 0 0 0 0 transparent; | ||
box-shadow: 0 0 0 0 transparent; | ||
} | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import N8nPulse from './Pulse.vue'; | ||
|
||
export default N8nPulse; |
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.