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(docs): replace previewDrafts with drafts #8601

Merged
merged 1 commit into from
Feb 12, 2025
Merged

Conversation

stipsan
Copy link
Member

@stipsan stipsan commented Feb 11, 2025

Since sanity-io/client#1007 the client warns when using perspective: 'previewDrafts'. This PR refactors to the new perspective: 'drafts' approach.

Since sanity-io/client#1007 the client warns when using `perspective: 'previewDrafts'`. This PR refactors to the new `perspective: 'drafts'` approach.
@stipsan stipsan requested a review from a team as a code owner February 11, 2025 19:29
Copy link

vercel bot commented Feb 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 11, 2025 7:36pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 11, 2025 7:36pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 11, 2025 7:36pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Feb 11, 2025 7:36pm
test-next-studio ⬜️ Ignored (Inspect) Feb 11, 2025 7:36pm

@stipsan stipsan enabled auto-merge February 11, 2025 19:29
Copy link
Contributor

No changes to documentation

Copy link
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 42.47% 53775 / 126615
🔵 Statements 42.47% 53775 / 126615
🔵 Functions 47.95% 2772 / 5781
🔵 Branches 78.86% 10308 / 13071
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/sanity/src/presentation/PresentationTool.tsx 0% 0% 0% 0% 1-622
packages/sanity/src/presentation/useMainDocument.ts 24.63% 100% 20% 24.63% 20-58, 102-194
packages/sanity/src/presentation/editor/PostMessagePreviewSnapshots.tsx 0% 0% 0% 0% 1-131
Generated in workflow #30192 for commit 0f237a5 by the Vitest Coverage Report Action

Copy link
Contributor

⚡️ Editor Performance Report

Updated Tue, 11 Feb 2025 19:43:10 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 27.0 efps (37ms) 24.4 efps (41ms) +4ms (+10.8%)
article (body) 72.7 efps (14ms) 77.8 efps (13ms) -1ms (-/-%)
article (string inside object) 27.8 efps (36ms) 25.0 efps (40ms) +4ms (+11.1%)
article (string inside array) 25.0 efps (40ms) 21.7 efps (46ms) +6ms (+15.0%)
recipe (name) 52.6 efps (19ms) 55.6 efps (18ms) -1ms (-5.3%)
recipe (description) 60.6 efps (17ms) 60.6 efps (17ms) +0ms (-/-%)
recipe (instructions) 99.9+ efps (5ms) 99.9+ efps (5ms) +0ms (-/-%)
synthetic (title) 20.0 efps (50ms) 19.2 efps (52ms) +2ms (+4.0%)
synthetic (string inside object) 20.0 efps (50ms) 19.2 efps (52ms) +2ms (+4.0%)

efps — editor "frames per second". The number of updates assumed to be possible within a second.

Derived from input latency. efps = 1000 / input_latency

Detailed information

🏠 Reference result

The performance result of sanity@latest

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 37ms 41ms 46ms 392ms 663ms 10.9s
article (body) 14ms 16ms 18ms 159ms 215ms 5.2s
article (string inside object) 36ms 38ms 46ms 141ms 234ms 6.6s
article (string inside array) 40ms 43ms 52ms 198ms 334ms 7.0s
recipe (name) 19ms 20ms 27ms 44ms 0ms 7.0s
recipe (description) 17ms 18ms 20ms 52ms 0ms 4.4s
recipe (instructions) 5ms 6ms 8ms 10ms 0ms 3.0s
synthetic (title) 50ms 53ms 56ms 242ms 549ms 12.3s
synthetic (string inside object) 50ms 54ms 87ms 356ms 804ms 8.4s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 41ms 49ms 71ms 438ms 809ms 11.1s
article (body) 13ms 15ms 17ms 72ms 74ms 4.8s
article (string inside object) 40ms 42ms 47ms 341ms 460ms 7.5s
article (string inside array) 46ms 47ms 53ms 280ms 467ms 7.6s
recipe (name) 18ms 21ms 24ms 51ms 0ms 20.7s
recipe (description) 17ms 17ms 18ms 39ms 0ms 4.3s
recipe (instructions) 5ms 7ms 8ms 20ms 0ms 3.1s
synthetic (title) 52ms 55ms 64ms 215ms 875ms 12.6s
synthetic (string inside object) 52ms 57ms 64ms 534ms 1241ms 8.8s

📚 Glossary

column definitions

  • benchmark — the name of the test, e.g. "article", followed by the label of the field being measured, e.g. "(title)".
  • latency — the time between when a key was pressed and when it was rendered. derived from a set of samples. the median (p50) is shown to show the most common latency.
  • p75 — the 75th percentile of the input latency in the test run. 75% of the sampled inputs in this benchmark were processed faster than this value. this provides insight into the upper range of typical performance.
  • p90 — the 90th percentile of the input latency in the test run. 90% of the sampled inputs were faster than this. this metric helps identify slower interactions that occurred less frequently during the benchmark.
  • p99 — the 99th percentile of the input latency in the test run. only 1% of sampled inputs were slower than this. this represents the worst-case scenarios encountered during the benchmark, useful for identifying potential performance outliers.
  • blocking time — the total time during which the main thread was blocked, preventing user input and UI updates. this metric helps identify performance bottlenecks that may cause the interface to feel unresponsive.
  • test duration — how long the test run took to complete.

Copy link
Contributor

github-actions bot commented Feb 11, 2025

Component Testing Report Updated Feb 11, 2025 8:13 PM (UTC)

❌ Failed Tests (3) -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 5s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ❌ Failed (Inspect) 2m 33s 3 0 3
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 54s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 26s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 15s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 27s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 1m 7s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 37s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 2m 5s 21 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 13s 3 9 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 27s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 1m 45s 21 0 0
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 0s 0 3 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 0s 0 3 0

@stipsan stipsan added this pull request to the merge queue Feb 12, 2025
Merged via the queue into next with commit ab6d8b0 Feb 12, 2025
63 checks passed
@stipsan stipsan deleted the rename-previewDrafts branch February 12, 2025 09:11
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