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

N8N-3750 Redesign button component #3511

Merged
merged 51 commits into from
Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a156dfa
feat: Design system color improvements and button component redesign.
alexgrozav May 26, 2022
6d4b9e9
feat: Added button focus state and unit tests.
alexgrozav May 27, 2022
a24a10a
refactor: Aligned n8n-button usage inside of editor-ui.
alexgrozav May 27, 2022
8eafe56
test: Updated snapshots.
alexgrozav May 27, 2022
11ef3a2
refactor: Extracted focus outline width into scss variable.
alexgrozav May 30, 2022
0c46dcb
fix: Fixed select input border-radius.
alexgrozav May 30, 2022
9c05eea
refactor: Removed element-ui references in button.
alexgrozav May 31, 2022
e548e00
fix: Fixed scss variable imports.
alexgrozav Jun 1, 2022
110f846
feat: Added color-neutral variable story.
alexgrozav Jun 2, 2022
18bd8ca
fix: Fixed color-secondary variable definition.
alexgrozav Jun 2, 2022
8977f5a
feat: Added color-white story.
alexgrozav Jun 2, 2022
3b01a3e
test: Updated button snapshot.
alexgrozav Jun 2, 2022
f6d40d0
feat: Replaced zoom buttons with new n8n-icon-button.
alexgrozav Jun 2, 2022
4226c15
feat: Added stories for float utilities.
alexgrozav Jun 6, 2022
7b0fb44
chore: Updated color shades generation code for later use.
alexgrozav Jun 6, 2022
c68c310
chore: Removed color-white code.
alexgrozav Jun 6, 2022
4dd28dc
chore: Updated story properties for button components.
alexgrozav Jun 6, 2022
9c9df2d
fix: Added el-button fallback for places where el-button is not repla…
alexgrozav Jun 6, 2022
347fecc
chore: Merged master into n8n-3750-redesign-button-component
alexgrozav Jun 14, 2022
74813ba
feat: Reverted to css modules. Replaced el-button with n8n-button at …
alexgrozav Jun 16, 2022
5635998
test: Updated button snapshot.
alexgrozav Jun 16, 2022
3ab8d12
fix: Fixed element-ui locally referenced buttons (via components: {}).
alexgrozav Jun 16, 2022
4fe07cd
fix: Updated colors. Removed irrelevant validation. Added ElButton ov…
alexgrozav Jun 20, 2022
4fc7506
test: Updated button override snapshot.
alexgrozav Jun 20, 2022
77d970e
fix: Various button adjustments and fixes.
alexgrozav Jun 20, 2022
742888b
chore: Merged master into n8n-3750-redesign-button-component-2.
alexgrozav Jun 20, 2022
f079bf6
chore: Merge master into n8n-3750-redesign-button-component-2.
alexgrozav Jun 22, 2022
2804fb6
fix: Updated button disabled state.
alexgrozav Jun 28, 2022
edd04d5
test: Updated snapshots.
alexgrozav Jun 28, 2022
582f61b
Merge branch 'master' into n8n-3750-redesign-button-component-2
alexgrozav Jun 29, 2022
106397b
fix: Consolidated css variables changes.
alexgrozav Jul 6, 2022
916ec9a
Merge branch 'master' into n8n-3750-redesign-button-component-2
alexgrozav Jul 6, 2022
f6cb28f
chore: Merged branch master into n8n-3750-redesign-button-component-2.
alexgrozav Jul 18, 2022
d223080
Data pinning (#3512)
alexgrozav Jul 18, 2022
ed3dceb
fix: Showing pin data without executing the node only in output pane.
alexgrozav Jul 18, 2022
7d8e39f
fix: Updated no data message when previous node not executed.
alexgrozav Jul 19, 2022
84c598a
feat: Added expression input and evaluation for pin data nodes withou…
alexgrozav Jul 20, 2022
8d1ee92
chore: Fixed linting issues and removed remnant console.log().
alexgrozav Jul 20, 2022
eb7fa9b
chore: Undone package-lock changes.
alexgrozav Jul 20, 2022
fdf2392
fix: Removed pin data store changes.
alexgrozav Jul 20, 2022
e51d126
fix: Created a new object using vuex runExecutionData.
alexgrozav Jul 20, 2022
0f92213
fix: Fixed bug appearing when adding a new node after executing.
alexgrozav Jul 20, 2022
95365f3
fix: Fix editor-ui build
ivov Jul 20, 2022
cf0568c
feat: Added green node connectors when having pin data output.
alexgrozav Jul 20, 2022
7feed12
Merge branch 'n8n-4143-make-node-parameter-variables-and' of github.c…
alexgrozav Jul 20, 2022
3cd16c3
chore: Fixed linting errors.
alexgrozav Jul 20, 2022
b18309f
fix: Added pin data eventBus unsubscribe.
alexgrozav Jul 20, 2022
030c9fa
fix: Added pin data color check after adding a connection.
alexgrozav Jul 20, 2022
e1c12ba
Merge pull request #3738 from n8n-io/n8n-4143-make-node-parameter-var…
alexgrozav Jul 20, 2022
4ccab29
:twisted_rightwards_arrows: Merge master
ivov Jul 20, 2022
9f4b37f
:art: Add pindata styles
ivov Jul 20, 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
122 changes: 0 additions & 122 deletions packages/design-system/src/components/N8nButton/Button.stories.js

This file was deleted.

167 changes: 167 additions & 0 deletions packages/design-system/src/components/N8nButton/Button.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
/* tslint:disable:variable-name */
import N8nButton from './Button.vue';
import { action } from '@storybook/addon-actions';
import { StoryFn } from "@storybook/vue";

export default {
title: 'Atoms/Button',
component: N8nButton,
argTypes: {
type: {
control: 'select',
options: ['primary', 'secondary', 'tertiary', 'success', 'warning', 'danger'],
},
size: {
control: {
type: 'select',
options: ['mini', 'small', 'medium', 'large', 'xlarge'],
},
},
float: {
type: 'select',
options: ['left', 'right'],
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/DxLbnIyMK8X0uLkUguFV4n/n8n-design-system_v1?node-id=5%3A1147',
},
},
};

const methods = {
onClick: action('click'),
};

const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nButton,
},
template: '<n8n-button v-bind="$props" @click="onClick" />',
methods,
});

