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

feat(core/inputs): support custom editor change callback #5803

Merged
merged 2 commits into from
Feb 21, 2024

Conversation

skogsmaskin
Copy link
Member

@skogsmaskin skogsmaskin commented Feb 20, 2024

Description

This will support providing your own PortableTextEditor change callback to the PortableTextInput through props.

Handy for making custom functionality through the component extensions API.

Also provided a Playwright CT test for this.

What to review

That the change is ok.

Testing

See Playwright CT test

Notes for release

  • PortableTextInput now supports providing a custom editor change callback.

@skogsmaskin skogsmaskin requested a review from a team February 20, 2024 19:08
@skogsmaskin skogsmaskin requested a review from a team as a code owner February 20, 2024 19:08
@skogsmaskin skogsmaskin requested review from hermanwikner and juice49 and removed request for a team February 20, 2024 19:08
Copy link

vercel bot commented Feb 20, 2024

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

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview Feb 21, 2024 8:46am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2024 8:46am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Feb 21, 2024 8:46am

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Feb 20, 2024

Component Testing Report Updated Feb 21, 2024 8:51 AM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 33s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 12s 4 2 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 32s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ❌ Failed (Inspect) 41s 14 0 1
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 2s 18 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 20s 9 0 0

This will allow consumers to hook into editor changes by supplying their own handler to the PortableTextInput props
Copy link
Contributor

@juice49 juice49 left a comment

Choose a reason for hiding this comment

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

Looks great to me! 🙌

@skogsmaskin skogsmaskin added this pull request to the merge queue Feb 21, 2024
Merged via the queue into next with commit 1a36a74 Feb 21, 2024
40 checks passed
@skogsmaskin skogsmaskin deleted the feat/pt-input-on-editor-change branch February 21, 2024 10:10
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