mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
perf: Add tailwind to editor and design system (#9032)
This commit is contained in:
parent
5025d209ca
commit
1c1e4443f4
|
@ -79,6 +79,7 @@ describe('Workflow tags', () => {
|
|||
wf.getters.nthTagPill(1).click();
|
||||
wf.getters.tagsDropdown().find('.el-tag__close').first().click();
|
||||
cy.get('body').click(0, 0);
|
||||
wf.getters.workflowTags().click();
|
||||
wf.getters.tagPills().should('have.length', TEST_TAGS.length - 1);
|
||||
});
|
||||
|
||||
|
@ -88,6 +89,7 @@ describe('Workflow tags', () => {
|
|||
wf.getters.nthTagPill(1).click();
|
||||
wf.getters.tagsInDropdown().filter('.selected').first().click();
|
||||
cy.get('body').click(0, 0);
|
||||
wf.getters.workflowTags().click();
|
||||
wf.getters.tagPills().should('have.length', TEST_TAGS.length - 1);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -75,7 +75,7 @@ describe('Resource Locator', () => {
|
|||
|
||||
ndv.actions.setInvalidExpression({ fieldName: 'fieldId' });
|
||||
|
||||
ndv.getters.nodeParameters().click(); // remove focus from input, hide expression preview
|
||||
ndv.getters.inputDataContainer().click(); // remove focus from input, hide expression preview
|
||||
|
||||
ndv.getters.resourceLocatorInput('rlc').click();
|
||||
|
||||
|
|
|
@ -325,7 +325,7 @@ describe('NDV', () => {
|
|||
|
||||
ndv.actions.setInvalidExpression({ fieldName: 'fieldId', delay: 200 });
|
||||
|
||||
ndv.getters.nodeParameters().click(); // remove focus from input, hide expression preview
|
||||
ndv.getters.inputDataContainer().click(); // remove focus from input, hide expression preview
|
||||
|
||||
ndv.getters.parameterInput('remoteOptions').click();
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ export class WorkflowPage extends BasePage {
|
|||
},
|
||||
addInitialNodeToCanvas: (
|
||||
nodeDisplayName: string,
|
||||
opts?: { keepNdvOpen?: boolean; action?: string, isTrigger?: boolean},
|
||||
opts?: { keepNdvOpen?: boolean; action?: string; isTrigger?: boolean },
|
||||
) => {
|
||||
this.getters.canvasPlusButton().click();
|
||||
this.getters.nodeCreatorSearchBar().type(nodeDisplayName);
|
||||
|
@ -318,7 +318,6 @@ export class WorkflowPage extends BasePage {
|
|||
this.getters.workflowTagsInput().type(tag);
|
||||
this.getters.workflowTagsInput().type('{enter}');
|
||||
});
|
||||
cy.realPress('Tab');
|
||||
// For a brief moment the Element UI tag component shows the tags as(+X) string
|
||||
// so we need to wait for it to disappear
|
||||
this.getters.workflowTagsContainer().should('not.contain', `+${tags.length}`);
|
||||
|
|
|
@ -8,6 +8,7 @@ export const sharedConfig: StorybookConfig = {
|
|||
'@storybook/addon-essentials',
|
||||
'@storybook/addon-interactions',
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addon-themes',
|
||||
],
|
||||
staticDirs: ['../public'],
|
||||
framework: {
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"@storybook/addon-essentials": "^8.0.0",
|
||||
"@storybook/addon-interactions": "^8.0.0",
|
||||
"@storybook/addon-links": "^8.0.0",
|
||||
"@storybook/addon-themes": "^8.0.0",
|
||||
"@storybook/blocks": "^8.0.0",
|
||||
"@storybook/test": "^8.0.0",
|
||||
"@storybook/vue3": "^8.0.0",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import { setup } from '@storybook/vue3';
|
||||
import { withThemeByDataAttribute } from '@storybook/addon-themes';
|
||||
|
||||
import './storybook.scss';
|
||||
import '../src/css/tailwind/index.css';
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core';
|
||||
import { fas } from '@fortawesome/free-solid-svg-icons';
|
||||
|
@ -59,7 +61,25 @@ export const parameters = {
|
|||
},
|
||||
options: {
|
||||
storySort: {
|
||||
order: ['Docs', 'Styleguide', ['Colors Primitives', 'Colors Tokens', 'Font', 'Spacing', 'Border'], 'Atoms', 'Modules'],
|
||||
order: [
|
||||
'Docs',
|
||||
'Styleguide',
|
||||
['Colors Primitives', 'Colors Tokens', 'Font', 'Spacing', 'Border'],
|
||||
'Atoms',
|
||||
'Modules',
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const decorators = [
|
||||
withThemeByDataAttribute({
|
||||
themes: {
|
||||
light: 'light',
|
||||
dark: 'dark',
|
||||
},
|
||||
defaultTheme: 'light',
|
||||
attributeName: 'data-theme',
|
||||
parentSelector: 'body',
|
||||
}),
|
||||
];
|
||||
|
|
|
@ -41,11 +41,13 @@
|
|||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
"@vue/test-utils": "^2.4.3",
|
||||
"@vue/tsconfig": "^0.5.1",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"core-js": "^3.31.0",
|
||||
"jsdom": "^23.0.1",
|
||||
"postcss": "^8.4.38",
|
||||
"sass": "^1.64.1",
|
||||
"sass-loader": "^13.3.2"
|
||||
"sass-loader": "^13.3.2",
|
||||
"tailwindcss": "^3.4.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.36",
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
||||
|
|
3
packages/design-system/src/css/tailwind/index.css
Normal file
3
packages/design-system/src/css/tailwind/index.css
Normal file
|
@ -0,0 +1,3 @@
|
|||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
8
packages/design-system/tailwind.config.js
Normal file
8
packages/design-system/tailwind.config.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
module.exports = {
|
||||
content: ['./src/**/*.{vue,js,ts}'],
|
||||
darkMode: ['selector', '[data-theme="dark"]'],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
};
|
|
@ -1,5 +1,6 @@
|
|||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -3,6 +3,7 @@ import { createApp } from 'vue';
|
|||
import 'vue-json-pretty/lib/styles.css';
|
||||
import '@jsplumb/browser-ui/css/jsplumbtoolkit.css';
|
||||
import 'n8n-design-system/css/index.scss';
|
||||
import 'n8n-design-system/css/tailwind/index.css';
|
||||
|
||||
import './n8n-theme.scss';
|
||||
|
||||
|
|
8
packages/editor-ui/tailwind.config.js
Normal file
8
packages/editor-ui/tailwind.config.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
module.exports = {
|
||||
content: ['./index.html', './src/**/*.{vue,js,ts}'],
|
||||
darkMode: ['selector', '[data-theme="dark"]'],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
};
|
513
pnpm-lock.yaml
513
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue