From aee8912c01a72eb8cc5766b11ed7ac8c9818900c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milorad=20FIlipovi=C4=87?= Date: Thu, 15 Sep 2022 10:01:41 +0200 Subject: [PATCH 01/39] refactor(editor): N8N-4540 Main navigation layout rework (#4060) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ Implemented new editor layout using css grid * ✨ Reworking main navigation layout, migrating some styling to css modules * ✨ Reworking main sidebar layout and responsiveness * 💄 Minor type update * ✨ Updated editor grid layout so empty cells are collapsed (`fit-content`), fixed updates menu items styling * ✨ Implemented new user area look & feel in main sidebar * 💄 Adjusting sidebar bottom padding when user area is not shown * 💄 CSS cleanup/refactor + minor vue refactoring * ✨ Fixing overscoll issue in chrome and scrolling behaviour of the content view * 👌 Addressing review feedback * ✨ Added collapsed and expanded versions of n8n logo * ✨ Updating infinite scrolling in templates view to work with the new layout * 💄 Updating main sidebar expanded width and templates view left margin * 💄 Updating main content height * 💄 Adding global styles for scrollable views with centered content, minor updates to user area * ✨ Updating zoomToFit logic, lasso select box position and new nodes positioning * ✨ Fixing new node drop position now that mouse detection has been adjusted * 👌 Updating templates view scroll to top logic and responsive padding, aligning menu items titles * 💄 Moving template layout style from global css class to component level --- packages/design-system/theme/src/reset.scss | 2 +- .../editor-ui/public/n8n-logo-collapsed.svg | 3 + .../editor-ui/public/n8n-logo-expanded.svg | 6 + packages/editor-ui/src/App.vue | 48 +- .../src/components/MainHeader/MainHeader.vue | 7 - .../editor-ui/src/components/MainSidebar.vue | 715 ++++++++++-------- .../editor-ui/src/components/TemplateList.vue | 10 +- .../src/components/mixins/mouseSelect.ts | 5 +- packages/editor-ui/src/modules/ui.ts | 3 + packages/editor-ui/src/n8n-theme.scss | 2 +- packages/editor-ui/src/plugins/icons.ts | 2 + packages/editor-ui/src/views/NodeView.vue | 19 +- .../src/views/TemplatesCollectionView.vue | 11 +- .../src/views/TemplatesSearchView.vue | 11 +- .../editor-ui/src/views/TemplatesView.vue | 12 +- .../src/views/TemplatesWorkflowView.vue | 10 +- packages/editor-ui/src/views/canvasHelpers.ts | 11 +- 17 files changed, 494 insertions(+), 383 deletions(-) create mode 100644 packages/editor-ui/public/n8n-logo-collapsed.svg create mode 100644 packages/editor-ui/public/n8n-logo-expanded.svg diff --git a/packages/design-system/theme/src/reset.scss b/packages/design-system/theme/src/reset.scss index 6688cb9621eef..546de883be185 100644 --- a/packages/design-system/theme/src/reset.scss +++ b/packages/design-system/theme/src/reset.scss @@ -15,7 +15,7 @@ html { body { height: 100%; width: 100%; - overscroll-behavior-x: none; + overscroll-behavior: none; line-height: 1; font-size: var(--font-size-m); font-weight: var(--font-weight-regular); diff --git a/packages/editor-ui/public/n8n-logo-collapsed.svg b/packages/editor-ui/public/n8n-logo-collapsed.svg new file mode 100644 index 0000000000000..62e0c21bb7486 --- /dev/null +++ b/packages/editor-ui/public/n8n-logo-collapsed.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/editor-ui/public/n8n-logo-expanded.svg b/packages/editor-ui/public/n8n-logo-expanded.svg new file mode 100644 index 0000000000000..29dbf38f910e8 --- /dev/null +++ b/packages/editor-ui/public/n8n-logo-expanded.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/editor-ui/src/App.vue b/packages/editor-ui/src/App.vue index f48dcfb2176f7..09a06b373851d 100644 --- a/packages/editor-ui/src/App.vue +++ b/packages/editor-ui/src/App.vue @@ -1,14 +1,21 @@