-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Individual Workflow Template Page / Part I #2595
Closed
SchnapsterDog
wants to merge
29
commits into
master
from
feature/n8n-2677-individual-workflow-template-page-ui
Closed
Changes from 4 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
00ed89a
N8N-2677 Individual Workflow Template Page / Part I - Created Vuex Te…
SchnapsterDog 47dfa43
N8N-2677 Updated Image, Tags, Tag components and its storybook into d…
SchnapsterDog e181907
N8N-2677 Added Raw Loading State without component
SchnapsterDog 95fb254
N8N-2677 Fixed Conflict
SchnapsterDog 5af93a5
N8N-2677 Added Localication for the static strings
SchnapsterDog afea6fe
N8N-2677 Update MainImages prop with MetaData, Update Interface
SchnapsterDog 9b96ef7
N8N-2677 Added Padding, Fonts, Styles for MarkdownViewer Component
SchnapsterDog 64f4947
N8N-2677 Added IconData prop in Template Interface
SchnapsterDog 7219341
N8N-2677 Update Tags and Tag Component with stylesheet
SchnapsterDog f1f1f30
N8N-2677 Create abbreviateNumber function in helpers, Updated Templat…
SchnapsterDog 8dce589
N8N-2677 Added Template GraphQL Request, Added Interfaces, Handle Res…
SchnapsterDog a52c273
N8N-2677 Make View expandable
SchnapsterDog 6618788
N8N-2677 Created new NodeIcon Component with Tooltip
SchnapsterDog 1cc6911
N8N-2677 Added Template View Breakpoints, Margins and Padding
SchnapsterDog 8b98ff2
N8N-2677 Upgrade element-ui library, Added N8nLoading Component in De…
SchnapsterDog 625a67e
N8N-2677 Added Figma Border rounding to Images, Updated MarkdownViewe…
SchnapsterDog 9448f3b
N8N-2677 Added Generic Styles to MarkdownEditor Component for list an…
SchnapsterDog 136b90f
N8N-2677 Update Styles for Markwon Paragraphs, Spans, Lists, Header T…
SchnapsterDog 549b0da
N8N-2677 Updated padding/margin to come from design system
SchnapsterDog d5eca54
N8N-2677 Updated Markdown Styles
SchnapsterDog 64b4cff
N8N-2677 Update Links into Makrdown, Remove Double quotes from props
SchnapsterDog a1e24fd
N8N-2677 Moving Loading Component into Actual Components
SchnapsterDog 3ff6287
N8N-2677 Removed Timeout from loading state, Use image on load to rep…
SchnapsterDog 4439d48
N8N-2677 Added Loading Component (Skeleton) StoryBook, Created separa…
SchnapsterDog 5dc03f0
N8N-2677 Move Mardown Component to Design-System, Added Hover State o…
SchnapsterDog 07c1202
N8N-2677 Switch to GraphQL
SchnapsterDog e1a9539
N8N-2677 Fixed Mardown Component Vue Warnings
SchnapsterDog e3ba876
N8N-2677 Update Markdown Component with more props
SchnapsterDog 166153f
N8N-2677 Fixed Code Style inside Markdown, Added Redirection for N8N-…
SchnapsterDog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
packages/design-system/src/components/N8nImage/Image.stories.js
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,24 @@ | ||
import N8nImage from './Image.vue'; | ||
|
||
export default { | ||
title: 'Atoms/Image', | ||
component: N8nImage, | ||
argTypes: { | ||
images: { | ||
control: { | ||
type: 'array', | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
const Template = (args, { argTypes }) => ({ | ||
props: Object.keys(argTypes), | ||
components: { | ||
N8nImage, | ||
}, | ||
template: | ||
'<n8n-image v-bind="$props"></n8n-image>', | ||
}); | ||
|
||
export const Image = Template.bind({}); |
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,37 @@ | ||
<template functional> | ||
<div :class="$style.image"> | ||
<img :srcset="$options.methods.getSrcset(props.images)" /> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
interface IProps { | ||
url: string; | ||
width: string; | ||
} | ||
|
||
export default { | ||
name: 'n8n-image', | ||
props: { | ||
images: { | ||
type: Array, | ||
}, | ||
}, | ||
methods: { | ||
getSrcset(images: IProps[]): string { | ||
let srcset = ''; | ||
if (images) { | ||
for (let i = 0; i < images.length; i++) { | ||
srcset += images[i].url + ` ${images[i].width}w,`; | ||
} | ||
} | ||
return srcset; | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="scss" module> | ||
.image { | ||
} | ||
</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 Image from './Image.vue'; | ||
|
||
export default Image; |
Empty file.
Empty file.
Empty file.
24 changes: 24 additions & 0 deletions
24
packages/design-system/src/components/N8nTag/Tag.stories.js
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,24 @@ | ||
import N8nTag from './Tag.vue'; | ||
|
||
export default { | ||
title: 'Atoms/Tag', | ||
component: N8nTag, | ||
argTypes: { | ||
tag: { | ||
control: { | ||
control: 'text', | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
const Template = (args, { argTypes }) => ({ | ||
props: Object.keys(argTypes), | ||
components: { | ||
N8nTag, | ||
}, | ||
template: | ||
'<n8n-tag v-bind="$props"></n8n-tag>', | ||
}); | ||
|
||
export const Tag = Template.bind({}); |
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,25 @@ | ||
<template functional> | ||
<div :class="$style.tag" v-text="props.tag" /> | ||
</template> | ||
|
||
<script lang="ts"> | ||
export default { | ||
name: 'n8n-tag', | ||
props: { | ||
tag: { | ||
type: String, | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="scss" module> | ||
.tag { | ||
width: fit-content; | ||
margin-right: 4px; | ||
padding: 3px 4px; | ||
background-color: #dbdfe7; | ||
border-radius: var(--border-radius-base); | ||
font-size: 11px; | ||
} | ||
</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 Tag from './Tag.vue'; | ||
|
||
export default Tag; |
24 changes: 24 additions & 0 deletions
24
packages/design-system/src/components/N8nTags/Tags.stories.js
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,24 @@ | ||
import N8nTags from './Tags.vue'; | ||
|
||
export default { | ||
title: 'Atoms/Tags', | ||
component: N8nTags, | ||
argTypes: { | ||
tags: { | ||
control: { | ||
type: 'array', | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
const Template = (args, { argTypes }) => ({ | ||
props: Object.keys(argTypes), | ||
components: { | ||
N8nTags, | ||
}, | ||
template: | ||
'<n8n-tags v-bind="$props"></n8n-tags>', | ||
}); | ||
|
||
export const Tags = Template.bind({}); |
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 @@ | ||
<template functional> | ||
<div :class="$style.tags"> | ||
<n8n-tag v-for="(tag, key) in props.tags" :key="'tag-' + key" :tag="tag.name" /> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import N8nTag from '../N8nTag'; | ||
|
||
export default { | ||
name: 'n8n-tags', | ||
components: { | ||
N8nTag, | ||
}, | ||
props: { | ||
tags: { | ||
type: Array, | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="scss" module> | ||
.tags { | ||
display: flex; | ||
} | ||
</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 Tags from './Tags.vue'; | ||
|
||
export default Tags; |
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { IN8nTemplate } from '@/Interface'; | ||
|
||
const template = { | ||
id: '23', | ||
name: 'New/updated employee in BambooHR -> Create/Update user in Okta and Slack to group', | ||
description: 'I made this workflow after discovering that n8n does not have a Todoist trigger. \n\nSteps:\n\n- Configure Todoist webhook by visiting their portal [https://developer.todoist.com/appconsole.html](https://developer.todoist.com/appconsole.html) and checking off the triggers which you want to use. I only used item:completed in my case, but yours could be different.\n- Use the test webhook URL from n8n to test your trigger.\n- Once testing is successful, register the production webhook URL from n8n into the todoist developer portal\n- Adjust the date & time to your liking and appropriate timezone\n- In my case I am sending the data to a Google Sheet but you can change that to whatever app you want to send it to.\n- Profit!\n\nFeel free to reach out to me on [https://twitter.com/sami_abid](https://twitter.com/sami_abid) if you have any questions\n<script>alert("xss");</script>', | ||
image: [ | ||
{ | ||
id: '564', | ||
url: 'https://f000.backblazeb2.com/file/n8n-website-images/ffa19945d89a4feca922859899d435cf.png', | ||
}, | ||
], | ||
mainImage: [ | ||
{ | ||
url: 'https://f000.backblazeb2.com/file/n8n-website-images/ffa19945d89a4feca922859899d435cf.png', | ||
width: '1000', | ||
}, | ||
{ | ||
url: 'https://f000.backblazeb2.com/file/n8n-website-images/ffa19945d89a4feca922859899d435cf.png', | ||
width: '600', | ||
}, | ||
], | ||
nodes: [ | ||
{ | ||
defaults: { | ||
color: '#000000', | ||
}, | ||
displayName: 'Play', | ||
icon: 'fa:play', | ||
// iconData: { | ||
// fileBuffer: '', | ||
// type: '', | ||
// }, | ||
name: 'n8n-nodes-base.start', | ||
typeVersion: 1, | ||
}, | ||
{ | ||
defaults: { | ||
color: '#000000', | ||
}, | ||
displayName: 'Webhook', | ||
icon: `file:E:\projects\clients\n8n\packages\cli\node_modules\n8n-nodes-base\dist\nodes\Webhook\webhook.svg`, | ||
// iconData: { | ||
// fileBuffer: '', | ||
// type: '', | ||
// }, | ||
name: 'n8n-nodes-base.webhook', | ||
typeVersion: 1, | ||
}, | ||
], | ||
totalViews: 1200, | ||
categories: [ | ||
{ | ||
id: '1', | ||
name: 'Security Ops', | ||
}, | ||
{ | ||
id: '2', | ||
name: 'Building Blocks', | ||
}, | ||
], | ||
user: { | ||
username: 'someusername', | ||
}, | ||
createdAt: '2021-12-15T11:56:35.412Z', | ||
}; | ||
|
||
export async function getTemplateById(templateId: string): Promise<IN8nTemplate> { | ||
return template; | ||
} |
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,7 @@ | ||
import { IN8nTemplate } from '@/Interface'; | ||
import { get} from './helpers'; | ||
import { TEMPLATES_BASE_URL } from '@/constants'; | ||
|
||
export async function getTemplateById(templateId: string): Promise<IN8nTemplate> { | ||
return await get(TEMPLATES_BASE_URL, `/workflow/${templateId}`); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use css variables wherever you can
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done & updated :) Only for this background-color and font-size: 11px; we do not have css variables.