Skip to content
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

next/form #68102

Merged
merged 45 commits into from
Jul 30, 2024
Merged

next/form #68102

merged 45 commits into from
Jul 30, 2024

Conversation

lubieowoce
Copy link
Member

@lubieowoce lubieowoce commented Jul 24, 2024

What

This PR introduces <Form>, a form component integrated with the Next.js router.

Form has two modes of operation.

When action is a path/url

<Form action="/search">

In essence, this is a progressively enhanced GET form.

  • it will prefetch the target route (or, more commonly in this case, its loading state)
  • when submitted, it will perform a client navigation to the target URL, encoding input fields from the form into the URL as search params.

When action is a function

<Form action={myReactAction}>

This is a progressively enhanced POST form. In this case, <Form> will act just like <form> (i.e. execute the action function when submitted). This is mostly here for convenience/consistency with React.

Notes

Notable props (or lack thereof)

  • replace - same as Link, call router.replace instead of router.push when navigating. This only works in "GET mode".
  • scroll - same as Link, control the scroll option of router when navigating. This only works in "GET mode".
  • onSubmit - same as the usual, but notably, calling event.preventDefault() inside it will prevent Next from navigating (this matches how Link's onClick works)

We disallow passing certain form props (method, encType, target) because both the GET and POST cases have specific requirements for these that can't be overridden.

There is currently no way to control/disable the prefetching behavior (like <Link prefetch={false}>) or render a custom component instead of <form> (like Link's passHref behavior). These may be added in the future.

Submitter overrides

We have partial support for overriding the action via

<button type="submit" formAction="/other-search">

It will also client-navigate, but can't be prefetched (because we don't know the route to prefetch until a submit occurs), so this isn't really recommended (unless the prefetch is triggered in some other way).

Unfortunately, just like formAction, all of the "banned" props mentioned in the previous section (method, encType, target) are overridable by the submitting element (the "submitter") via formMethod , formEncType and formTarget respectively. We don't have a good way of banning these within a <Form>, because we don't have control over <button> props. So in this case the best we can do is just warn and fall back to native browser behavior (because this is what'd happen before hydration). Which means that if the submitter specifies a formMethod , formEncType and formTarget that Form don't support, we will not client-navigate.

handling <input type="file">

Surprisingly, this works in a url-encoded form, even if it makes very little sense. But same as submitter props, we have no good way of banning it, so we match the browser behavior and submit the filename instead of the file object.

@ijjk ijjk added created-by: Next.js team PRs by the Next.js team. tests Turbopack Related to Turbopack with Next.js. type: next labels Jul 24, 2024
@ijjk
Copy link
Member

ijjk commented Jul 24, 2024

Tests Passed

Copy link
Member Author

lubieowoce commented Jul 24, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @lubieowoce and the rest of your teammates on Graphite Graphite

@ijjk
Copy link
Member

ijjk commented Jul 24, 2024

Stats from current PR

Default Build (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js next-form Change
buildDuration 17.8s 16.3s N/A
buildDurationCached 10.4s 8s N/A
nodeModulesSize 369 MB 369 MB ⚠️ +115 kB
nextStartRea..uration (ms) 424ms 429ms N/A
Client Bundles (main, webpack)
vercel/next.js canary vercel/next.js next-form Change
1780.HASH.js gzip 167 B 167 B
5453-HASH.js gzip 82.3 kB 82.3 kB N/A
7514-HASH.js gzip 5.19 kB 5.18 kB N/A
a7a62840-HASH.js gzip 51.7 kB 51.7 kB N/A
framework-HASH.js gzip 56.7 kB 56.7 kB N/A
main-app-HASH.js gzip 225 B 226 B N/A
main-HASH.js gzip 32.1 kB 32.2 kB N/A
webpack-HASH.js gzip 1.77 kB 1.77 kB
Overall change 1.94 kB 1.94 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js next-form Change
polyfills-HASH.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary vercel/next.js next-form Change
_app-HASH.js gzip 193 B 193 B
_error-HASH.js gzip 192 B 192 B
amp-HASH.js gzip 508 B 510 B N/A
css-HASH.js gzip 341 B 341 B
dynamic-HASH.js gzip 2.52 kB 2.52 kB
edge-ssr-HASH.js gzip 264 B 266 B N/A
head-HASH.js gzip 362 B 363 B N/A
hooks-HASH.js gzip 391 B 390 B N/A
image-HASH.js gzip 4.4 kB 4.4 kB N/A
index-HASH.js gzip 268 B 268 B
link-HASH.js gzip 2.81 kB 2.81 kB N/A
routerDirect..HASH.js gzip 326 B 325 B N/A
script-HASH.js gzip 396 B 397 B N/A
withRouter-HASH.js gzip 322 B 321 B N/A
1afbb74e6ecf..834.css gzip 106 B 106 B
Overall change 3.62 kB 3.62 kB
Client Build Manifests
vercel/next.js canary vercel/next.js next-form Change
_buildManifest.js gzip 747 B 749 B N/A
Overall change 0 B 0 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js next-form Change
index.html gzip 523 B 523 B
link.html gzip 536 B 538 B N/A
withRouter.html gzip 519 B 519 B
Overall change 1.04 kB 1.04 kB
Edge SSR bundle Size
vercel/next.js canary vercel/next.js next-form Change
edge-ssr.js gzip 127 kB 127 kB N/A
page.js gzip 194 kB 194 kB N/A
Overall change 0 B 0 B
Middleware size
vercel/next.js canary vercel/next.js next-form Change
middleware-b..fest.js gzip 670 B 670 B
middleware-r..fest.js gzip 156 B 155 B N/A
middleware.js gzip 29.7 kB 29.7 kB N/A
edge-runtime..pack.js gzip 1.18 kB 1.18 kB N/A
Overall change 670 B 670 B
Next Runtimes
vercel/next.js canary vercel/next.js next-form Change
928-experime...dev.js gzip 310 B 310 B
928-experime..prod.js gzip 310 B 310 B
928-turbo-ex..prod.js gzip 312 B 312 B
928-turbo.ru..prod.js gzip 304 B 304 B
928.runtime.dev.js gzip 301 B 301 B
928.runtime.prod.js gzip 302 B 302 B
app-page-exp...dev.js gzip 232 kB 232 kB
app-page-exp..prod.js gzip 141 kB 141 kB
app-page-tur..prod.js gzip 153 kB 153 kB
app-page-tur..prod.js gzip 149 kB 149 kB
app-page.run...dev.js gzip 227 kB 227 kB
app-page.run..prod.js gzip 138 kB 138 kB
app-route-ex...dev.js gzip 23.4 kB 23.4 kB
app-route-ex..prod.js gzip 18.8 kB 18.8 kB
app-route-tu..prod.js gzip 18.8 kB 18.8 kB
app-route-tu..prod.js gzip 18.6 kB 18.6 kB
app-route.ru...dev.js gzip 24.6 kB 24.6 kB
app-route.ru..prod.js gzip 18.6 kB 18.6 kB
pages-api-tu..prod.js gzip 9.6 kB 9.6 kB
pages-api.ru...dev.js gzip 9.87 kB 9.87 kB
pages-api.ru..prod.js gzip 9.59 kB 9.59 kB
pages-turbo...prod.js gzip 21.6 kB 21.6 kB
pages.runtim...dev.js gzip 22.1 kB 22.1 kB
pages.runtim..prod.js gzip 21.6 kB 21.6 kB
server.runti..prod.js gzip 56.7 kB 56.7 kB
Overall change 1.32 MB 1.32 MB
build cache Overall increase ⚠️
vercel/next.js canary vercel/next.js next-form Change
0.pack gzip 2.05 MB 2.05 MB ⚠️ +138 B
index.pack gzip 144 kB 145 kB ⚠️ +1.11 kB
Overall change 2.19 MB 2.19 MB ⚠️ +1.25 kB
Diff details
Diff for page.js
@@ -15,7 +15,7 @@
       /***/
     },
 
-    /***/ 7219: /***/ (
+    /***/ 2342: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -30,7 +30,7 @@
         default: () => /* binding */ nHandler,
       });
 
-      // NAMESPACE OBJECT: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__zehaskxadtwcczqqbmt6koh6bq/node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsREvNRu%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&flyingShuttle=false&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
+      // NAMESPACE OBJECT: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__uulzbengwsfwhwaa2ambxampcy/node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsREvNRu%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&flyingShuttle=false&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
       var page_next_edge_ssr_entry_namespaceObject = {};
       __webpack_require__.r(page_next_edge_ssr_entry_namespaceObject);
       __webpack_require__.d(page_next_edge_ssr_entry_namespaceObject, {
@@ -69,35 +69,35 @@
         tree: () => tree,
       });
 
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__zehaskxadtwcczqqbmt6koh6bq/node_modules/next/dist/esm/server/web/globals.js
-      var globals = __webpack_require__(6497);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__zehaskxadtwcczqqbmt6koh6bq/node_modules/next/dist/esm/server/web/adapter.js + 3 modules
-      var adapter = __webpack_require__(8627);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__zehaskxadtwcczqqbmt6koh6bq/node_modules/next/dist/esm/build/webpack/loaders/next-edge-ssr-loader/render.js + 87 modules
-      var render = __webpack_require__(9932);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__zehaskxadtwcczqqbmt6koh6bq/node_modules/next/dist/esm/server/lib/incremental-cache/index.js + 3 modules
-      var incremental_cache = __webpack_require__(547);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__zehaskxadtwcczqqbmt6koh6bq/node_modules/next/dist/esm/server/app-render/app-render.js + 72 modules
-      var app_render = __webpack_require__(24);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__zehaskxadtwcczqqbmt6koh6bq/node_modules/next/dist/esm/server/route-modules/app-page/module.compiled.js
-      var module_compiled = __webpack_require__(776);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__zehaskxadtwcczqqbmt6koh6bq/node_modules/next/dist/esm/server/route-kind.js
-      var route_kind = __webpack_require__(7234);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__zehaskxadtwcczqqbmt6koh6bq/node_modules/next/dist/esm/client/components/error-boundary.js
-      var error_boundary = __webpack_require__(8425);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__zehaskxadtwcczqqbmt6koh6bq/node_modules/next/dist/esm/server/app-render/entry-base.js + 9 modules
-      var entry_base = __webpack_require__(6280); // CONCATENATED MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__zehaskxadtwcczqqbmt6koh6bq/node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsREvNRu%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&flyingShuttle=false&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__uulzbengwsfwhwaa2ambxampcy/node_modules/next/dist/esm/server/web/globals.js
+      var globals = __webpack_require__(3000);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__uulzbengwsfwhwaa2ambxampcy/node_modules/next/dist/esm/server/web/adapter.js + 3 modules
+      var adapter = __webpack_require__(1059);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__uulzbengwsfwhwaa2ambxampcy/node_modules/next/dist/esm/build/webpack/loaders/next-edge-ssr-loader/render.js + 87 modules
+      var render = __webpack_require__(9774);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__uulzbengwsfwhwaa2ambxampcy/node_modules/next/dist/esm/server/lib/incremental-cache/index.js + 3 modules
+      var incremental_cache = __webpack_require__(5621);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__uulzbengwsfwhwaa2ambxampcy/node_modules/next/dist/esm/server/app-render/app-render.js + 72 modules
+      var app_render = __webpack_require__(8919);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__uulzbengwsfwhwaa2ambxampcy/node_modules/next/dist/esm/server/route-modules/app-page/module.compiled.js
+      var module_compiled = __webpack_require__(8488);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__uulzbengwsfwhwaa2ambxampcy/node_modules/next/dist/esm/server/route-kind.js
+      var route_kind = __webpack_require__(8394);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__uulzbengwsfwhwaa2ambxampcy/node_modules/next/dist/esm/client/components/error-boundary.js
+      var error_boundary = __webpack_require__(5787);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__uulzbengwsfwhwaa2ambxampcy/node_modules/next/dist/esm/server/app-render/entry-base.js + 9 modules
+      var entry_base = __webpack_require__(1901); // CONCATENATED MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__uulzbengwsfwhwaa2ambxampcy/node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsREvNRu%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&flyingShuttle=false&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
       const component0 = () =>
         Promise.resolve(/* import() eager */).then(
-          __webpack_require__.bind(__webpack_require__, 4401)
+          __webpack_require__.bind(__webpack_require__, 8535)
         );
       const component1 = () =>
         Promise.resolve(/* import() eager */).then(
-          __webpack_require__.bind(__webpack_require__, 5434)
+          __webpack_require__.bind(__webpack_require__, 2130)
         );
       const page2 = () =>
         Promise.resolve(/* import() eager */).then(
-          __webpack_require__.bind(__webpack_require__, 2439)
+          __webpack_require__.bind(__webpack_require__, 4781)
         );
 
       // We inject the tree and pages here so that we can use them in the route
@@ -163,12 +163,12 @@
       });
 
       //# sourceMappingURL=app-page.js.map
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__zehaskxadtwcczqqbmt6koh6bq/node_modules/next/dist/esm/lib/page-types.js
-      var page_types = __webpack_require__(5373);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__zehaskxadtwcczqqbmt6koh6bq/node_modules/next/dist/esm/server/app-render/encryption-utils.js
-      var encryption_utils = __webpack_require__(6590);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__zehaskxadtwcczqqbmt6koh6bq/node_modules/next/dist/esm/server/app-render/action-utils.js
-      var action_utils = __webpack_require__(9690); // CONCATENATED MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__zehaskxadtwcczqqbmt6koh6bq/node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js?{"absolute500Path":"","absoluteAppPath":"next/dist/pages/_app","absoluteDocumentPath":"next/dist/pages/_document","absoluteErrorPath":"next/dist/pages/_error","absolutePagePath":"private-next-app-dir/app-edge-ssr/page.js","dev":false,"isServerComponent":true,"page":"/app-edge-ssr/page","stringifiedConfig":"eyJlbnYiOnt9LCJlc2xpbnQiOnsiaWdub3JlRHVyaW5nQnVpbGRzIjpmYWxzZX0sInR5cGVzY3JpcHQiOnsiaWdub3JlQnVpbGRFcnJvcnMiOmZhbHNlLCJ0c2NvbmZpZ1BhdGgiOiJ0c2NvbmZpZy5qc29uIn0sImRpc3REaXIiOiIubmV4dCIsIm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mlnRmlsZSI6Ii90bXAvbmV4dC1zdGF0c1JFdk5SdS9zdGF0cy1hcHAvbmV4dC5jb25maWcuanMiLCJjb25maWdGaWxlTmFtZSI6Im5leHQuY29uZmlnLmpzIn0=","pagesType":"app","appDirLoader":"bmV4dC1hcHAtbG9hZGVyP25hbWU9YXBwJTJGYXBwLWVkZ2Utc3NyJTJGcGFnZSZwYWdlPSUyRmFwcC1lZGdlLXNzciUyRnBhZ2UmcGFnZVBhdGg9cHJpdmF0ZS1uZXh0LWFwcC1kaXIlMkZhcHAtZWRnZS1zc3IlMkZwYWdlLmpzJmFwcERpcj0lMkZ0bXAlMkZuZXh0LXN0YXRzUkV2TlJ1JTJGc3RhdHMtYXBwJTJGYXBwJmFwcFBhdGhzPSUyRmFwcC1lZGdlLXNzciUyRnBhZ2UmcGFnZUV4dGVuc2lvbnM9dHN4JnBhZ2VFeHRlbnNpb25zPXRzJnBhZ2VFeHRlbnNpb25zPWpzeCZwYWdlRXh0ZW5zaW9ucz1qcyZiYXNlUGF0aD0mYXNzZXRQcmVmaXg9Jm5leHRDb25maWdPdXRwdXQ9JmZseWluZ1NodXR0bGU9ZmFsc2UmcHJlZmVycmVkUmVnaW9uPSZtaWRkbGV3YXJlQ29uZmlnPWUzMCUzRCE=","sriEnabled":false,"middlewareConfig":"e30="}!
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__uulzbengwsfwhwaa2ambxampcy/node_modules/next/dist/esm/lib/page-types.js
+      var page_types = __webpack_require__(8268);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__uulzbengwsfwhwaa2ambxampcy/node_modules/next/dist/esm/server/app-render/encryption-utils.js
+      var encryption_utils = __webpack_require__(8125);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__uulzbengwsfwhwaa2ambxampcy/node_modules/next/dist/esm/server/app-render/action-utils.js
+      var action_utils = __webpack_require__(5736); // CONCATENATED MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__uulzbengwsfwhwaa2ambxampcy/node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js?{"absolute500Path":"","absoluteAppPath":"next/dist/pages/_app","absoluteDocumentPath":"next/dist/pages/_document","absoluteErrorPath":"next/dist/pages/_error","absolutePagePath":"private-next-app-dir/app-edge-ssr/page.js","dev":false,"isServerComponent":true,"page":"/app-edge-ssr/page","stringifiedConfig":"eyJlbnYiOnt9LCJlc2xpbnQiOnsiaWdub3JlRHVyaW5nQnVpbGRzIjpmYWxzZX0sInR5cGVzY3JpcHQiOnsiaWdub3JlQnVpbGRFcnJvcnMiOmZhbHNlLCJ0c2NvbmZpZ1BhdGgiOiJ0c2NvbmZpZy5qc29uIn0sImRpc3REaXIiOiIubmV4dCIsImNsZWFuRGlzdERpciI6dHJ1ZSwiYXNzZXRQcmVmaXgiOiIiLCJjYWNoZU1heE1lbW9yeVNpemUiOjUyNDI4ODAwLCJjb25maWdPcmlnaW4iOiJuZXh0LmNvbmZpZy5qcyIsInVzZUZpbGVTeXN0ZW1QdWJsaWNSb3V0ZXMiOnRydWUsImdlbmVyYXRlRXRhZ3MiOnRydWUsInBhZ2VFeHRlbnNpb25zIjpbInRzeCIsInRzIiwianN4IiwianMiXSwicG93ZXJlZEJ5SGVhZGVyIjp0cnVlLCJjb21wcmVzcyI6dHJ1ZSwiaW1hZ2VzIjp7ImRldmljZVNpemVzIjpbNjQwLDc1MCw4MjgsMTA4MCwxMjAwLDE5MjAsMjA0OCwzODQwXSwiaW1hZ2VTaXplcyI6WzE2LDMyLDQ4LDY0LDk2LDEyOCwyNTYsMzg0XSwicGF0aCI6Ii9fbmV4dC9pbWFnZSIsImxvY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BhZ2VFeHRlbnNpb25zPWpzeCZwYWdlRXh0ZW5zaW9ucz1qcyZiYXNlUGF0aD0mYXNzZXRQcmVmaXg9Jm5leHRDb25maWdPdXRwdXQ9JmZseWluZ1NodXR0bGU9ZmFsc2UmcHJlZmVycmVkUmVnaW9uPSZtaWRkbGV3YXJlQ29uZmlnPWUzMCUzRCE=","sriEnabled":false,"middlewareConfig":"e30="}!
       var _self___RSC_MANIFEST;
 
       const incrementalCacheHandler = null;
