Unverified Commit e2a3e5e1 authored by Jiwon Choi's avatar Jiwon Choi Committed by GitHub

[dev-overlay] add title for the dev indicator menu items (#76510)

parent 0756f552
...@@ -344,6 +344,7 @@ function DevToolsPopover({ ...@@ -344,6 +344,7 @@ function DevToolsPopover({
<div className="dev-tools-indicator-inner"> <div className="dev-tools-indicator-inner">
{issueCount > 0 && ( {issueCount > 0 && (
<MenuItem <MenuItem
title={`${issueCount} ${issueCount === 1 ? 'issue' : 'issues'} found. Click to view details in the dev overlay.`}
index={0} index={0}
label="Issues" label="Issues"
value={<IssueCount>{issueCount}</IssueCount>} value={<IssueCount>{issueCount}</IssueCount>}
...@@ -351,6 +352,7 @@ function DevToolsPopover({ ...@@ -351,6 +352,7 @@ function DevToolsPopover({
/> />
)} )}
<MenuItem <MenuItem
title={`Current route is ${isStaticRoute ? 'static' : 'dynamic'}.`}
label="Route" label="Route"
index={1} index={1}
value={isStaticRoute ? 'Static' : 'Dynamic'} value={isStaticRoute ? 'Static' : 'Dynamic'}
...@@ -358,10 +360,15 @@ function DevToolsPopover({ ...@@ -358,10 +360,15 @@ function DevToolsPopover({
data-nextjs-route-type={isStaticRoute ? 'static' : 'dynamic'} data-nextjs-route-type={isStaticRoute ? 'static' : 'dynamic'}
/> />
{isTurbopack ? ( {isTurbopack ? (
<MenuItem label="Turbopack" value="Enabled" /> <MenuItem
title="Turbopack is enabled."
label="Turbopack"
value="Enabled"
/>
) : ( ) : (
<MenuItem <MenuItem
index={2} index={2}
title="Learn about Turbopack and how to enable it in your application."
label="Try Turbopack" label="Try Turbopack"
value={<ChevronRight />} value={<ChevronRight />}
onClick={() => setIsTurbopackInfoOpen(true)} onClick={() => setIsTurbopackInfoOpen(true)}
...@@ -372,6 +379,7 @@ function DevToolsPopover({ ...@@ -372,6 +379,7 @@ function DevToolsPopover({
<div className="dev-tools-indicator-footer"> <div className="dev-tools-indicator-footer">
<MenuItem <MenuItem
data-hide-dev-tools data-hide-dev-tools
title="Hide Dev Tools for the current server session or a day."
label="Hide Dev Tools" label="Hide Dev Tools"
value={<StopIcon />} value={<StopIcon />}
onClick={hide} onClick={hide}
...@@ -407,6 +415,7 @@ function MenuItem({ ...@@ -407,6 +415,7 @@ function MenuItem({
...props ...props
}: { }: {
index?: number index?: number
title?: string
label: string label: string
value: React.ReactNode value: React.ReactNode
href?: string href?: string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment