-
Notifications
You must be signed in to change notification settings - Fork 31.1k
Redesign the unrendered-segment instant validation overlay #93879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aurorascharff
wants to merge
49
commits into
canary
Choose a base branch
from
aurorascharff/redesign-unrendered-segment-overlay
base: canary
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 41 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
0f0aa80
Clear instant validation errors on route change + nav body variants
aurorascharff 68a47a2
Show navigation-specific headline + explanation in dev overlay
aurorascharff 7917001
Detect in-navigation errors via stable message substrings
aurorascharff aee125a
Detect dev overlay navigation via history events, not usePathname
aurorascharff 80685ae
Trim comments
aurorascharff 32b16b9
add missing reducer action
aurorascharff bdf8d80
Update tests
aurorascharff 8ae10a7
Update tests
aurorascharff b155b1a
Merge branch 'canary' of github.com:vercel/next.js into aurorascharff…
aurorascharff 7bbd860
Update snapshots for in-navigation factory wording
aurorascharff b221f22
Update build-mode snapshots for in-navigation factory wording
aurorascharff bf68fea
Align InNavigation factory wording, extract isBlockingRouteInNavError
aurorascharff 6e04312
Merge branch 'canary' into aurorascharff/instant-nav-error-clear
aurorascharff 84c089f
Merge remote-tracking branch 'origin/canary' into aurorascharff/insta…
aurorascharff 1b2e9c5
Use state.page for clear-on-nav + update unit tests
aurorascharff bb7fa35
Fix snapshot indentation and drop test/tmp prefix
aurorascharff aa2d6ef
Skip first state.page transition when clearing instant errors on nav
aurorascharff d8449f0
Align runtime-body in-navigation fix-order with the SSR variant
aurorascharff 4e4406d
Fix `code`/`description` indent in level-* snapshots
aurorascharff b1876c8
Match sibling indent for code/description in remaining level-* snapshots
aurorascharff 2b32f5d
Update build-mode CLI snapshots for in-navigation factory wording
aurorascharff e69e4ad
Revert SSR-only snapshots in level-manual-warning to initial-render w…
aurorascharff e7b2f5b
fix failing tests
aurorascharff 08f62f9
Handle instant errors more cleanly
aurorascharff a579c3d
Merge branch 'canary' of github.com:vercel/next.js into aurorascharff…
aurorascharff ca89b0e
Redesign the "could not validate" instant error
aurorascharff 595dafa
Adjust cards
aurorascharff 4c6070e
Update
aurorascharff 6d93b2d
Match dynamic route templates when clearing instant errors on nav
aurorascharff b36f9f0
Use shared route-regex helper for template matching
aurorascharff f194bd7
Merge branch 'aurorascharff/instant-nav-error-clear' of github.com:ve…
aurorascharff 78cbf65
Adjust error message
aurorascharff d7f2c90
Add page route info
aurorascharff 13023d9
Add test
aurorascharff 84f712d
Add "stacktrace" for the dropped segment
aurorascharff 897010e
Extract reusable component code-frame-shell
aurorascharff dcf251d
Clean up styles and wording
aurorascharff 9ea959e
Yav/redesign unrendered segment overlay followup (#93925)
yavorpunchev 3e18b87
Merge branch 'canary' of github.com:vercel/next.js into aurorascharff…
aurorascharff 4cff4e3
Adjust icons and wording
aurorascharff 774d625
Update snapshots
aurorascharff f205deb
Restore missing TODO comment
aurorascharff 9eea6c6
Merge branch 'canary' of github.com:vercel/next.js into aurorascharff…
aurorascharff 1ed208e
Modify test case to create and catch parallel route validation error
aurorascharff e92946d
fix error code snapshots after errors.json regeneration
aurorascharff 62f8f3b
fix tree indentation and skip build tests for route-group workaround
aurorascharff eeb338e
use expectBuildValidationSkipped for route-group cases (no markers em…
aurorascharff af88fa1
address Copilot review: add missing data attribute, fix error code, u…
aurorascharff 8a3499f
remove unnecessary comments
aurorascharff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
packages/next/src/next-devtools/dev-overlay/components/code-frame/code-frame-shell.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import type { ReactNode } from 'react' | ||
| import { ExternalIcon } from '../../icons/external' | ||
|
|
||
| type CodeFrameShellProps = { | ||
| header: ReactNode | ||
| onOpen?: () => void | ||
| openLabel?: string | ||
| children: ReactNode | ||
| } | ||
|
|
||
| export function CodeFrameShell({ | ||
| header, | ||
| onOpen, | ||
| openLabel, | ||
| children, | ||
| }: CodeFrameShellProps) { | ||
| return ( | ||
| <div data-nextjs-codeframe> | ||
| <div className="code-frame-header"> | ||
| <p className="code-frame-link"> | ||
| {header} | ||
| {onOpen && ( | ||
| <button | ||
| aria-label={openLabel ?? 'Open in editor'} | ||
| data-with-open-in-editor-link-source-file | ||
| onClick={onOpen} | ||
| type="button" | ||
| > | ||
| <ExternalIcon /> | ||
| </button> | ||
| )} | ||
| </p> | ||
| </div> | ||
| <pre className="code-frame-pre"> | ||
| <div className="code-frame-lines">{children}</div> | ||
| </pre> | ||
| </div> | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.