Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
06bef45f
Commit
06bef45f
authored
Jul 07, 2025
by
Jiachi Liu
Committed by
RobPruzan
Jul 07, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix default boundaries
parent
5fe8a00b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
segment-boundary-trigger.tsx
...-overlay/components/overview/segment-boundary-trigger.tsx
+8
-5
No files found.
packages/next/src/next-devtools/dev-overlay/components/overview/segment-boundary-trigger.tsx
View file @
06bef45f
...
@@ -2,7 +2,10 @@ import { useCallback, useState, useRef, useMemo } from 'react'
...
@@ -2,7 +2,10 @@ import { useCallback, useState, useRef, useMemo } from 'react'
import
{
Menu
}
from
'@base-ui-components/react/menu'
import
{
Menu
}
from
'@base-ui-components/react/menu'
import
type
{
SegmentNodeState
}
from
'../../../userspace/app/segment-explorer-node'
import
type
{
SegmentNodeState
}
from
'../../../userspace/app/segment-explorer-node'
import
{
ChevronDownIcon
}
from
'../../icons/chevron-down'
import
{
ChevronDownIcon
}
from
'../../icons/chevron-down'
import
{
normalizeBoundaryFilename
}
from
'../../../../server/app-render/segment-explorer-path'
import
{
isBoundaryFile
,
normalizeBoundaryFilename
,
}
from
'../../../../server/app-render/segment-explorer-path'
import
{
cx
}
from
'../../utils/cx'
import
{
cx
}
from
'../../utils/cx'
import
{
useClickOutside
}
from
'../errors/dev-tools-indicator/utils'
import
{
useClickOutside
}
from
'../errors/dev-tools-indicator/utils'
...
@@ -71,9 +74,9 @@ export function SegmentBoundaryTrigger({
...
@@ -71,9 +74,9 @@ export function SegmentBoundaryTrigger({
},
[
boundaries
,
possibleExtension
])
},
[
boundaries
,
possibleExtension
])
const
fileName
=
(
pagePath
||
''
).
split
(
'/'
).
pop
()
||
''
const
fileName
=
(
pagePath
||
''
).
split
(
'/'
).
pop
()
||
''
const
isBoundary
File
=
fileType
.
startsWith
(
'boundary:'
)
const
isBoundary
=
isBoundaryFile
(
fileType
)
const
pageFileName
=
normalizeBoundaryFilename
(
const
pageFileName
=
normalizeBoundaryFilename
(
isBoundary
File
isBoundary
?
fileName
// Show the selected boundary file name when overridden
?
fileName
// Show the selected boundary file name when overridden
:
fileName
||
`page.
${
possibleExtension
}
`
:
fileName
||
`page.
${
possibleExtension
}
`
)
)
...
@@ -154,8 +157,8 @@ export function SegmentBoundaryTrigger({
...
@@ -154,8 +157,8 @@ export function SegmentBoundaryTrigger({
[
onSelectBoundary
,
pagePath
,
openInEditor
]
[
onSelectBoundary
,
pagePath
,
openInEditor
]
)
)
// For
layout/templat
e files, just render a simple button to open in editor
// For
non-pag
e files, just render a simple button to open in editor
if
(
fileType
===
'layout'
||
fileType
===
'template'
)
{
if
(
fileType
!==
'page'
&&
!
fileType
.
startsWith
(
'boundary:'
)
)
{
return
(
return
(
<
button
<
button
className=
"segment-boundary-trigger"
className=
"segment-boundary-trigger"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment