diff --git a/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-footer-on-desktop.jpg b/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-footer-on-desktop.jpg index 21a0f633fe..fad9dcdd09 100644 Binary files a/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-footer-on-desktop.jpg and b/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-footer-on-desktop.jpg differ diff --git a/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-footer-on-mobile.jpg b/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-footer-on-mobile.jpg index 59e6f658ab..7392f66293 100644 Binary files a/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-footer-on-mobile.jpg and b/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-footer-on-mobile.jpg differ diff --git a/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-hamburger-menu-on-mobile.jpg b/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-hamburger-menu-on-mobile.jpg index 36883b70e7..7e0a12c8ac 100644 Binary files a/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-hamburger-menu-on-mobile.jpg and b/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-hamburger-menu-on-mobile.jpg differ diff --git a/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-screen-on-mobile.jpg b/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-screen-on-mobile.jpg index 340d993e6c..7d028d50f1 100644 Binary files a/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-screen-on-mobile.jpg and b/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-screen-on-mobile.jpg differ diff --git a/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-screen.jpg b/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-screen.jpg index 5e3e39871f..180ded343c 100644 Binary files a/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-screen.jpg and b/e2e/tests/__image_snapshots__/homepage.feature/feature-homepage-looks-fine-test-homepage-screen.jpg differ diff --git a/site/site.yml b/site/site.yml index 3b4c52db8b..9bce0a576d 100644 --- a/site/site.yml +++ b/site/site.yml @@ -21,10 +21,17 @@ rewriteRules: "CONTRIBUTING.md": "/introduction/contributing" "docs/INSTALLATION_GUIDE.md": "/introduction" "docs/BROWSER_SUPPORT.md": "/introduction/browser-support" + "src/modules/esl-base-element/README.md": "/core/esl-base-element" "src/modules/esl-mixin-element/README.md": "/core/esl-mixin-element" "src/modules/esl-media-query/README.md": "/core/esl-media-query" "src/modules/esl-traversing-query/README.md": "/core/esl-traversing-query" + "src/modules/esl-event-listener/README.md": "/core/esl-event-listener" + "src/modules/esl-event-listener/docs/1-overview.md": "/core/esl-event-listener/overview" + "src/modules/esl-event-listener/docs/2-public-api.md": "/core/esl-event-listener/public-api" + "src/modules/esl-event-listener/docs/3-extended-targets.md": "/core/esl-event-listener/extended-targets" + "src/modules/esl-event-listener/docs/4-core-support.md": "/core/esl-event-listener/core-support" + "src/modules/esl-trigger/README.md": "/components/esl-trigger" "src/modules/esl-toggleable/README.md": "/components/esl-toggleable" "src/modules/esl-tab/README.md": "/components/esl-tab" diff --git a/site/src/navigation/sidebar/sidebar-content.less b/site/src/navigation/sidebar/sidebar-content.less index 571542d0de..263535364b 100644 --- a/site/src/navigation/sidebar/sidebar-content.less +++ b/site/src/navigation/sidebar/sidebar-content.less @@ -21,7 +21,6 @@ esl-d-sidebar { margin: 0 2px; padding: 0 8px; align-items: center; - margin-bottom: 20px; color: inherit; text-decoration: none; @@ -39,13 +38,12 @@ esl-d-sidebar { .sidebar-title { flex: 1 0 auto; - padding-left: 2px; + padding-inline: 16px; overflow: hidden; font-size: 0.95rem; font-weight: 600; line-height: 20px; - text-align: center; text-transform: uppercase; opacity: 1; @@ -63,7 +61,8 @@ esl-d-sidebar { height: 100%; margin-top: 0; - @media @md-lg { + + @media @md-xl { margin-top: 30px; } } diff --git a/site/src/navigation/sidebar/sidebar-primary-nav.less b/site/src/navigation/sidebar/sidebar-primary-nav.less index 3286013857..a47899c652 100644 --- a/site/src/navigation/sidebar/sidebar-primary-nav.less +++ b/site/src/navigation/sidebar/sidebar-primary-nav.less @@ -112,9 +112,7 @@ esl-d-sidebar { transform-origin: center; transition: transform 0.5s ease-in-out; } - .sidebar-nav-item-trigger[active] { - &.sidebar-nav-item-arrow::after { - transform: rotate(180deg); - } + .sidebar-nav-item-arrow[active]::after { + transform: rotate(180deg); } } diff --git a/site/src/navigation/sidebar/sidebar-seccondary-nav.less b/site/src/navigation/sidebar/sidebar-seccondary-nav.less index cb168ca339..4012f19f88 100644 --- a/site/src/navigation/sidebar/sidebar-seccondary-nav.less +++ b/site/src/navigation/sidebar/sidebar-seccondary-nav.less @@ -4,19 +4,24 @@ esl-d-sidebar { .sidebar-nav-secondary { width: 100%; } + .sidebar-nav-secondary-list { padding: 2px 0; } + .sidebar-nav-secondary-item { display: block; position: relative; - padding: 10px 35px 10px 70px; + padding-block: 10px; + padding-inline-end: 35px; + padding-inline-start: var(--padding-inline-start); + --padding-inline-start: 70px; @media @sm { - padding-left: 81px; + --padding-inline-start: 81px; } @media @md-xl { - padding-left: 66px; + --padding-inline-start: 66px; } &.active { @@ -27,7 +32,40 @@ esl-d-sidebar { fade(@nav-dark-selected, 0%) ); } + + &.sidebar-nav-item-container { + padding: 0; + } + + .sidebar-nav-item-heading { + display: block; + padding-block: 10px; + padding-inline-end: 35px; + padding-inline-start: var(--padding-inline-start); + + .sidebar-nav-secondary-link { + display: inline-block; + } + + .sidebar-nav-item-trigger { + display: inline-block; + position: relative; + margin: 0; + + // Extra click area + &::before { + content: ''; + position: absolute; + inset: -5px; + } + } + } + + .sidebar-nav-secondary-item { + padding-inline-start: calc(var(--padding-inline-start) + 30px); + } } + .sidebar-nav-secondary-link { display: block; font-size: 1rem; diff --git a/site/src/navigation/sidebar/sidebar-share.less b/site/src/navigation/sidebar/sidebar-share.less index 498ef828eb..064d3c0c62 100644 --- a/site/src/navigation/sidebar/sidebar-share.less +++ b/site/src/navigation/sidebar/sidebar-share.less @@ -20,15 +20,13 @@ esl-d-sidebar { padding-left: 36px; } - .esl-share { + .esl-share-list { + max-width: 100%; display: flex; align-items: center; - } + justify-content: space-between; - .esl-share-list { - max-width: 100%; - flex: 0 0 auto; - margin: 0 -5px; // Offset for facebook icon + margin: 0 -4px; // Offset for facebook icon gap: 1.75rem; @media @sm-xl { gap: 0.65rem; diff --git a/site/src/navigation/sidebar/sidebar.less b/site/src/navigation/sidebar/sidebar.less index bcfcc6d021..b623b8f5a9 100644 --- a/site/src/navigation/sidebar/sidebar.less +++ b/site/src/navigation/sidebar/sidebar.less @@ -1,6 +1,12 @@ @import (reference) '../../common/variables.less'; esl-d-sidebar { + --esl-sidebar-width: 100vw; + --esl-sidebar-width-closed: 72px; + @media @sm-xl { + --esl-sidebar-width: 21rem; + } + display: block; @media print { display: none; @@ -36,13 +42,7 @@ esl-d-sidebar { &, & .sidebar-content { - width: 100vw; - @media @sm { - width: 20rem; - } - @media @md-xl { - width: 16.875rem; - } + width: var(--esl-sidebar-width); } @media @xs-sm { @@ -58,19 +58,15 @@ esl-d-sidebar { @media @md-xl { position: relative; top: 0; + max-width: var(--esl-sidebar-width-closed); height: var(--100vh, 100vh); - max-width: 72px; - @supports (height: 100dvh) { height: 100dvh; } } &.open { - max-width: 100vw; - @media @md-xl { - max-width: 16.875rem; - } + max-width: var(--esl-sidebar-width); } @media @md-xl { diff --git a/site/src/navigation/sidebar/sidebar.ts b/site/src/navigation/sidebar/sidebar.ts index bff878df52..39b45f6624 100644 --- a/site/src/navigation/sidebar/sidebar.ts +++ b/site/src/navigation/sidebar/sidebar.ts @@ -15,7 +15,7 @@ export class ESLDemoSidebar extends ESLToggleable { @prop() public override closeOnEsc = true; @prop() public override closeOnOutsideAction = true; - @prop() public submenus: string = '.sidebar-nav-secondary'; + @prop() public submenus: string = 'esl-panel'; @prop() public activeMenuAttr: string = 'data-open'; @boolAttr({name: 'animation'}) protected _animation: boolean; @@ -44,9 +44,13 @@ export class ESLDemoSidebar extends ESLToggleable { } public expandActive(noAnimate: boolean = false): void { - this.$submenus - .filter((menu) => menu.hasAttribute('data-open')) - .forEach((menu) => menu.show({noAnimate, activator: this})); + const $open = this.$submenus.filter((menu) => menu.hasAttribute('data-open')); + const $children = $open.filter((menu) => !!menu.parentElement?.closest(this.submenus)); + const $roots = $open.filter((menu) => !$children.includes(menu)); + + // TODO: fix order on ESLPanel level + $children.forEach(($menu) => $menu.show({noAnimate: true, activator: this})); + $roots.forEach(($menu) => $menu.show({noAnimate, activator: this})); } protected override updateA11y(): void { diff --git a/site/src/playground/ui-playground.ts b/site/src/playground/ui-playground.ts index 819d1f04d1..801b3519d7 100644 --- a/site/src/playground/ui-playground.ts +++ b/site/src/playground/ui-playground.ts @@ -15,10 +15,17 @@ UIPRenderingTemplatesService.add('default', ` {title} + - +
{content}
diff --git a/site/views/_includes/navigation/footer-menu.njk b/site/views/_includes/navigation/footer-menu.njk index 3196f6f689..d62cd6602b 100644 --- a/site/views/_includes/navigation/footer-menu.njk +++ b/site/views/_includes/navigation/footer-menu.njk @@ -8,7 +8,7 @@ close-on-esc>