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): prevent duplication of search filters when listenSearchQuery is used (e.g. in document lists) #6247

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

juice49
Copy link
Contributor

@juice49 juice49 commented Apr 8, 2024

Description

Both the createSearch factory and the returned search function accept a filter option. These filters are additive (joined together using the && operator). We were accidentally providing the same filter to both functions, causing it to be needlessly duplicated in the produced search request.

What to review

Document list filtering and search works the same way as before, but the produced search request no longer contains duplicated filters.

Testing

We do not have tests for the listenSearchQuery function at the moment. Given this is a very limited change, I've not invested in adding a test suite at this point in time.

Copy link

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

@juice49 juice49 changed the title fix(structure): prevent duplication of search filters when `listenSea… fix(structure): prevent duplication of search filters when listenSearchQuery is used (e.g. in document lists) Apr 8, 2024
Copy link
Contributor

github-actions bot commented Apr 8, 2024

No changes to documentation

Copy link
Contributor

github-actions bot commented Apr 8, 2024

Component Testing Report Updated Apr 8, 2024 10:00 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) 26s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 12s 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 2s 15 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 0s 18 0 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 11s 6 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 19s 9 0 0

@juice49 juice49 requested review from ricokahler and removed request for ricokahler April 8, 2024 10:19
@juice49 juice49 marked this pull request as ready for review April 8, 2024 10:19
@juice49 juice49 requested a review from a team as a code owner April 8, 2024 10:19
@juice49 juice49 requested review from rexxars and removed request for a team April 8, 2024 10:19
Copy link
Member

@rexxars rexxars left a comment

Choose a reason for hiding this comment

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

👍

@juice49 juice49 added this pull request to the merge queue Apr 9, 2024
Merged via the queue into next with commit fce97c7 Apr 9, 2024
36 checks passed
@juice49 juice49 deleted the fix/duplicated-search-filter branch April 9, 2024 08:14
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