Skip to content
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
Show file tree
Hide file tree
Changes from all 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 Dec 23, 2021
47dfa43
N8N-2677 Updated Image, Tags, Tag components and its storybook into d…
SchnapsterDog Dec 23, 2021
e181907
N8N-2677 Added Raw Loading State without component
SchnapsterDog Dec 23, 2021
95fb254
N8N-2677 Fixed Conflict
SchnapsterDog Dec 23, 2021
5af93a5
N8N-2677 Added Localication for the static strings
SchnapsterDog Dec 24, 2021
afea6fe
N8N-2677 Update MainImages prop with MetaData, Update Interface
SchnapsterDog Dec 24, 2021
9b96ef7
N8N-2677 Added Padding, Fonts, Styles for MarkdownViewer Component
SchnapsterDog Dec 27, 2021
64f4947
N8N-2677 Added IconData prop in Template Interface
SchnapsterDog Dec 27, 2021
7219341
N8N-2677 Update Tags and Tag Component with stylesheet
SchnapsterDog Dec 27, 2021
f1f1f30
N8N-2677 Create abbreviateNumber function in helpers, Updated Templat…
SchnapsterDog Dec 27, 2021
8dce589
N8N-2677 Added Template GraphQL Request, Added Interfaces, Handle Res…
SchnapsterDog Dec 28, 2021
a52c273
N8N-2677 Make View expandable
SchnapsterDog Dec 29, 2021
6618788
N8N-2677 Created new NodeIcon Component with Tooltip
SchnapsterDog Dec 30, 2021
1cc6911
N8N-2677 Added Template View Breakpoints, Margins and Padding
SchnapsterDog Dec 30, 2021
8b98ff2
N8N-2677 Upgrade element-ui library, Added N8nLoading Component in De…
SchnapsterDog Dec 30, 2021
625a67e
N8N-2677 Added Figma Border rounding to Images, Updated MarkdownViewe…
SchnapsterDog Dec 31, 2021
9448f3b
N8N-2677 Added Generic Styles to MarkdownEditor Component for list an…
SchnapsterDog Jan 5, 2022
136b90f
N8N-2677 Update Styles for Markwon Paragraphs, Spans, Lists, Header T…
SchnapsterDog Jan 5, 2022
549b0da
N8N-2677 Updated padding/margin to come from design system
SchnapsterDog Jan 7, 2022
d5eca54
N8N-2677 Updated Markdown Styles
SchnapsterDog Jan 7, 2022
64b4cff
N8N-2677 Update Links into Makrdown, Remove Double quotes from props
SchnapsterDog Jan 7, 2022
a1e24fd
N8N-2677 Moving Loading Component into Actual Components
SchnapsterDog Jan 7, 2022
3ff6287
N8N-2677 Removed Timeout from loading state, Use image on load to rep…
SchnapsterDog Jan 7, 2022
4439d48
N8N-2677 Added Loading Component (Skeleton) StoryBook, Created separa…
SchnapsterDog Jan 10, 2022
5dc03f0
N8N-2677 Move Mardown Component to Design-System, Added Hover State o…
SchnapsterDog Jan 10, 2022
07c1202
N8N-2677 Switch to GraphQL
SchnapsterDog Jan 10, 2022
e1a9539
N8N-2677 Fixed Mardown Component Vue Warnings
SchnapsterDog Jan 10, 2022
e3ba876
N8N-2677 Update Markdown Component with more props
SchnapsterDog Jan 10, 2022
166153f
N8N-2677 Fixed Code Style inside Markdown, Added Redirection for N8N-…
SchnapsterDog Jan 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions packages/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
"@fortawesome/free-solid-svg-icons": "5.x",
"@fortawesome/vue-fontawesome": "2.x",
"core-js": "3.x",
"element-ui": "2.13.x"
"element-ui": "2.15.x"
},
"devDependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.35",
"@fortawesome/free-solid-svg-icons": "^5.15.3",
"@fortawesome/vue-fontawesome": "^2.0.2",
"core-js": "^3.6.5",
"element-ui": "~2.13.0",
"element-ui": "2.15.x",
"storybook-addon-themes": "^6.1.0",
"vue": "^2.6.11",
"vue-class-component": "^7.2.3",
Expand All @@ -48,6 +48,7 @@
"@storybook/addon-links": "^6.3.6",
"@storybook/vue": "^6.3.6",
"@types/jest": "^26.0.13",
"@types/markdown-it": "^12.2.3",
"@typescript-eslint/eslint-plugin": "^4.29.0",
"@typescript-eslint/parser": "^4.29.0",
"@vue/cli-plugin-babel": "~4.5.0",
Expand All @@ -64,6 +65,10 @@
"eslint-plugin-vue": "^7.16.0",
"fibers": "^5.0.0",
"gulp": "^4.0.0",
"markdown-it": "^12.3.2",
"markdown-it-emoji": "^2.0.0",
"markdown-it-link-attributes": "^4.0.0",
"markdown-it-task-lists": "^2.1.1",
"prettier": "^2.3.2",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
Expand All @@ -75,6 +80,7 @@
"gulp-clean-css": "^4.3.0",
"gulp-dart-sass": "^1.0.2",
"node-notifier": ">=8.0.1",
"trim": ">=0.0.3"
"trim": ">=0.0.3",
"xss": "^1.0.10"
}
}
24 changes: 24 additions & 0 deletions packages/design-system/src/components/N8nImage/Image.stories.js
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({});
66 changes: 66 additions & 0 deletions packages/design-system/src/components/N8nImage/Image.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<template>
<div :class="$style.wrapper">
<div v-show="imageIsLoaded">
<img :class="$style.image" :srcset="getSrcset(images)" @load="imageIsLoaded = true"/>
</div>
<div>
<n8n-loading :animated="true" :loading="!imageIsLoaded" :rows="1" variant="image" />
</div>
</div>
</template>

