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(structure): resolve static types in document list filters #6439

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

ricokahler
Copy link
Contributor

@ricokahler ricokahler commented Apr 21, 2024

Description

There was a bug where the regex used to match static types that would eagerly match type filters that included more than one type. This would cause the document listener to not grab the search config for all the types in certain filter expressions.

For example, the search filter expression:

_type == 'testDocument'  || (_type == 'webhookDocument' && isActive != true

would only grab the search config for the 'testDocument instead of both the testDocument and webhookDocument.

What to review

Does the structure tool still work? Can you provide any filter and it finds all the appropriate types?

Testing

I added a few unit tests and double checked the "Authors & Books"` custom pane.

Notes for release

Fixes a bug that caused types to be incorrectly parsed from filters in the structure tool.

Copy link

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

Copy link
Contributor

No changes to documentation

Copy link
Contributor

Component Testing Report Updated Apr 21, 2024 3:57 PM (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) 25s 6 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 ✅ Passed (Inspect) 1m 4s 15 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 2s 18 0 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 19s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 14s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ❌ Failed (Inspect) 25s 8 0 1

@ricokahler ricokahler marked this pull request as ready for review April 21, 2024 15:57
@ricokahler ricokahler requested a review from a team as a code owner April 21, 2024 15:57
@ricokahler ricokahler requested review from cngonzalez and removed request for a team April 21, 2024 15:57
Copy link
Member

@cngonzalez cngonzalez left a comment

Choose a reason for hiding this comment

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

Could not find any breaking changes here, LGTM

@ricokahler ricokahler added this pull request to the merge queue Apr 22, 2024
Merged via the queue into next with commit 048ce0b Apr 22, 2024
37 checks passed
@ricokahler ricokahler deleted the fix/sructure-static-type-names branch April 22, 2024 20:02
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