Skip to content

Commit 35f5a4a

Browse files
committed
make it scrollable
1 parent fbdb5db commit 35f5a4a

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

packages/next/src/client/components/react-dev-overlay/ui/components/overview/segment-explorer.tsx

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,6 @@ function PageSegmentTreeLayerPresentation({
8787
? staticPathsInfo.staticPaths
8888
: []
8989

90-
const resolvedStaticPaths =
91-
staticPaths.length > 5
92-
? staticPaths
93-
.slice(0, 5)
94-
.concat([
95-
`+${staticPaths.length - 5} more path${
96-
staticPaths.length - 5 === 1 ? '' : 's'
97-
}`,
98-
])
99-
: staticPaths
100-
10190
return (
10291
<div className="segment-explorer-item">
10392
{!fileName || level === 0 ? null : (
@@ -115,7 +104,7 @@ function PageSegmentTreeLayerPresentation({
115104
{pagePathPrefix === '' ? '' : `${pagePathPrefix}/`}
116105
<span className="segment-explorer-filename-path">{fileName}</span>
117106
<div>
118-
{resolvedStaticPaths.map((path) => (
107+
{staticPaths.map((path) => (
119108
<div key={path}>{path}</div>
120109
))}
121110
</div>
@@ -184,6 +173,28 @@ export const DEV_TOOLS_INFO_RENDER_FILES_STYLES = css`
184173
overflow-y: auto;
185174
padding: 0 12px;
186175
font-size: var(--size-14);
176+
max-height: 500px;
177+
178+
&::-webkit-scrollbar {
179+
width: 6px;
180+
height: 6px;
181+
border-radius: 0 0 1rem 1rem;
182+
margin-bottom: 1rem;
183+
}
184+
185+
&::-webkit-scrollbar-button {
186+
display: none;
187+
}
188+
189+
&::-webkit-scrollbar-track {
190+
border-radius: 0 0 1rem 1rem;
191+
background-color: var(--color-background-100);
192+
}
193+
194+
&::-webkit-scrollbar-thumb {
195+
border-radius: 1rem;
196+
background-color: var(--color-gray-500);
197+
}
187198
}
188199
189200
.segment-explorer-item-row {

0 commit comments

Comments
 (0)