Skip to content

Support form-driven frame navigation - #11668

Open
brophdawg11 wants to merge 2 commits into
brophdawg11/frame-reload-redirectsfrom
brophdawg11/frame-form-submissions
Open

Support form-driven frame navigation#11668
brophdawg11 wants to merge 2 commits into
brophdawg11/frame-reload-redirectsfrom
brophdawg11/frame-form-submissions

Conversation

@brophdawg11

Copy link
Copy Markdown
Contributor

This extends frame-aware navigation to eligible same-origin forms while preserving native form behavior before the client runtime loads. Applications continue to own request construction in resolveFrame; the runtime only forwards the browser's submission metadata.

  • Changes resolveFrame(src, signal, target) to resolveFrame(src, options) with formData, method, encType, signal, and target.
  • Preserves native constraint validation, submitter overrides, progressive enhancement, and explicit document-navigation escape hatches.
  • Uses replace history for same-location non-GET submissions while preserving push history for different destinations and GET submissions.
  • Demonstrates GET course filtering and POST account editing through the frame-navigation demo's new /account/edit route.
  • Stacked on Support redirects from frame reloads #11667 and supersedes the form-submission portion of Support form-driven frame navigation #11632.
<form method="post" action="/account/edit" rmx-target="account">
  <label for="display-name">Display name</label>
  <input id="display-name" name="displayName" required />
  <button type="submit">Save</button>
</form>
run({
  async resolveFrame(src, options) {
    return fetch(src, {
      method: options?.method,
      body: options?.method?.toLowerCase() === 'post' ? options.formData : undefined,
      signal: options?.signal,
    })
  },
})

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Preview Build Available

A preview build has been created for this PR. You can install it using:

pnpm install "remix-run/remix#preview/pr-11668&path:packages/remix"

This preview build will be updated automatically as you push new commits.

@brophdawg11 brophdawg11 self-assigned this Aug 5, 2026
@brophdawg11
brophdawg11 force-pushed the brophdawg11/frame-form-submissions branch 3 times, most recently from e97152f to 5013fb6 Compare August 5, 2026 18:36
Assisted-By: devx/f6fc68e3-b7d8-4cad-848e-5b04c955db56
Assisted-By: devx/f6fc68e3-b7d8-4cad-848e-5b04c955db56
@brophdawg11
brophdawg11 force-pushed the brophdawg11/frame-form-submissions branch from e793a41 to 7b59c4e Compare August 7, 2026 19:04
@brophdawg11
brophdawg11 marked this pull request as ready for review August 7, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant