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
f33a4b32
Unverified
Commit
f33a4b32
authored
Mar 08, 2025
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
Mar 08, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev-overlay] Dim ignore-listed callstack frames when shown (#76862)
parent
dd4aca4b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
16 deletions
+12
-16
call-stack-frame.tsx
...erlay/ui/components/call-stack-frame/call-stack-frame.tsx
+10
-14
call-stack.tsx
...ev-overlay/ui/components/errors/call-stack/call-stack.tsx
+1
-1
next-test-utils.ts
test/lib/next-test-utils.ts
+1
-1
No files found.
packages/next/src/client/components/react-dev-overlay/ui/components/call-stack-frame/call-stack-frame.tsx
View file @
f33a4b32
...
...
@@ -8,8 +8,7 @@ import { useOpenInEditor } from '../../utils/use-open-in-editor'
export
const
CallStackFrame
:
React
.
FC
<
{
frame
:
OriginalStackFrame
index
:
number
}
>
=
function
CallStackFrame
({
frame
,
index
})
{
}
>
=
function
CallStackFrame
({
frame
})
{
// TODO: ability to expand resolved frames
const
f
:
StackFrame
=
frame
.
originalStackFrame
??
frame
.
sourceStackFrame
...
...
@@ -39,17 +38,10 @@ export const CallStackFrame: React.FC<{
return
(
<
div
data
-
nextjs
-
call
-
stack
-
frame
data
-
nextjs
-
call
-
stack
-
frame
-
ignored=
{
!
hasSource
}
style=
{
{
'--index'
:
index
,
}
as
React
.
CSSProperties
}
data
-
nextjs
-
call
-
stack
-
frame
-
no
-
source=
{
!
hasSource
}
data
-
nextjs
-
call
-
stack
-
frame
-
ignored=
{
frame
.
ignored
}
>
<
div
data
-
nextjs
-
frame
-
expanded=
{
!
frame
.
ignored
}
className=
"call-stack-frame-method-name"
>
<
div
className=
"call-stack-frame-method-name"
>
<
HotlinkedText
text=
{
formattedMethod
}
/>
{
hasSource
&&
(
<
button
onClick=
{
open
}
className=
"open-in-editor-button"
>
...
...
@@ -77,17 +69,21 @@ export const CallStackFrame: React.FC<{
}
export
const
CALL_STACK_FRAME_STYLES
=
`
[data-nextjs-call-stack-frame-
ignored
] {
[data-nextjs-call-stack-frame-
no-source
] {
padding: 6px 8px;
margin-bottom: 4px;
border-radius: var(--rounded-lg);
}
[data-nextjs-call-stack-frame-
ignored
]:last-child {
[data-nextjs-call-stack-frame-
no-source
]:last-child {
margin-bottom: 0;
}
[data-nextjs-call-stack-frame-ignored="true"] {
opacity: 0.6;
}
[data-nextjs-call-stack-frame] {
user-select: text;
display: block;
...
...
packages/next/src/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.tsx
View file @
f33a4b32
...
...
@@ -62,7 +62,7 @@ export function CallStack({ frames, dialogResizerRef }: CallStackProps) {
</
div
>
{
frames
.
map
((
frame
,
frameIndex
)
=>
{
return
!
frame
.
ignored
||
isIgnoreListOpen
?
(
<
CallStackFrame
key=
{
frameIndex
}
frame=
{
frame
}
index=
{
frameIndex
}
/>
<
CallStackFrame
key=
{
frameIndex
}
frame=
{
frame
}
/>
)
:
null
})
}
</
div
>
...
...
test/lib/next-test-utils.ts
View file @
f33a4b32
...
...
@@ -1676,7 +1676,7 @@ export async function getStackFramesContent(browser) {
const
stackFramesContent
=
(
await
Promise
.
all
(
stackFrameElements
.
map
(
async
(
frame
)
=>
{
const
functionNameEl
=
await
frame
.
$
(
'
[data-nextjs-frame-expanded]
'
)
const
functionNameEl
=
await
frame
.
$
(
'
.call-stack-frame-method-name
'
)
const
sourceEl
=
await
frame
.
$
(
'[data-has-source="true"]'
)
const
functionName
=
functionNameEl
?
await
functionNameEl
.
innerText
()
...
...
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