-
Notifications
You must be signed in to change notification settings - Fork 29.5k
[backport] docs: late September improvements and fixes #84334
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
base: next-15-5
Are you sure you want to change the base?
Conversation
Part of: https://linear.app/vercel/issue/DOC-4809/layout-pages-and-linking-and-navigating-improvements Iterating a bunch of improvements to getting-started
Without the `| null`, the following error appears during compilation: ``` TS2322: Type RefObject<HTMLDivElement | null> is not assignable to type RefObject<HTMLDivElement> Type HTMLDivElement | null is not assignable to type HTMLDivElement Type null is not assignable to type HTMLDivElement ``` Co-authored-by: Joseph <[email protected]>
## Documentation Update This PR improves the dynamic routes example in the `project-structure.mdx` page. ### Changes - Updated catch-all segments example: - Before: `/shop/clothing/shoes` - After: `/shop/clothing` - Adjusted follow-up examples for consistency: - `/shop/a`, `/shop/a/b` → `/shop/clothing`, `/shop/clothing/shirts` ### Why - Provides a clearer and more intuitive demonstration of how catch-all segments work. - Keeps the example consistent with other dynamic routes documentation. Co-authored-by: Joseph <[email protected]>
We have dropped the example linked in this page. I'll re-evaluate later if the section is still enough for a dev to understand how to set CORS related headers.
…ame (#84045) - Added a Note to the Middleware docs explaining that when `pageExtensions` are customized (e.g. `.page.ts`), the Middleware file should be named `middleware.page.ts` or `middleware.page.js`. - Updated wording so `middleware.ts/js` is described as the default filename, not a strict requirement. <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? -Added a callout note to middleware.mdx stating that if pageExtensions is customized (e.g., .page.ts), the Middleware file should also match (middleware.page.ts/js). -Updated the language from “must” → “default is” for filename clarity. ### Why? -Developers customizing pageExtensions were misled by the existing docs, which implied middleware.ts/js was always required. -This PR prevents confusion when Middleware isn’t recognized after a pageExtensions change. ### How? Edited docs/app/api-reference/file-conventions/middleware.mdx. Inserted a > **Note** block right after the paragraph explaining where to create the middleware file. Closes NEXT- Fixes #84008 --> --------- Co-authored-by: Joseph <[email protected]>
Let's use a different title for these, otherwise we have a very long composite word.
Failing test suitesCommit: 0d47599 | About building and testing Next.js
Expand output● back/forward cache › React state is preserved when navigating with back/forward buttons
● back/forward cache › React state is preserved when navigating back/forward with links
● back/forward cache › React state is preserved when navigating back to a page with different search params than before
● back/forward cache › bfcache only preserves up to N entries
● back/forward cache › navigate back and forth repeatedly between the same pages without evicting
Expand output● Undefined default export › should error when page component export is not valid
Expand output● app dir - navigation › middleware redirect › should change browser location when router.refresh() gets a redirect response
Expand output● app-dir action handling › fetch actions › should handle redirects to routes that provide an invalid RSC response
|
This reverts commit 895f0f5.
Broken link to API Routes in Pages Router Co-authored-by: JJ Kasper <[email protected]>
Additional group of docs improvements.