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
5889a2c4
Commit
5889a2c4
authored
Nov 23, 2025
by
Cursor Agent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Add OpenGraph preview to Next.js dev tools
Co-authored-by:
rob.pruzan
<
rob.pruzan@vercel.com
>
parent
f0af7cd0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
367 additions
and
0 deletions
+367
-0
opengraph-preview.tsx
.../dev-tools-indicator/dev-tools-info/opengraph-preview.tsx
+335
-0
context.tsx
packages/next/src/next-devtools/dev-overlay/menu/context.tsx
+1
-0
panel-router.tsx
.../next/src/next-devtools/dev-overlay/menu/panel-router.tsx
+31
-0
No files found.
packages/next/src/next-devtools/dev-overlay/components/errors/dev-tools-indicator/dev-tools-info/opengraph-preview.tsx
0 → 100644
View file @
5889a2c4
This diff is collapsed.
Click to expand it.
packages/next/src/next-devtools/dev-overlay/menu/context.tsx
View file @
5889a2c4
...
...
@@ -11,6 +11,7 @@ export type PanelStateKind =
|
'segment-explorer'
|
'panel-selector'
|
'turbo-info'
|
'opengraph-preview'
export
const
PanelRouterContext
=
createContext
<
{
panel
:
PanelStateKind
|
null
...
...
packages/next/src/next-devtools/dev-overlay/menu/panel-router.tsx
View file @
5889a2c4
...
...
@@ -7,6 +7,7 @@ import {
}
from
'../components/errors/dev-tools-indicator/dev-tools-info/route-info'
import
{
PageSegmentTree
}
from
'../components/overview/segment-explorer'
import
{
TurbopackInfoBody
}
from
'../components/errors/dev-tools-indicator/dev-tools-info/turbopack-info'
import
{
OpenGraphPreviewBody
}
from
'../components/errors/dev-tools-indicator/dev-tools-info/opengraph-preview'
import
{
DevToolsHeader
}
from
'../components/errors/dev-tools-indicator/dev-tools-info/dev-tools-header'
import
{
useDelayedRender
}
from
'../hooks/use-delayed-render'
import
{
...
...
@@ -105,6 +106,14 @@ const MenuPanel = () => {
'data-segment-explorer'
:
true
,
},
},
{
label
:
'OpenGraph Preview'
,
value
:
<
ChevronRight
/>,
onClick
:
()
=>
setPanel
(
'opengraph-preview'
),
attributes
:
{
'data-opengraph-preview'
:
true
,
},
},
{
label
:
'Preferences'
,
value
:
<
GearIcon
/>,
...
...
@@ -254,6 +263,28 @@ export const PanelRouter = () => {
</
div
>
</
DynamicPanel
>
</
PanelRoute
>
<
PanelRoute
name=
"opengraph-preview"
>
<
DynamicPanel
sharePanelSizeGlobally=
{
false
}
sharePanelPositionGlobally=
{
false
}
draggable
sizeConfig=
{
{
kind
:
'resizable'
,
maxHeight
:
'90vh'
,
maxWidth
:
'90vw'
,
minHeight
:
400
/
state
.
scale
,
minWidth
:
400
/
state
.
scale
,
initialSize
:
{
height
:
600
/
state
.
scale
,
width
:
450
/
state
.
scale
,
},
}
}
header=
{
<
DevToolsHeader
title=
"OpenGraph Preview"
/>
}
>
<
OpenGraphPreviewBody
/>
</
DynamicPanel
>
</
PanelRoute
>
</>
)
}
...
...
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