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

fix(core): remove id from patch when using server actions #6751

Merged
merged 1 commit into from
May 23, 2024

Conversation

bjoerge
Copy link
Member

@bjoerge bjoerge commented May 23, 2024

Description

When using server actions, we forwarded the patch mutations as-is, but that means they would also include the document id. The doucment ID is alredy provided as part of the actions payload, and should not be part of the action's patch here.

What to review

The diff :)

Testing

This was already covered by a test that I've updated.

Notes for release

N/A

Copy link

vercel bot commented May 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ❌ Failed (Inspect) May 23, 2024 0:41am
performance-studio ✅ Ready (Inspect) Visit Preview May 23, 2024 0:41am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 23, 2024 0:41am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 23, 2024 0:41am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview May 23, 2024 0:41am

@@ -149,7 +149,9 @@ export default defineConfig([
basePath: '/test',
icon: SanityMonogram,
// eslint-disable-next-line camelcase
__internal_serverDocumentActions: {},
__internal_serverDocumentActions: {
enabled: true,
Copy link
Member Author

Choose a reason for hiding this comment

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

wasn't aware we had turned it off, so turning it on again here

@bjoerge bjoerge force-pushed the fix/remove-id-from-patch-when-using-server-actions branch from 0abd48f to 7ad4196 Compare May 23, 2024 11:57
Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented May 23, 2024

Component Testing Report Updated May 23, 2024 12:46 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 35s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 26s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 31s 11 7 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 14s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 8s 3 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 36s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 16s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 3s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 7s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 20s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 14s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 29s 12 0 0

Copy link
Contributor

@j33ty j33ty left a comment

Choose a reason for hiding this comment

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

Looks good.

@bjoerge bjoerge added this pull request to the merge queue May 23, 2024
Merged via the queue into next with commit 7b90cad May 23, 2024
41 of 42 checks passed
@bjoerge bjoerge deleted the fix/remove-id-from-patch-when-using-server-actions branch May 23, 2024 13:41
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.

2 participants