Skip to content

Commit

Permalink
Remove v2_normalizeFormMethod (#5905)
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 authored Mar 24, 2023
1 parent cdd1263 commit e67cab9
Show file tree
Hide file tree
Showing 23 changed files with 35 additions and 664 deletions.
5 changes: 5 additions & 0 deletions .changeset/remove-normalize-form-method.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/react": major
---

Remove `future.v2_normalizeFormMethod` flag
2 changes: 0 additions & 2 deletions docs/hooks/use-navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ function SomeComponent() {
}
```

<docs-warning>The `useNavigation().formMethod` field is lowercase without the `future.v2_normalizeFormMethod` [Future Flag][api-development-strategy]. This is being normalized to uppercase to align with the `fetch()` behavior in v2, so please upgrade your Remix v1 applications to adopt the uppercase HTTP methods.</docs-warning>

<docs-info>For more information and usage, please refer to the [React Router `useNavigation` docs][rr-usenavigation].</docs-info>

[rr-usenavigation]: https://reactrouter.com/hooks/use-navigation
Expand Down
22 changes: 8 additions & 14 deletions docs/pages/api-development-strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,14 @@ The lifecycle is thus either:

Here's the current future flags in Remix v1 today:

| Flag | Description |
| ------------------------------- | --------------------------------------------------------------------- |
| `unstable_cssModules` | Enable CSS Modules Support |
| `unstable_cssSideEffectImports` | Enable CSS Side Effect imports |
| `unstable_dev` | Enable the new development server (including HMR/HDR support) |
| `unstable_postcss` | Enable PostCSS Support |
| `unstable_tailwind` | Enable TailwindCSS support |
| `unstable_vanillaExtract` | Enable Vanilla Extract Support |
| `v2_errorBoundary` | Combine `ErrorBoundary`/`CatchBoundary` into a single `ErrorBoundary` |
| `v2_meta` | Enable the new API for your `meta` functions |
| `v2_normalizeFormMethod` | Normalize `useNavigation().formMethod` to be an uppercase HTTP Method |
| `v2_routeConvention` | Enable the flat routes style of file-based routing |

We're in the process of preparing for our v2 release, so all `future.unstable_` flags are being stabilized into `future.v2_` flags (except for those which are not breaking changes, like PostCSS/Tailwind/Vanilla Extract support). This includes adding deprecation warnings for apps still using the old way. Once we stabilize them all we'll do a final Remix 1.15.0 release and let that run for a bit to give folks time to opt into any flags they haven't yet added. Then we'll plan to release Remix 2.0.0 and start working on releasing flag-driven Remix v3 features.
| Flag | Description |
| ------------------------------- | ------------------------------------------------------------- |
| `unstable_cssModules` | Enable CSS Modules Support |
| `unstable_cssSideEffectImports` | Enable CSS Side Effect imports |
| `unstable_dev` | Enable the new development server (including HMR/HDR support) |
| `unstable_postcss` | Enable PostCSS Support |
| `unstable_tailwind` | Enable TailwindCSS support |
| `unstable_vanillaExtract` | Enable Vanilla Extract Support |

[future-flags-blog-post]: https://remix.run/blog/future-flags
[feature-flowchart]: /docs-images/feature-flowchart.png
14 changes: 7 additions & 7 deletions integration/navigation-state-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ test.describe("navigation states", () => {
state: null,
key: expect.any(String),
},
formMethod: "get",
formMethod: "GET",
formAction: `/${STATES.SUBMITTING_LOADER}`,
formEncType: "application/x-www-form-urlencoded",
formData: expect.any(Object),
Expand Down Expand Up @@ -310,7 +310,7 @@ test.describe("navigation states", () => {
state: null,
key: expect.any(String),
},
formMethod: "get",
formMethod: "GET",
formAction: `/${STATES.SUBMITTING_LOADER_REDIRECT}`,
formEncType: "application/x-www-form-urlencoded",
formData: expect.any(Object),
Expand All @@ -326,7 +326,7 @@ test.describe("navigation states", () => {
},
key: expect.any(String),
},
formMethod: "get",
formMethod: "GET",
formAction: `/${STATES.SUBMITTING_LOADER_REDIRECT}`,
formEncType: "application/x-www-form-urlencoded",
formData: expect.any(Object),
Expand Down Expand Up @@ -355,7 +355,7 @@ test.describe("navigation states", () => {
state: null,
key: expect.any(String),
},
formMethod: "post",
formMethod: "POST",
formAction: `/${STATES.SUBMITTING_ACTION}`,
formEncType: "application/x-www-form-urlencoded",
formData: expect.any(Object),
Expand All @@ -369,7 +369,7 @@ test.describe("navigation states", () => {
state: null,
key: expect.any(String),
},
formMethod: "post",
formMethod: "POST",
formAction: `/${STATES.SUBMITTING_ACTION}`,
formEncType: "application/x-www-form-urlencoded",
formData: expect.any(Object),
Expand Down Expand Up @@ -400,7 +400,7 @@ test.describe("navigation states", () => {
state: null,
key: expect.any(String),
},
formMethod: "post",
formMethod: "POST",
formAction: `/${STATES.SUBMITTING_ACTION_REDIRECT}`,
formEncType: "application/x-www-form-urlencoded",
formData: expect.any(Object),
Expand All @@ -416,7 +416,7 @@ test.describe("navigation states", () => {
},
key: expect.any(String),
},
formMethod: "post",
formMethod: "POST",
formAction: `/${STATES.SUBMITTING_ACTION_REDIRECT}`,
formEncType: "application/x-www-form-urlencoded",
formData: expect.any(Object),
Expand Down
Loading

0 comments on commit e67cab9

Please sign in to comment.