<script lang="ts">
import N8nLoading from '../N8nLoading';

interface IProps {
url: string;
metadata: IMetadata;
}

interface IMetadata {
width: string
}

export default {
name: 'n8n-image',
props: {
images: {
type: Array,
},
},
components: {
N8nLoading,
},
data() {
return {
imageIsLoaded: false,
};
},
methods: {
getSrcset(images: IProps[]): string {
let srcset = '';
if (images) {
for (let i = 0; i < images.length; i++) {
if (!images[i].metadata) {
srcset += images[i].url + ` 600w,`;
} else {
srcset += images[i].url + ` ${images[i].metadata.width}w,`;
}

}
}
return srcset;
},
onLoad() {
this.imageIsLoaded = true;
}
},
};
</script>

<style lang="scss" module>
.image {
border: 1px solid #dbdfe7;
border-radius: var(--border-radius-large);
}
</style>
3 changes: 3 additions & 0 deletions packages/design-system/src/components/N8nImage/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Image from './Image.vue';

export default Image;
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import N8nLoading from './Loading.vue';

export default {
title: 'Atoms/Loading',
component: N8nLoading,
argTypes: {
animated: {
control: {
type: 'boolean',
},
},
loading: {
control: {
type: 'boolean',
},
},
rows: {
control: {
type: 'select',
options: [1, 2, 3, 4, 5],
},
},
variant: {
control: {
type: 'select',
options: ['button', 'h1', 'image', 'p'],
},
},
},
};

const Template = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nLoading,
},
template: '<n8n-loading v-bind="$props"></n8n-heading>',
});

export const Loading = Template.bind({});
62 changes: 62 additions & 0 deletions packages/design-system/src/components/N8nLoading/Loading.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<template>
<el-skeleton :loading="loading" :animated="animated">
<template slot="template">
<el-skeleton-item
v-if="variant === 'button'"
:variant="variant"
/>
<div v-if="variant === 'h1'">
<el-skeleton-item
v-for="(item, index) in rows"
:key="`${index}-${item}`"
:class="{
'el-skeleton__h1--last': item === rows && rows > 1,
}"
:variant="variant"
/>
</div>
<el-skeleton-item
v-if="variant === 'image'"
:variant="variant"
/>
<div v-if="variant === 'p'">
<el-skeleton-item
class="el-skeleton__paragraph"
v-for="(item, index) in rows"
:key="`${index}-${item}`"
:class="{
'last': item === rows && rows > 1,
}"
:variant="variant"
/>
</div>
</template>
</el-skeleton>
</template>

<script lang="ts">
import ElSkeleton from 'element-ui/lib/skeleton';
import ElSkeletonItem from 'element-ui/lib/skeleton-item';

export default {
name: 'n8n-loading',
components: {
ElSkeleton,
ElSkeletonItem,
},
props: {
animated: {
type: Boolean,
},
loading: {
type: Boolean,
},
rows: {
type: Number,
},
variant: {
type: String,
},
},
};
</script>
3 changes: 3 additions & 0 deletions packages/design-system/src/components/N8nLoading/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import N8nLoading from './Loading.vue';

export default N8nLoading;
Empty file.
Loading