@@ -430,50 +430,50 @@
       /***/
     },
 
-    /***/ 317: /***/ (
+    /***/ 2070: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 1311)
+        __webpack_require__.bind(__webpack_require__, 7818)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 8014)
+        __webpack_require__.bind(__webpack_require__, 2460)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 1593)
+        __webpack_require__.bind(__webpack_require__, 7791)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 903)
+        __webpack_require__.bind(__webpack_require__, 3902)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 6086)
+        __webpack_require__.bind(__webpack_require__, 7290)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 234)
+        __webpack_require__.bind(__webpack_require__, 4306)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 3635)
+        __webpack_require__.bind(__webpack_require__, 4355)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 4426)
+        __webpack_require__.bind(__webpack_require__, 1848)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 9376)
+        __webpack_require__.bind(__webpack_require__, 1230)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 2842)
+        __webpack_require__.bind(__webpack_require__, 9172)
       );
 
       /***/
     },
 
-    /***/ 2035: /***/ () => {
+    /***/ 3421: /***/ () => {
       /***/
     },
 
-    /***/ 2439: /***/ (
+    /***/ 4781: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -493,7 +493,7 @@
       /***/
     },
 
-    /***/ 4401: /***/ (
+    /***/ 8535: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -505,7 +505,7 @@
         /* harmony export */
       });
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
-        __webpack_require__(5172);
+        __webpack_require__(6763);
 
       function RootLayout({ children }) {
         return /*#__PURE__*/ (0,
@@ -524,7 +524,7 @@
     // webpackRuntimeModules
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
-    /******/ __webpack_require__.O(0, [315, 745], () => __webpack_exec__(7219));
+    /******/ __webpack_require__.O(0, [649, 829], () => __webpack_exec__(2342));
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ (_ENTRIES = typeof _ENTRIES === "undefined" ? {} : _ENTRIES)[
       "middleware_app/app-edge-ssr/page"
Diff for middleware.js

Diff too large to display

Diff for edge-ssr.js

Diff too large to display

Diff for image-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [8358],
   {
-    /***/ 1362: /***/ (
+    /***/ 9618: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/image",
         function () {
-          return __webpack_require__(2160);
+          return __webpack_require__(699);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 537: /***/ (module, exports, __webpack_require__) => {
+    /***/ 9451: /***/ (module, exports, __webpack_require__) => {
       "use strict";
       /* __next_internal_client_entry_do_not_use__  cjs */
       Object.defineProperty(exports, "__esModule", {
@@ -40,17 +40,17 @@
         __webpack_require__(3537)
       );
       const _head = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(7092)
+        __webpack_require__(6490)
       );
-      const _getimgprops = __webpack_require__(9834);
-      const _imageconfig = __webpack_require__(5676);
-      const _imageconfigcontextsharedruntime = __webpack_require__(387);
-      const _warnonce = __webpack_require__(451);
-      const _routercontextsharedruntime = __webpack_require__(5357);
+      const _getimgprops = __webpack_require__(3646);
+      const _imageconfig = __webpack_require__(535);
+      const _imageconfigcontextsharedruntime = __webpack_require__(4724);
+      const _warnonce = __webpack_require__(6321);
+      const _routercontextsharedruntime = __webpack_require__(1759);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(3945)
+        __webpack_require__(1882)
       );
-      const _usemergedref = __webpack_require__(4666);
+      const _usemergedref = __webpack_require__(8941);
       // This is replaced by webpack define plugin
       const configEnv = {
         deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
@@ -371,7 +371,7 @@
       /***/
     },
 
-    /***/ 4666: /***/ (module, exports, __webpack_require__) => {
+    /***/ 8941: /***/ (module, exports, __webpack_require__) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -440,7 +440,7 @@
       /***/
     },
 
-    /***/ 9834: /***/ (
+    /***/ 3646: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -456,9 +456,9 @@
           return getImgProps;
         },
       });
-      const _warnonce = __webpack_require__(451);
-      const _imageblursvg = __webpack_require__(3547);
-      const _imageconfig = __webpack_require__(5676);
+      const _warnonce = __webpack_require__(6321);
+      const _imageblursvg = __webpack_require__(8297);
+      const _imageconfig = __webpack_require__(535);
       const VALID_LOADING_VALUES =
         /* unused pure expression or super */ null && [
           "lazy",
@@ -830,7 +830,7 @@
       /***/
     },
 
-    /***/ 3547: /***/ (__unused_webpack_module, exports) => {
+    /***/ 8297: /***/ (__unused_webpack_module, exports) => {
       "use strict";
       /**
        * A shared function, used on both client and server, to generate a SVG blur placeholder.
@@ -885,7 +885,7 @@
       /***/
     },
 
-    /***/ 6850: /***/ (
+    /***/ 973: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -912,10 +912,10 @@
         },
       });
       const _interop_require_default = __webpack_require__(4345);
-      const _getimgprops = __webpack_require__(9834);
-      const _imagecomponent = __webpack_require__(537);
+      const _getimgprops = __webpack_require__(3646);
+      const _imagecomponent = __webpack_require__(9451);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(3945)
+        __webpack_require__(1882)
       );
       function getImageProps(imgProps) {
         const { props } = (0, _getimgprops.getImgProps)(imgProps, {
@@ -947,7 +947,7 @@
       /***/
     },
 
-    /***/ 3945: /***/ (__unused_webpack_module, exports) => {
+    /***/ 1882: /***/ (__unused_webpack_module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -982,7 +982,7 @@
       /***/
     },
 
-    /***/ 2160: /***/ (
+    /***/ 699: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -999,8 +999,8 @@
 
       // EXTERNAL MODULE: ./node_modules/.pnpm/react@19.0.0-rc-6230622a1a-20240610/node_modules/react/jsx-runtime.js
       var jsx_runtime = __webpack_require__(898);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__zehaskxadtwcczqqbmt6koh6bq/node_modules/next/image.js
-      var next_image = __webpack_require__(6793);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__uulzbengwsfwhwaa2ambxampcy/node_modules/next/image.js
+      var next_image = __webpack_require__(1428);
       var image_default = /*#__PURE__*/ __webpack_require__.n(next_image); // CONCATENATED MODULE: ./pages/nextjs.png
       /* harmony default export */ const nextjs = {
         src: "/_next/static/media/nextjs.cae0b805.png",
@@ -1030,12 +1030,12 @@
       /***/
     },
 
-    /***/ 6793: /***/ (
+    /***/ 1428: /***/ (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
-      module.exports = __webpack_require__(6850);
+      module.exports = __webpack_require__(973);
 
       /***/
     },
@@ -1045,7 +1045,7 @@
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [2888, 9774, 179], () =>
-      __webpack_exec__(1362)
+      __webpack_exec__(9618)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for main-HASH.js

Diff too large to display

Commit: b854edf

@lubieowoce lubieowoce force-pushed the next-form branch 6 times, most recently from a2e8c7a to e0b732f Compare July 29, 2024 14:46
packages/next/src/client/form.tsx Outdated Show resolved Hide resolved
test/e2e/app-dir/next-form/default/next-form.test.ts Outdated Show resolved Hide resolved
packages/next/src/client/form.tsx Outdated Show resolved Hide resolved
@lubieowoce lubieowoce force-pushed the next-form branch 2 times, most recently from 48dfe9b to 0184b34 Compare July 29, 2024 23:32
@lubieowoce lubieowoce marked this pull request as ready for review July 29, 2024 23:33
test/e2e/app-dir/next-form/default/next-form.test.ts Outdated Show resolved Hide resolved
test/e2e/app-dir/next-form/default/next-form.test.ts Outdated Show resolved Hide resolved
return
}

it('should soft-navigate on submit and show the prefetched loading state', async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not related to this PR, but maybe worth calling out: at the moment, the behavior in this PR isn't showing the prefetched loading state: that's dependent on a refactor to the prefetch cache to share cache entries across differing search params. What we're observing is the loading state that also gets sent along with the dynamic request. You'll notice if you throttle your network after prefetching, and then search, rendering the loading state will be dependent on the RSC request containing the search param.

I don't think there's anything specific to change about this PR but seemed worth clarifying after reading this test description

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yikes! great callout, i missed that completely...

@lubieowoce lubieowoce merged commit 4db8f30 into canary Jul 30, 2024
101 of 105 checks passed
@lubieowoce lubieowoce deleted the next-form branch July 30, 2024 15:45
ForsakenHarmony pushed a commit that referenced this pull request Aug 14, 2024
## What

This PR introduces `<Form>`, a form component integrated with the
Next.js router.

Form has two modes of operation.

### When `action` is a path/url

```jsx
<Form action="/search">
```

In essence, this is a progressively enhanced GET form. 
- it will prefetch the target route (or, more commonly in this case, its
loading state)
- when submitted, it will perform a **client navigation** to the target
URL, encoding input fields from the form into the URL as search params.

### When `action` is a function

```jsx
<Form action={myReactAction}>
```

This is a progressively enhanced POST form. In this case, `<Form>` will
act just like `<form>` (i.e. execute the action function when
submitted). This is mostly here for convenience/consistency with React.

## Notes

### Notable props (or lack thereof)

- `replace` - same as Link, call `router.replace` instead of
`router.push` when navigating. This only works in "GET mode".
- `scroll` - same as Link, control the `scroll` option of router when
navigating. This only works in "GET mode".
- `onSubmit` - same as the usual, but notably, **calling
`event.preventDefault()` inside it will prevent Next from navigating**
(this matches how Link's `onClick` works)

We disallow passing certain form props (`method`, `encType`, `target`)
because both the GET and POST cases have specific requirements for these
that can't be overridden.

There is currently no way to control/disable the prefetching behavior
(like `<Link prefetch={false}>`) or render a custom component instead of
`<form>` (like Link's `passHref` behavior). These may be added in the
future.

### Submitter overrides

We have partial support for overriding the `action` via
```jsx
<button type="submit" formAction="/other-search">
```

It will also client-navigate, but can't be prefetched (because we don't
know the route to prefetch until a submit occurs), so this isn't really
recommended (unless the prefetch is triggered in some other way).

Unfortunately, just like `formAction`, all of the "banned" props
mentioned in the previous section (`method`, `encType`, `target`) are
overridable by the submitting element (the
["submitter"](https://developer.mozilla.org/en-US/docs/Web/API/SubmitEvent/submitter))
via `formMethod` , `formEncType` and `formTarget` respectively. We don't
have a good way of banning these within a `<Form>`, because we don't
have control over `<button>` props. So in this case the best we can do
is just warn and fall back to native browser behavior (because this is
what'd happen before hydration). Which means that **if the submitter
specifies a `formMethod` , `formEncType` and `formTarget` that Form
don't support, we will not client-navigate.**

### handling `<input type="file">`

Surprisingly, this works in a url-encoded form, even if it makes very
little sense. But same as submitter props, we have no good way of
banning it, so we match the browser behavior and submit _the filename_
instead of the file object.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
created-by: Next.js team PRs by the Next.js team. locked tests Turbopack Related to Turbopack with Next.js. type: next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants