Skip to content

Commit 5bbd2f7

Browse files
authored
Merge branch 'canary' into 02-26-_dev-overlay_control_dark_theme_in_one_place
2 parents 7b45519 + d222ece commit 5bbd2f7

File tree

6 files changed

+24
-45
lines changed

6 files changed

+24
-45
lines changed

docs/01-app/03-building-your-application/07-configuring/16-debugging.mdx

+1-9
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,7 @@ Debugging server-side code works similarly to client-side debugging. When search
151151

152152
When you encounter an error, inspecting the source code can help trace the root cause of errors.
153153

154-
Next.js will display a Node.js logo like a green button on the dev overlay. By clicking that button, the DevTools URL is copied to your clipboard. You can open a new browser tab with that URL to inspect the Next.js server process.
155-
156-
<Image
157-
alt="Copy DevTools url example"
158-
srcLight="/docs/dark/copy-devtool-url-example.png"
159-
srcDark="/docs/dark/copy-devtool-url-example.png"
160-
width="1600"
161-
height="594"
162-
/>
154+
Next.js will display a Node.js icon underneath the Next.js version indicator on the error overlay. By clicking that icon, the DevTools URL is copied to your clipboard. You can open a new browser tab with that URL to inspect the Next.js server process.
163155

164156
### Debugging on Windows
165157

Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
---
22
title: devIndicators
3-
description: Optimized pages include an indicator to let you know if it's being statically optimized. You can opt-out of it here.
3+
description: Configuration options for the on-screen indicator that gives context about the current route you're viewing during development.
44
---
55

6-
{/* The content of this doc is shared between the app and pages router. You can use the `<PagesOnly>Content</PagesOnly>` component to add content that is specific to the Pages Router. Any shared content should not be wrapped in a component. */}
7-
8-
<AppOnly>
9-
10-
`devIndicators` allows you to configure the on-screen indicators that give context about the current route you're viewing during development.
6+
`devIndicators` allows you to configure the on-screen indicator that gives context about the current route you're viewing during development.
117

128
```ts filename="Types"
13-
devIndicators: {
14-
buildActivityPosition?: 'bottom-right'
9+
devIndicators: false | {
10+
position?: 'bottom-right'
1511
| 'bottom-left'
1612
| 'top-right'
17-
| 'top-left', // defaults to 'bottom-right'
13+
| 'top-left', // defaults to 'bottom-left',
1814
},
1915
```
2016

17+
Setting `devIndicators` to `false` will hide the indicator, however Next.js will continue to surface any build or runtime errors that were encountered.
18+
2119
## Troubleshooting
2220

23-
### Static route not showing the indicator
21+
### Indicator not marking a route as static
2422

25-
If you expect a route to be static and the indicator is enabled but not showing, it's likely the route has opted out of static rendering.
23+
If you expect a route to be static and the indicator has marked it as dynamic, it's likely the route has opted out of static rendering.
2624

2725
You can confirm if a route is [static](/docs/app/building-your-application/rendering/server-components#static-rendering-default) or [dynamic](/docs/app/building-your-application/rendering/server-components#dynamic-rendering) by building your application using `next build --debug`, and checking the output in your terminal. Static (or prerendered) routes will display a `` symbol, whereas dynamic routes will display a `ƒ` symbol. For example:
2826

@@ -35,6 +33,8 @@ Route (app) Size First Load JS
3533
ƒ (Dynamic) server-rendered on demand
3634
```
3735

36+
<AppOnly>
37+
3838
There are two reasons a route might opt out of static rendering:
3939

4040
- The presence of [Dynamic APIs](/docs/app/building-your-application/rendering/server-components#dynamic-apis) which rely on runtime information.
@@ -46,20 +46,6 @@ Check your route for any of these conditions, and if you are not able to statica
4646

4747
<PagesOnly>
4848

49-
> **Good to know**: This indicator was removed in Next.js version 10.0.1. We recommend upgrading to the latest version of Next.js.
50-
51-
When a page qualifies for [Automatic Static Optimization](/docs/pages/building-your-application/rendering/automatic-static-optimization) we show an indicator to let you know.
52-
53-
This is helpful since automatic static optimization can be very beneficial and knowing immediately in development if the page qualifies can be useful.
54-
55-
In some cases this indicator might not be useful, like when working on electron applications. To remove it open `next.config.js` and disable the `autoPrerender` config in `devIndicators`:
56-
57-
```js filename="next.config.js"
58-
module.exports = {
59-
devIndicators: {
60-
autoPrerender: false,
61-
},
62-
}
63-
```
49+
When exporting [`getServerSideProps`](/docs/pages/building-your-application/data-fetching/get-server-side-props) or [`getInitialProps`](/docs/pages/api-reference/functions/get-initial-props) from a page, it will be marked as dynamic.
6450

6551
</PagesOnly>

packages/next/src/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export function CallStack({ frames, dialogResizerRef }: CallStackProps) {
7171
className="error-overlay-call-stack-ignored-list-toggle-button"
7272
onClick={onToggleIgnoreList}
7373
>
74-
{`${isIgnoreListOpen ? 'Hide' : 'Show'} ${ignoreListLength} Ignored-listed Frames`}
74+
{`${isIgnoreListOpen ? 'Hide' : 'Show'} ${ignoreListLength} Ignore-listed Frames`}
7575
<ChevronUpDown />
7676
</button>
7777
)}

packages/next/src/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/error-overlay-toolbar.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export const styles = `
6262
}
6363
6464
&:disabled {
65+
background-color: var(--color-gray-100);
6566
cursor: not-allowed;
6667
}
6768
}

packages/next/src/client/components/react-dev-overlay/ui/styles/colors.tsx

+7-7
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ export function Colors() {
4848
--color-background-200: #fafafa;
4949
5050
/* Syntax Light */
51-
--color-syntax-comment: #666666;
51+
--color-syntax-comment: #545454;
5252
--color-syntax-constant: #171717;
53-
--color-syntax-function: #0068d6;
54-
--color-syntax-keyword: #c01b5d;
55-
--color-syntax-link: #067a6e;
56-
--color-syntax-parameter: #ad4b00;
53+
--color-syntax-function: #0054ad;
54+
--color-syntax-keyword: #a51850;
55+
--color-syntax-link: #066056;
56+
--color-syntax-parameter: #8f3e00;
5757
--color-syntax-punctuation: #171717;
58-
--color-syntax-string: #067a6e;
59-
--color-syntax-string-expression: #067a6e;
58+
--color-syntax-string: #036157;
59+
--color-syntax-string-expression: #066056;
6060
6161
/* Gray Scale Light */
6262
--color-gray-100: #f2f2f2;

packages/next/src/server/config-shared.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -823,13 +823,13 @@ export interface NextConfig extends Record<string, any> {
823823
| false
824824
| {
825825
/**
826-
* @deprecated The dev tools indicator has it enabled by default.
826+
* @deprecated The dev tools indicator has it enabled by default. To disable, set `devIndicators` to `false`.
827827
* */
828828
appIsrStatus?: boolean
829829

830830
/**
831831
* Show "building..." indicator in development
832-
* @deprecated The dev tools indicator has it enabled by default.
832+
* @deprecated The dev tools indicator has it enabled by default. To disable, set `devIndicators` to `false`.
833833
*/
834834
buildActivity?: boolean
835835

0 commit comments

Comments
 (0)