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
8b675c9b
Commit
8b675c9b
authored
Jul 03, 2025
by
Jiachi Liu
Committed by
RobPruzan
Jul 07, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trigger the actual same level boundary
parent
7f7c87bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
14 deletions
+30
-14
layout-router.tsx
packages/next/src/client/components/layout-router.tsx
+16
-0
segment-explorer-node.tsx
...src/next-devtools/userspace/app/segment-explorer-node.tsx
+14
-14
No files found.
packages/next/src/client/components/layout-router.tsx
View file @
8b675c9b
...
...
@@ -615,6 +615,21 @@ export default function OuterLayoutRouter({
?
RenderChildren
:
ErrorBoundary
let
segmentBoundaryTriggerNode
:
React
.
ReactNode
=
null
if
(
process
.
env
.
NODE_ENV
!==
'production'
&&
process
.
env
.
__NEXT_DEVTOOL_SEGMENT_EXPLORER
)
{
const
{
SegmentBoundaryTriggerNode
}
=
require
(
'../../next-devtools/userspace/app/segment-explorer-node'
)
as
typeof
import
(
'../../next-devtools/userspace/app/segment-explorer-node'
)
segmentBoundaryTriggerNode
=
(
<>
<
SegmentBoundaryTriggerNode
/>
</>
)
}
// TODO: The loading module data for a segment is stored on the parent, then
// applied to each of that parent segment's parallel route slots. In the
// simple case where there's only one parallel route (the `children` slot),
...
...
@@ -647,6 +662,7 @@ export default function OuterLayoutRouter({
cacheNode=
{
cacheNode
}
segmentPath=
{
segmentPath
}
/>
{
segmentBoundaryTriggerNode
}
</
RedirectBoundary
>
</
HTTPAccessFallbackBoundary
>
</
LoadingBoundary
>
...
...
packages/next/src/next-devtools/userspace/app/segment-explorer-node.tsx
View file @
8b675c9b
...
...
@@ -76,6 +76,19 @@ export function SegmentViewStateNode({ page }: { page: string }) {
return
null
}
export
function
SegmentBoundaryTriggerNode
()
{
const
{
boundaryType
}
=
useSegmentState
()
let
segmentNode
:
React
.
ReactNode
=
null
if
(
boundaryType
===
'loading'
)
{
segmentNode
=
<
LoadingSegmentNode
/>
}
else
if
(
boundaryType
===
'not-found'
)
{
segmentNode
=
<
NotFoundSegmentNode
/>
}
else
if
(
boundaryType
===
'error'
)
{
segmentNode
=
<
ErrorSegmentNode
/>
}
return
segmentNode
}
export
function
SegmentViewNode
({
type
,
pagePath
,
...
...
@@ -85,22 +98,9 @@ export function SegmentViewNode({
pagePath
:
string
children
?:
ReactNode
}):
React
.
ReactNode
{
const
{
boundaryType
}
=
useSegmentState
()
const
isChildBoundary
=
type
!==
'layout'
&&
type
!==
'template'
let
segmentNode
=
(
const
segmentNode
=
(
<
SegmentTrieNode
key=
{
type
}
type=
{
type
}
pagePath=
{
pagePath
}
/>
)
if
(
boundaryType
&&
boundaryType
!==
type
&&
isChildBoundary
)
{
if
(
boundaryType
===
'loading'
)
{
segmentNode
=
<
LoadingSegmentNode
/>
}
else
if
(
boundaryType
===
'not-found'
)
{
segmentNode
=
<
NotFoundSegmentNode
/>
}
else
if
(
boundaryType
===
'error'
)
{
segmentNode
=
<
ErrorSegmentNode
/>
}
}
return
(
<>
...
...
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