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

refactor(core): use path toString function from @sanity/util/paths #5987

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

juice49
Copy link
Contributor

@juice49 juice49 commented Mar 13, 2024

Description

When deriving search weights, we previously relied on a new pathToString function that replicated much of the functionality already implemented in the toString function from @sanity/util/paths. The one additional piece of functionality (handling segments that are true, false, or null) has now been implemented in #5986. Once merged, we can remove the redundant pathToString function and switch to the toString function from @sanity/util/paths.

What to review

  • Search requests are constructed correctly.

Testing

There are tests for this functionality in packages/sanity/src/core/search/common/__tests__/deriveSearchWeightsFromType.test.ts.

Copy link

vercel bot commented Mar 13, 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 Mar 18, 2024 4:52pm
studio-workshop 🔄 Building (Inspect) Visit Preview 💬 Add feedback Mar 18, 2024 4:52pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 18, 2024 4:52pm

Copy link
Contributor Author

juice49 commented Mar 13, 2024

Copy link
Contributor

github-actions bot commented Mar 13, 2024

Package Documentation Change
sanity -1%
@sanity/diff -38%
Full Report
@sanity/migrate
This branch Next branch
17 documented 17 documented
71 not documented 59 not documented
@sanity/block-tools
This branch Next branch
4 documented 4 documented
9 not documented 9 not documented
@sanity/types
This branch Next branch
55 documented 55 documented
234 not documented 240 not documented
sanity/desk
This branch Next branch
84 documented 84 documented
64 not documented 64 not documented
@sanity/portable-text-editor
This branch Next branch
23 documented 23 documented
44 not documented 44 not documented
@sanity/mutator
This branch Next branch
7 documented 7 documented
3 not documented 4 not documented
@sanity/cli
This branch Next branch
1 documented 1 documented
31 not documented 31 not documented
sanity/structure
This branch Next branch
2 documented 2 documented
8 not documented 8 not documented
@sanity/util/concurrency-limiter
This branch Next branch
1 documented 1 documented
0 not documented 0 not documented
@sanity/util/legacyDateFormat
This branch Next branch
0 documented 0 documented
4 not documented 5 not documented
@sanity/schema/_internal
This branch Next branch
0 documented 0 documented
13 not documented 13 not documented
@sanity/util/paths
This branch Next branch
1 documented 1 documented
15 not documented 15 not documented
sanity/router
This branch Next branch
17 documented 17 documented
26 not documented 26 not documented
@sanity/schema
This branch Next branch
0 documented 0 documented
2 not documented 2 not documented
sanity/cli
This branch Next branch
2 documented 2 documented
0 not documented 0 not documented
@sanity/vision
This branch Next branch
0 documented 0 documented
3 not documented 3 not documented
@sanity/util/fs
This branch Next branch
0 documented 0 documented
3 not documented 3 not documented
sanity/_internal
This branch Next branch
0 documented 0 documented
1 not documented 1 not documented
@sanity/util/client
This branch Next branch
1 documented 1 documented
0 not documented 0 not documented
@sanity/util/createSafeJsonParser
This branch Next branch
1 documented 1 documented
0 not documented 0 not documented
sanity/_internalBrowser
This branch Next branch
0 documented 0 documented
3 not documented 4 not documented
@sanity/util/content
This branch Next branch
1 documented 1 documented
5 not documented 5 not documented
sanity
This branch Next branch
179 documented 182 documented
859 not documented 872 not documented
@sanity/diff
This branch Next branch
13 documented 21 documented
16 not documented 8 not documented

Copy link
Contributor

github-actions bot commented Mar 13, 2024

Component Testing Report Updated Mar 18, 2024 4:55 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 33s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 5s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 11s 3 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 12s 4 2 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 11s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 30s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 56s 15 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 58s 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) 18s 9 0 0

@juice49 juice49 marked this pull request as ready for review March 13, 2024 11:35
@juice49 juice49 requested review from a team, pedrobonamin and jtpetty and removed request for a team March 13, 2024 11:35
@juice49 juice49 requested a review from pedrobonamin March 14, 2024 16:56
Copy link
Contributor Author

juice49 commented Mar 18, 2024

Merge activity

  • Mar 18, 12:45 PM EDT: @juice49 started a stack merge that includes this pull request via Graphite.
  • Mar 18, 12:46 PM EDT: Graphite rebased this pull request as part of a merge.
  • Mar 18, 12:47 PM EDT: @juice49 merged this pull request with Graphite.

Base automatically changed from fix/groq-data-type-path-access to next March 18, 2024 16:46
@juice49 juice49 requested a review from a team as a code owner March 18, 2024 16:46
@juice49 juice49 force-pushed the feat/refactor-search-weight-paths branch from e20cde8 to d115124 Compare March 18, 2024 16:46
@juice49 juice49 merged commit 522477a into next Mar 18, 2024
25 of 27 checks passed
@juice49 juice49 deleted the feat/refactor-search-weight-paths branch March 18, 2024 16:47
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