Skip to content

Add 5.0 Actions Middleware change#9943

Merged
bholmesdev merged 37 commits into
5.0.0-betafrom
actions-middleware
Nov 11, 2024
Merged

Add 5.0 Actions Middleware change#9943
bholmesdev merged 37 commits into
5.0.0-betafrom
actions-middleware

Conversation

@bholmesdev

@bholmesdev bholmesdev commented Nov 7, 2024

Copy link
Copy Markdown
Contributor

Description (required)

This introduces the new default when submitting Actions from an HTML form. We've removed the cookie forwarding default and introduced a new getActionContext() utility to customize how actions are handled using middleware.

  • Add an "advanced sessions" guide to Actions
  • Add Security reference with new getActionContext() pattern
  • Add the getActionContext() API reference
  • Add a changelog to the 5.0 upgrade guide

Related issues & labels (optional)

  • Closes #
  • Suggested label:

For Astro version: 5.0. See astro PR #12373.

@netlify

netlify Bot commented Nov 7, 2024

Copy link
Copy Markdown

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit 83ff5a6
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/67322e439a8fc60008047ccb
😎 Deploy Preview https://deploy-preview-9943--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ArmandPhilippot ArmandPhilippot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks great! I have nothing to say about the content, everything seems clear to me. 💯
I just left some suggestions regarding:

  • absolute > relative URL (the link check script does not run on PRs targeting beta branch, but will throw errors once merged)
  • a missing type I think

Comment thread src/content/docs/en/guides/actions.mdx Outdated
Comment thread src/content/docs/en/guides/actions.mdx Outdated
Comment thread src/content/docs/en/guides/actions.mdx Outdated
Comment thread src/content/docs/en/reference/modules/astro-actions.mdx
bholmesdev and others added 4 commits November 8, 2024 15:51
Co-authored-by: Armand Philippot <[email protected]>
Co-authored-by: Armand Philippot <[email protected]>
Co-authored-by: Armand Philippot <[email protected]>
Co-authored-by: Armand Philippot <[email protected]>

@sarah11918 sarah11918 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Didn't want to lose this review as the PR is refreshing underneath me, so here's a partial review not yet looking at the API reference file!

(All great stuff here Ben, and only very minor polishing things and some suggestions in case they work.)

Comment thread src/content/docs/en/guides/actions.mdx Outdated
Comment thread src/content/docs/en/guides/actions.mdx Outdated
Comment thread src/content/docs/en/guides/actions.mdx Outdated
Comment thread src/content/docs/en/guides/actions.mdx Outdated
Comment thread src/content/docs/en/guides/actions.mdx Outdated
Comment thread src/content/docs/en/guides/actions.mdx Outdated
Comment thread src/content/docs/en/guides/upgrade-to/v5.mdx Outdated
Comment thread src/content/docs/en/guides/upgrade-to/v5.mdx Outdated
Comment thread src/content/docs/en/guides/upgrade-to/v5.mdx
Comment thread src/content/docs/en/guides/upgrade-to/v5.mdx
Comment thread src/content/docs/en/guides/upgrade-to/v5.mdx Outdated
Comment thread src/content/docs/en/guides/upgrade-to/v5.mdx Outdated
Comment thread src/content/docs/en/guides/actions.mdx Outdated
bholmesdev and others added 3 commits November 8, 2024 16:46
Co-authored-by: Armand Philippot <[email protected]>
Co-authored-by: Sarah Rainsberger <[email protected]>
@bholmesdev

Copy link
Copy Markdown
Contributor Author

Alright, that's all the edits for guides! And it sounds like you're pretty thorough with API reference reviews @ArmandPhilippot. If there are any no-brainer fixes, feel free to commit changes directly to the branch. Won't have as much time to review myself so just want to avoid too much "commit suggestion" back and forth 😄

Comment thread src/content/docs/en/reference/modules/astro-actions.mdx Outdated
@sarah11918 sarah11918 added add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!) 5.0.0-beta labels Nov 11, 2024
Co-authored-by: Armand Philippot <[email protected]>

@sarah11918 sarah11918 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @bholmesdev ! Did my pass on the API reference page and just a few quick things for you to scan/confirm/improve!

Once you're happy with that, this will be fine to merge into beta docs, and Chris and I may yet do a little more overall polish (with everything!) before stable 5, but you won't need to feel those little papercuts!

Comment thread src/content/docs/en/reference/modules/astro-actions.mdx Outdated
Comment thread src/content/docs/en/reference/modules/astro-actions.mdx Outdated
Comment thread src/content/docs/en/reference/modules/astro-actions.mdx Outdated
Comment thread src/content/docs/en/reference/modules/astro-actions.mdx Outdated
Comment thread src/content/docs/en/reference/modules/astro-actions.mdx Outdated
@bholmesdev bholmesdev merged commit 6245c70 into 5.0.0-beta Nov 11, 2024
@bholmesdev bholmesdev deleted the actions-middleware branch November 11, 2024 16:18
@sarah11918

Copy link
Copy Markdown
Member

Not the biggest deal @bholmesdev , but I don't think this has actually been released on beta yet, so the docs are live there now but your feature isn't. 😅 Let me check to see when platform is scheduled to release!

TheOtterlord added a commit that referenced this pull request Nov 11, 2024
@TheOtterlord TheOtterlord restored the actions-middleware branch November 11, 2024 18:04
TheOtterlord added a commit that referenced this pull request Nov 11, 2024
@TheOtterlord TheOtterlord mentioned this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.0.0-beta add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants