diff --git a/dashboard/src/components/layouts/WithHeader.tsx b/dashboard/src/components/layouts/WithHeader.tsx index da216c07..68dad83d 100644 --- a/dashboard/src/components/layouts/WithHeader.tsx +++ b/dashboard/src/components/layouts/WithHeader.tsx @@ -15,7 +15,7 @@ const Body = styled('div', { base: { width: '100%', height: '100%', - overflowY: 'hidden', + overflowY: 'auto', }, }) diff --git a/dashboard/src/components/layouts/WithNav.tsx b/dashboard/src/components/layouts/WithNav.tsx index 27fdd38b..1ff9f61b 100644 --- a/dashboard/src/components/layouts/WithNav.tsx +++ b/dashboard/src/components/layouts/WithNav.tsx @@ -6,8 +6,8 @@ const Container = styled('div', { width: '100%', height: '100%', display: 'grid', - gridTemplateColumns: '1fr', - gridTemplateRows: 'auto 1fr', + gridTemplateColumns: 'minmax(0, 1fr)', + gridTemplateRows: 'max-content 1fr', }, }) const Navs = styled('div', { @@ -22,8 +22,6 @@ const Body = styled('div', { base: { position: 'relative', width: '100%', - height: '100%', - overflowY: 'hidden', }, }) const TabContainer = styled('div', { diff --git a/dashboard/src/pages/apps.tsx b/dashboard/src/pages/apps.tsx index 6163af58..909a3a8e 100644 --- a/dashboard/src/pages/apps.tsx +++ b/dashboard/src/pages/apps.tsx @@ -28,9 +28,10 @@ import { colorVars, media } from '../theme' const MainView = styled('div', { base: { position: 'relative', + display: 'flex', + flexDirection: 'column', width: '100%', height: '100%', - overflowY: 'auto', padding: '0 max(calc(50% - 500px), 32px)', background: colorVars.semantic.ui.background, @@ -43,16 +44,12 @@ const MainView = styled('div', { }) const FilterContainer = styled('div', { base: { - position: 'sticky', width: '100%', - top: '0', - left: '0', padding: '40px 0 32px', zIndex: 1, display: 'flex', alignItems: 'center', justifyContent: 'center', - background: `linear-gradient(0deg, rgba(255,255,255,0), ${colorVars.semantic.ui.background} 20px)`, }, }) const Repositories = styled('div', { @@ -187,7 +184,10 @@ const AppsList: Component<{ count: filteredRepos().length, getScrollElement: () => props.parentRef, estimateSize: (i) => 76 + 16 + filteredRepos()[i].apps.length * 80, + // scrollParentRef内に高さ120pxのFilterContainerが存在するため、この分を設定 + scrollMargin: 120, paddingEnd: 72, + gap: 16, }), ) @@ -199,41 +199,42 @@ const AppsList: Component<{ width: '100%', height: `${virtualizer().getTotalSize()}px`, position: 'relative', + // scrollParentRef内に高さ120pxのFilterContainerが存在するため、この分を減算 + transform: `translateY(${-virtualizer().options.scrollMargin}px)`, }} > -