From 22282d24805cfd904b4778613e2816a62c10f199 Mon Sep 17 00:00:00 2001 From: safavimohadeseh78 Date: Mon, 10 Aug 2026 18:54:02 +0200 Subject: [PATCH] Fix desktop shell scroll, product cards, and profile/order layouts. Co-authored-by: Cursor --- src/assets/styles/app-shell.css | 58 +++++++ src/assets/styles/desktop-pages.css | 11 +- src/assets/styles/desktop.css | 23 +-- src/components/layout/DesktopHeader.vue | 6 +- src/components/layout/DesktopSidebar.vue | 31 ++-- src/components/orders/OrderStatusHero.vue | 40 +++-- src/views/cart/CartView.vue | 6 + src/views/cart/components/DesktopCartPage.vue | 14 +- src/views/orders/OrderDetailView.vue | 112 +++++++++++-- .../orders/components/DesktopOrdersPage.vue | 4 - .../components/DesktopProductPage.vue | 32 ++-- src/views/profile/ProfileEditView.vue | 148 ++++++++++++------ .../components/ProfileSubpageLayout.vue | 23 ++- 13 files changed, 375 insertions(+), 133 deletions(-) diff --git a/src/assets/styles/app-shell.css b/src/assets/styles/app-shell.css index ca2ddcf..ad078b6 100644 --- a/src/assets/styles/app-shell.css +++ b/src/assets/styles/app-shell.css @@ -99,8 +99,47 @@ background: var(--color-page-background); } + .app-shell--with-nav .app-layout { + position: relative; + } + + /* One continuous divider under sidebar brand + top header */ + .app-shell--with-nav .app-layout::after { + content: ''; + position: absolute; + top: var(--header-height); + inset-inline: 0; + height: 1px; + background: var(--color-border); + z-index: 30; + pointer-events: none; + } + + /* + * Scroll lives on app-main__content. Children must not shrink+clip + * (flex + overflow:hidden), or short viewports hide the bottom of pages. + */ .app-shell--with-nav .app-main__content { + overflow-x: hidden; overflow-y: auto; + overscroll-behavior: contain; + -webkit-overflow-scrolling: touch; + } + + .app-shell--with-nav .app-content, + .app-shell--with-nav .page-transition { + flex: 1 0 auto; + min-height: min-content; + overflow: visible; + } + + /* Let route roots grow with content so the shell scroll area can work */ + .app-shell--with-nav .page-transition > * { + flex: 1 0 auto; + min-height: min-content; + height: auto; + max-height: none; + overflow: visible; } } @@ -117,6 +156,8 @@ width: 100%; height: auto; max-height: calc(100dvh - 32px); + min-height: 0; + overflow: hidden; } .app-shell--no-nav .app-frame { @@ -124,9 +165,24 @@ width: 100%; height: auto; max-height: calc(100dvh - 32px); + min-height: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-frame); background: var(--color-surface); + overflow-x: hidden; + overflow-y: auto; + overscroll-behavior: contain; + -webkit-overflow-scrolling: touch; +} + +.app-shell--no-nav .app-main, +.app-shell--no-nav .app-main__content, +.app-shell--no-nav .app-content, +.app-shell--no-nav .page-transition { + flex: 1 0 auto; + min-height: min-content; + overflow: visible; + height: auto; } .app-shell--no-nav .app-content { @@ -135,6 +191,8 @@ .app-shell--no-nav .page { background: transparent; + overflow: visible; + min-height: auto; } .app-shell--no-nav.app-shell--wide .app-layout, diff --git a/src/assets/styles/desktop-pages.css b/src/assets/styles/desktop-pages.css index 4e67402..e56a833 100644 --- a/src/assets/styles/desktop-pages.css +++ b/src/assets/styles/desktop-pages.css @@ -2,10 +2,10 @@ @media (min-width: 768px) { .desktop-page { - flex: 1; + flex: 1 0 auto; display: flex; flex-direction: column; - min-height: 0; + min-height: auto; width: 100%; max-width: var(--content-max-width); margin-inline: auto; @@ -32,14 +32,13 @@ .desktop-two-col { display: grid; - grid-template-columns: minmax(0, 1fr) var(--summary-panel-width, 320px); + grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; } .desktop-two-col__main { min-width: 0; - overflow: hidden; } .desktop-summary-panel { @@ -218,6 +217,10 @@ margin-bottom: 24px; } + .desktop-two-col:has(> .desktop-summary-panel) { + grid-template-columns: minmax(0, 1fr) var(--summary-panel-width, 320px); + } + .desktop-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; diff --git a/src/assets/styles/desktop.css b/src/assets/styles/desktop.css index 57460f7..946f035 100644 --- a/src/assets/styles/desktop.css +++ b/src/assets/styles/desktop.css @@ -12,11 +12,15 @@ max-width: var(--content-max-width); margin-inline: auto; width: 100%; + overflow: visible; + min-height: auto; + flex: 1 0 auto; } .page__scroll { overflow: visible; flex: none; + min-height: auto; } .page__scroll--with-nav { @@ -201,25 +205,6 @@ background: var(--color-primary-hover); } - .orders-toolbar__layout-btn { - width: 40px; - height: 40px; - border: 1px solid var(--color-border); - border-radius: var(--radius-sm); - background: var(--color-surface); - color: var(--color-text-muted); - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; - padding: 0; - } - - .orders-toolbar__layout-btn:hover { - border-color: var(--color-primary); - color: var(--color-primary); - } - .orders-toolbar__pills { display: flex; align-items: center; diff --git a/src/components/layout/DesktopHeader.vue b/src/components/layout/DesktopHeader.vue index d6c7689..08cbeca 100644 --- a/src/components/layout/DesktopHeader.vue +++ b/src/components/layout/DesktopHeader.vue @@ -99,12 +99,16 @@ function logout() { display: none; flex-shrink: 0; height: var(--header-height); + min-height: var(--header-height); + max-height: var(--header-height); + box-sizing: border-box; align-items: center; justify-content: space-between; gap: 24px; padding: 0 28px; background: var(--color-surface); - border-bottom: 1px solid var(--color-border); + /* Border drawn by shared shell rule so it aligns with the sidebar brand */ + border-bottom: none; } @media (min-width: 768px) { diff --git a/src/components/layout/DesktopSidebar.vue b/src/components/layout/DesktopSidebar.vue index b894521..3253c20 100644 --- a/src/components/layout/DesktopSidebar.vue +++ b/src/components/layout/DesktopSidebar.vue @@ -80,7 +80,7 @@ function navigate(item: (typeof DESKTOP_NAV_ITEMS)[number]) { height: 100%; background: var(--color-surface); border-inline-start: 1px solid var(--color-border); - padding: 20px 12px; + padding: 0; overflow-y: auto; } @@ -90,25 +90,24 @@ function navigate(item: (typeof DESKTOP_NAV_ITEMS)[number]) { } } -@media (min-width: 1200px) { - .desktop-sidebar { - padding: 24px 16px; - } -} - .desktop-sidebar__brand { display: flex; align-items: center; justify-content: flex-start; gap: 10px; - padding: 0 8px 20px; - margin-bottom: 8px; - border-bottom: 1px solid var(--color-border); + flex-shrink: 0; + height: var(--header-height); + min-height: var(--header-height); + max-height: var(--header-height); + box-sizing: border-box; + padding: 0 20px; + /* Border drawn by shared shell rule so it aligns with the top header */ + border-bottom: none; } @media (min-width: 1200px) { .desktop-sidebar__brand { - padding: 0 12px 24px; + padding: 0 28px; } } @@ -138,6 +137,13 @@ function navigate(item: (typeof DESKTOP_NAV_ITEMS)[number]) { flex-direction: column; gap: 4px; flex: 1; + padding: 12px 12px 0; +} + +@media (min-width: 1200px) { + .desktop-sidebar__nav { + padding: 16px 16px 0; + } } .desktop-sidebar__item { @@ -222,7 +228,7 @@ function navigate(item: (typeof DESKTOP_NAV_ITEMS)[number]) { display: flex; flex-direction: column; gap: 8px; - margin-top: auto; + margin: auto 12px 20px; padding: 14px; background: var(--color-primary-soft); border-radius: var(--radius-lg); @@ -230,6 +236,7 @@ function navigate(item: (typeof DESKTOP_NAV_ITEMS)[number]) { @media (min-width: 1200px) { .desktop-sidebar__support { + margin: auto 16px 24px; padding: 16px; } } diff --git a/src/components/orders/OrderStatusHero.vue b/src/components/orders/OrderStatusHero.vue index 981d9fa..76f7041 100644 --- a/src/components/orders/OrderStatusHero.vue +++ b/src/components/orders/OrderStatusHero.vue @@ -1,17 +1,23 @@ @@ -97,6 +97,10 @@ function goBack() { padding: 20px 16px; } +.profile-subpage-desktop__head { + max-width: 720px; +} + .profile-subpage-desktop__back { display: inline-flex; align-items: center; @@ -106,13 +110,20 @@ function goBack() { border: none; background: none; color: var(--color-primary); + font-family: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; } -.profile-subpage-desktop__card { - max-width: 560px; - padding: 24px; +.profile-subpage-desktop__back:hover { + color: var(--color-primary-hover); +} + +.profile-subpage-desktop__panel { + width: 100%; + max-width: 720px; + padding: 28px; + box-shadow: var(--shadow-card); }