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

refactor(editor): N8N-4540 Main navigation layout rework #4060

Merged
merged 24 commits into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d03f439
✨ Implemented new editor layout using css grid
MiloradFilipovic Sep 6, 2022
67a2003
Merge branch 'feature-main-nav-redesign' into N8N-4540-main-nav-layout
MiloradFilipovic Sep 7, 2022
3c50a34
✨ Reworking main navigation layout, migrating some styling to css mod…
MiloradFilipovic Sep 7, 2022
fe35ebc
✨ Reworking main sidebar layout and responsiveness
MiloradFilipovic Sep 7, 2022
b67ce67
💄 Minor type update
MiloradFilipovic Sep 7, 2022
c6831d2
✨ Updated editor grid layout so empty cells are collapsed (`fit-conte…
MiloradFilipovic Sep 8, 2022
61dcb2e
✨ Implemented new user area look & feel in main sidebar
MiloradFilipovic Sep 8, 2022
142ea65
💄 Adjusting sidebar bottom padding when user area is not shown
MiloradFilipovic Sep 8, 2022
ba56e07
💄 CSS cleanup/refactor + minor vue refactoring
MiloradFilipovic Sep 8, 2022
8d569d6
Merge branch 'feature-main-nav-redesign' into N8N-4540-main-nav-layout
MiloradFilipovic Sep 8, 2022
d18e973
✨ Fixing overscoll issue in chrome and scrolling behaviour of the con…
MiloradFilipovic Sep 13, 2022
87c6d0e
Merge branch 'feature-main-nav-redesign' into N8N-4540-main-nav-layout
MiloradFilipovic Sep 13, 2022
56e28ef
👌 Addressing review feedback
MiloradFilipovic Sep 13, 2022
239665b
✨ Added collapsed and expanded versions of n8n logo
MiloradFilipovic Sep 13, 2022
b1cfbf2
✨ Updating infinite scrolling in templates view to work with the new …
MiloradFilipovic Sep 13, 2022
7a5eabf
Merge branch 'feature-main-nav-redesign' into N8N-4540-main-nav-layout
MiloradFilipovic Sep 13, 2022
18b8a0c
💄 Updating main sidebar expanded width and templates view left margin
MiloradFilipovic Sep 13, 2022
cafe806
💄 Updating main content height
MiloradFilipovic Sep 13, 2022
7ae4658
💄 Adding global styles for scrollable views with centered content, mi…
MiloradFilipovic Sep 13, 2022
a4b597b
✨ Updating zoomToFit logic, lasso select box position and new nodes p…
MiloradFilipovic Sep 14, 2022
fd0dc1e
✨ Fixing new node drop position now that mouse detection has been adj…
MiloradFilipovic Sep 14, 2022
8e7ea9d
👌 Updating templates view scroll to top logic and responsive padding,…
MiloradFilipovic Sep 14, 2022
dea8c96
Merge branch 'feature-main-nav-redesign' into N8N-4540-main-nav-layout
MiloradFilipovic Sep 15, 2022
e49fcc8
💄 Moving template layout style from global css class to component level
MiloradFilipovic Sep 15, 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
3 changes: 3 additions & 0 deletions packages/editor-ui/public/n8n-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 31 additions & 14 deletions packages/editor-ui/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
<template>
<div :class="$style.container">
<div :class="$style.app">
<LoadingView v-if="loading" />
<div v-else id="app" :class="$style.container">
<div id="header" :class="$style.header">
<div
v-else
id="app"
:class="{
[$style['container']]: true,
[$style['sidebar-collapsed']]: sidebarMenuCollapsed
MiloradFilipovic marked this conversation as resolved.
Show resolved Hide resolved
}"
>
<div id="header" :class="$style['header']">
<router-view name="header"></router-view>
</div>
<div id="sidebar" :class="$style.sidebar">
<div id="sidebar" :class="$style['sidebar']">
<router-view name="sidebar"></router-view>
</div>
<div id="content" :class="$style.content">
<div id="content" :class="$style['content']">
<router-view />
</div>
<Modals />
Expand Down Expand Up @@ -45,6 +52,7 @@ export default mixins(
computed: {
...mapGetters('settings', ['isHiringBannerEnabled', 'isTemplatesEnabled', 'isTemplatesEndpointReachable', 'isUserManagementEnabled', 'showSetupPage']),
...mapGetters('users', ['currentUser']),
...mapGetters('ui', ['sidebarMenuCollapsed']),
defaultLocale (): string {
return this.$store.getters.defaultLocale;
},
Expand Down Expand Up @@ -178,26 +186,35 @@ export default mixins(
</script>

<style lang="scss" module>
.app {
position: fixed;
MiloradFilipovic marked this conversation as resolved.
Show resolved Hide resolved
height: 100vh;
width: 100%;
overflow: hidden;
MiloradFilipovic marked this conversation as resolved.
Show resolved Hide resolved
}

.container {
display: grid;
grid-template-areas:
"sidebar header"
"sidebar content";
grid-auto-columns: fit-content($--sidebar-expanded-width) 1fr;
grid-template-rows: fit-content($--sidebar-width) 1fr;
height: 100%;
width: 100%;
}

.content {
composes: container;
background-color: var(--color-background-light);
position: relative;
grid-area: content;
}

.header {
z-index: 10;
position: fixed;
width: 100%;
grid-area: header;
z-index: 999;
}

.sidebar {
z-index: 15;
position: fixed;
grid-area: sidebar;
z-index: 999;
}
</style>

7 changes: 0 additions & 7 deletions packages/editor-ui/src/components/MainHeader/MainHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,11 @@ export default mixins(

<style lang="scss">
.main-header {
position: fixed;
top: 0;
background-color: var(--color-background-xlight);
height: 65px;
width: 100%;
box-sizing: border-box;

padding-left: $--sidebar-width;

&.expanded {
padding-left: $--sidebar-expanded-width;
}
}

.top-menu {
Expand Down
Loading