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(portable-text-editor): fix issue with decorating inline objects #6531

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

skogsmaskin
Copy link
Member

@skogsmaskin skogsmaskin commented Apr 30, 2024

Description

There was a bug where if the range decoration included an inline object, if would get stuck in a render loop causing the browser to freeze up.

The oversight was not accounting for that inline objects have a path length of 3 inside Slate when returning matching nodes to decorate.

What to review

Testing

Notes for release

Fix issue with inline text comments that would include an inline object.

@skogsmaskin skogsmaskin requested a review from a team as a code owner April 30, 2024 11:18
@skogsmaskin skogsmaskin requested review from pedrobonamin and removed request for a team April 30, 2024 11:18
Copy link

vercel bot commented Apr 30, 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 Apr 30, 2024 11:20am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2024 11:20am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2024 11:20am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Apr 30, 2024 11:20am

Copy link
Contributor

No changes to documentation

@skogsmaskin skogsmaskin added this pull request to the merge queue Apr 30, 2024
Merged via the queue into next with commit f03f6eb Apr 30, 2024
32 of 36 checks passed
@skogsmaskin skogsmaskin deleted the fix/pt-input-decoration-inline-object-bug branch April 30, 2024 11:21
Copy link
Contributor

Component Testing Report Updated Apr 30, 2024 11:26 AM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 38s 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) 20s 6 3 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 35s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 5s 14 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 4s 18 0 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) 22s 9 0 0

@skogsmaskin skogsmaskin restored the fix/pt-input-decoration-inline-object-bug branch April 30, 2024 14:08
@skogsmaskin skogsmaskin deleted the fix/pt-input-decoration-inline-object-bug branch April 30, 2024 14:09
cngonzalez pushed a commit that referenced this pull request May 8, 2024
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.

None yet

2 participants