Skip to content

Commit f20f389

Browse files
authored
[dev-overlay] sync style diffs with new design (#75949)
This PR synced style with the re-redesign. | Before | After | |--------|--------| | ![CleanShot 2025-02-14 at 01 43 59](https://github.com/user-attachments/assets/d10e9c02-d26f-4a31-8707-707b000a687f) | ![CleanShot 2025-02-14 at 01 44 27](https://github.com/user-attachments/assets/0d0e4571-c90b-4431-a6aa-69c21a1135c7) | | ![CleanShot 2025-02-14 at 01 46 09](https://github.com/user-attachments/assets/6b2073bc-d7b4-43ee-8c12-e6e4505fc1b9) | ![CleanShot 2025-02-14 at 01 46 05](https://github.com/user-attachments/assets/7dc0a360-8382-43f4-a64b-c212a56b326b) | Closes NDX-811
1 parent 4af10dd commit f20f389

File tree

7 files changed

+15
-16
lines changed

7 files changed

+15
-16
lines changed

packages/next/src/client/components/react-dev-overlay/_experimental/internal/components/call-stack-frame/call-stack-frame.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ export const CALL_STACK_FRAME_STYLES = css`
8484
border-radius: var(--rounded-lg);
8585
}
8686
87+
[data-nextjs-call-stack-frame-ignored]:last-child {
88+
margin-bottom: 0;
89+
}
90+
8791
[data-nextjs-call-stack-frame] {
8892
user-select: text;
8993
display: block;

packages/next/src/client/components/react-dev-overlay/_experimental/internal/components/code-frame/code-frame.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,18 @@ export const CODE_FRAME_STYLES = css`
109109
font-family: var(--font-stack-monospace);
110110
font-size: 12px;
111111
line-height: 16px;
112-
margin: var(--next-dialog-row-padding);
113-
114-
&:has(~ [data-nextjs-call-stack]) {
115-
margin-bottom: 0;
116-
}
112+
margin: var(--size-2) 0;
117113
}
118114
119115
.code-frame-link,
120116
.code-frame-pre {
121117
padding: 12px;
122118
}
123119
120+
.code-frame-pre {
121+
white-space: pre-wrap;
122+
}
123+
124124
.code-frame-header {
125125
width: 100%;
126126
cursor: pointer;

packages/next/src/client/components/react-dev-overlay/_experimental/internal/components/copy-button/index.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,10 @@ function CopySuccessIcon() {
237237
)
238238
}
239239

240-
// TODO(jiwon): Is not used anymore, should we decouple the styles?
241240
export const COPY_BUTTON_STYLES = css`
242241
[data-nextjs-data-runtime-error-copy-button],
243242
[data-nextjs-data-runtime-error-copy-button]:focus:not(:focus-visible) {
244243
position: relative;
245-
margin-left: var(--size-gap);
246244
padding: 0;
247245
border: none;
248246
background: none;

packages/next/src/client/components/react-dev-overlay/_experimental/internal/components/dialog/styles.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const styles = css`
5555
display: flex;
5656
flex-direction: column;
5757
position: relative;
58+
padding: var(--size-4) var(--size-3);
5859
}
5960
6061
/* Account for the footer height, when present */
@@ -64,8 +65,7 @@ const styles = css`
6465
6566
[data-nextjs-dialog-content] > [data-nextjs-dialog-header] {
6667
flex-shrink: 0;
67-
padding: var(--next-dialog-row-padding);
68-
padding-bottom: 0;
68+
margin-bottom: var(--size-2);
6969
}
7070
7171
[data-nextjs-dialog-content] > [data-nextjs-dialog-body] {

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

+2-6
Original file line numberDiff line numberDiff line change
@@ -122,19 +122,15 @@ function ChevronUpDown() {
122122
export const CALL_STACK_STYLES = css`
123123
.error-overlay-call-stack-container {
124124
position: relative;
125-
padding: var(--size-4) var(--size-3);
126-
/* To optically align last item */
127-
padding-bottom: 8px;
128-
position: relative;
125+
margin-top: var(--size-2);
129126
}
130127
131128
.error-overlay-call-stack-header {
132129
display: flex;
133130
justify-content: space-between;
134131
align-items: center;
135132
min-height: 28px;
136-
margin-bottom: var(--size-3);
137-
padding: 0 var(--size-2);
133+
padding: var(--size-2) var(--size-2) var(--size-3) var(--size-1);
138134
width: 100%;
139135
}
140136

packages/next/src/client/components/react-dev-overlay/_experimental/internal/components/errors/error-message/error-message.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export function ErrorMessage({ errorMessage }: ErrorMessageProps) {
2020
export const styles = css`
2121
.nextjs__container_errors_desc {
2222
margin: 0;
23+
margin-left: var(--size-1);
2324
color: var(--color-red-900);
2425
font-weight: 500;
2526
font-size: var(--size-font);

packages/next/src/client/components/react-dev-overlay/_experimental/internal/container/errors.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ export const styles = css`
264264
display: flex;
265265
align-items: center;
266266
justify-content: space-between;
267-
margin-bottom: var(--size-3);
267+
margin-bottom: var(--size-3_5);
268268
}
269269
.error-overlay-notes-container {
270270
padding: 0 var(--size-4);

0 commit comments

Comments
 (0)