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): check that path is lengthy #5875

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

skogsmaskin
Copy link
Member

@skogsmaskin skogsmaskin commented Feb 28, 2024

Description

This will validate that a range path is lengthy before we return a non-null EditorSelection.

Empty Range paths don't make sense in the PTE and will lead to bugs.

Also fixed a test that was using the wrong block type, and was incorrectly passing before this fix.

What to review

That the tests pass.

Testing

See the automatic tests.

Notes for release

N/A

Empty paths should not be returned, as it doesn't make sense and leads to bugs.
@skogsmaskin skogsmaskin requested review from a team and ninaandal and removed request for a team February 28, 2024 20:33
Copy link

vercel bot commented Feb 28, 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 28, 2024 8:35pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 28, 2024 8:35pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Feb 28, 2024 8:35pm

Copy link
Contributor

No changes to documentation

@skogsmaskin skogsmaskin requested review from hermanwikner and removed request for ninaandal February 28, 2024 20:39
Copy link
Contributor

Component Testing Report Updated Feb 28, 2024 8:42 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 31s 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) 13s 4 2 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 12s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 32s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 0s 15 0 0
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) 21s 9 0 0

@skogsmaskin skogsmaskin added this pull request to the merge queue Feb 29, 2024
Merged via the queue into next with commit 2deebb1 Feb 29, 2024
40 checks passed
@skogsmaskin skogsmaskin deleted the fix/pte-range-validation branch February 29, 2024 12:50
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