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)`, }} > -
+ + search + No Apps Found + + + } > - - - search - No Apps Found - - - } - > - {(vRow) => ( -
queueMicrotask(() => virtualizer().measureElement(el))}> -
- -
-
- )} -
-
+ {(vRow) => ( +
queueMicrotask(() => virtualizer().measureElement(el))} + style={{ + position: 'absolute', + top: 0, + left: 0, + width: '100%', + height: `${items()[vRow.index]}px`, + transform: `translateY(${vRow.start}px)`, + }} + > + +
+ )} + ) } @@ -264,72 +265,74 @@ export default () => { const [scrollParentRef, setScrollParentRef] = createSignal() return ( - - Apps - NeoShowcase - - - - - {(s) => ( - setScope(s.value)}> - deployed_code - {s.label} - - )} - - - - - - - - - - setQuery(e.currentTarget.value)} - leftIcon={search} - rightIcon={ - + + Apps - NeoShowcase + + + + + {(s) => ( + setScope(s.value)}> + deployed_code + {s.label} + + )} + + + + + + + + + + setQuery(e.currentTarget.value)} + leftIcon={search} + rightIcon={ + + } + /> + + + + + + + + } + > + + - } - /> - - - - - - - - } - > - - - - - - - + + + + + + ) } diff --git a/dashboard/src/pages/apps/[id]/index.tsx b/dashboard/src/pages/apps/[id]/index.tsx index c9e73eca..5cda3a6c 100644 --- a/dashboard/src/pages/apps/[id]/index.tsx +++ b/dashboard/src/pages/apps/[id]/index.tsx @@ -19,7 +19,6 @@ const Container = styled('div', { width: '100%', height: '100%', overflowY: 'auto', - scrollbarGutter: 'stable', }, }) const MainViewContainer = styled('div', {