export const Button = Template.bind({});
Button.args = {
label: 'Button',
};

const AllSizesTemplate: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nButton,
},
template: `<div>
<n8n-button v-bind="$props" size="large" @click="onClick" />
<n8n-button v-bind="$props" size="medium" @click="onClick" />
<n8n-button v-bind="$props" size="small" @click="onClick" />
<n8n-button v-bind="$props" :loading="true" @click="onClick" />
<n8n-button v-bind="$props" :disabled="true" @click="onClick" />
</div>`,
methods,
});

const AllColorsTemplate: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nButton,
},
template: `<div>
<n8n-button v-bind="$props" type="primary" @click="onClick" />
<n8n-button v-bind="$props" type="secondary" @click="onClick" />
<n8n-button v-bind="$props" type="tertiary" @click="onClick" />
<n8n-button v-bind="$props" type="success" @click="onClick" />
<n8n-button v-bind="$props" type="warning" @click="onClick" />
<n8n-button v-bind="$props" type="danger" @click="onClick" />
</div>`,
methods,
});

const AllColorsAndSizesTemplate: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nButton,
},
template: `<div>
<n8n-button v-bind="$props" size="large" type="primary" @click="onClick" />
<n8n-button v-bind="$props" size="large" type="secondary" @click="onClick" />
<n8n-button v-bind="$props" size="large" type="tertiary" @click="onClick" />
<n8n-button v-bind="$props" size="large" type="success" @click="onClick" />
<n8n-button v-bind="$props" size="large" type="warning" @click="onClick" />
<n8n-button v-bind="$props" size="large" type="danger" @click="onClick" />
<br/>
<br/>
<n8n-button v-bind="$props" size="medium" type="primary" @click="onClick" />
<n8n-button v-bind="$props" size="medium" type="secondary" @click="onClick" />
<n8n-button v-bind="$props" size="medium" type="tertiary" @click="onClick" />
<n8n-button v-bind="$props" size="medium" type="success" @click="onClick" />
<n8n-button v-bind="$props" size="medium" type="warning" @click="onClick" />
<n8n-button v-bind="$props" size="medium" type="danger" @click="onClick" />
<br/>
<br/>
<n8n-button v-bind="$props" size="small" type="primary" @click="onClick" />
<n8n-button v-bind="$props" size="small" type="secondary" @click="onClick" />
<n8n-button v-bind="$props" size="small" type="tertiary" @click="onClick" />
<n8n-button v-bind="$props" size="small" type="success" @click="onClick" />
<n8n-button v-bind="$props" size="small" type="warning" @click="onClick" />
<n8n-button v-bind="$props" size="small" type="danger" @click="onClick" />
</div>`,
methods,
});

export const Primary = AllSizesTemplate.bind({});
Primary.args = {
type: 'primary',
label: 'Button',
};

export const Secondary = AllSizesTemplate.bind({});
Secondary.args = {
type: 'secondary',
label: 'Button',
};

export const Tertiary = AllSizesTemplate.bind({});
Tertiary.args = {
type: 'tertiary',
label: 'Button',
};

export const Success = AllSizesTemplate.bind({});
Success.args = {
type: 'success',
label: 'Button',
};

export const Warning = AllSizesTemplate.bind({});
Warning.args = {
type: 'warning',
label: 'Button',
};

export const Danger = AllSizesTemplate.bind({});
Danger.args = {
type: 'danger',
label: 'Button',
};

export const Outline = AllColorsAndSizesTemplate.bind({});
Outline.args = {
outline: true,
label: 'Button',
};

export const Text = AllColorsAndSizesTemplate.bind({});
Text.args = {
text: true,
label: 'Button',
};

export const WithIcon = AllSizesTemplate.bind({});
WithIcon.args = {
label: 'Button',
icon: 'plus-circle',
};

Loading