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(comments): make target ref point at published id and add document… #8491

Merged
merged 3 commits into from
Feb 4, 2025

Conversation

bjoerge
Copy link
Member

@bjoerge bjoerge commented Feb 4, 2025

Description

This changes the way comments and tasks reference their targets. Previosly, a _ref to the version id would be made, but with these changes we instead:

  • Always reference the published id of the target (i.e. _ref: 'versions.*' is disallowed the same way as _ref: drafts.* is)
  • When fetching comments for a particular version, we explicitly opt-in using a groq filter. If we're not fetching for a version, the groq filter will exclude comments where target.documentVersionId is set.

What to review

Did I cover all the cases?

Note: I wasn't actually able to make a task that produced a reference to a version id, but I removed the code that seemingly should have make sure that we set the ref to the version id.

Testing

Notes for release

n/a

Copy link

vercel bot commented Feb 4, 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 4, 2025 0:19am
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 4, 2025 0:19am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 4, 2025 0:19am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Feb 4, 2025 0:19am
test-next-studio ⬜️ Ignored (Inspect) Feb 4, 2025 0:19am

Copy link
Contributor

github-actions bot commented Feb 4, 2025

No changes to documentation

Copy link
Contributor

github-actions bot commented Feb 4, 2025

Component Testing Report Updated Feb 4, 2025 12:30 PM (UTC)

❌ Failed Tests (1) -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 6s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ❌ Failed (Inspect) 1m 20s 5 0 1
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 51s 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) 14s 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 33s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 2m 1s 21 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 13s 3 9 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 26s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 1m 44s 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

Copy link
Contributor

github-actions bot commented Feb 4, 2025

⚡️ Editor Performance Report

Updated Tue, 04 Feb 2025 12:31:50 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 26.3 efps (38ms) 16.1 efps (62ms) +24ms (+63.2%) 🔴
article (body) 59.5 efps (17ms) 62.9 efps (16ms) -1ms (-5.4%)
article (string inside object) 26.7 efps (38ms) 23.8 efps (42ms) +5ms (+12.0%)
article (string inside array) 22.2 efps (45ms) 20.8 efps (48ms) +3ms (+6.7%)
recipe (name) 52.6 efps (19ms) 47.6 efps (21ms) +2ms (+10.5%)
recipe (description) 58.8 efps (17ms) 55.6 efps (18ms) +1ms (+5.9%)
recipe (instructions) 99.9+ efps (5ms) 99.9+ efps (5ms) +0ms (-/-%)
synthetic (title) 19.2 efps (52ms) 18.5 efps (54ms) +2ms (+3.8%)
synthetic (string inside object) 19.2 efps (52ms) 19.4 efps (52ms) -1ms (-1.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) 38ms 40ms 44ms 413ms 217ms 11.1s
article (body) 17ms 19ms 31ms 120ms 333ms 5.9s
article (string inside object) 38ms 39ms 48ms 164ms 259ms 6.8s
article (string inside array) 45ms 48ms 55ms 100ms 351ms 7.5s
recipe (name) 19ms 21ms 25ms 52ms 0ms 8.4s
recipe (description) 17ms 19ms 20ms 39ms 0ms 4.5s
recipe (instructions) 5ms 6ms 7ms 23ms 0ms 3.1s
synthetic (title) 52ms 55ms 58ms 414ms 881ms 14.0s
synthetic (string inside object) 52ms 57ms 66ms 432ms 780ms 8.5s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 62ms 77ms 93ms 555ms 1195ms 12.6s
article (body) 16ms 19ms 51ms 77ms 237ms 5.9s
article (string inside object) 42ms 44ms 46ms 231ms 449ms 7.5s
article (string inside array) 48ms 49ms 56ms 244ms 608ms 7.8s
recipe (name) 21ms 23ms 24ms 41ms 0ms 8.3s
recipe (description) 18ms 20ms 23ms 47ms 0ms 4.9s
recipe (instructions) 5ms 7ms 7ms 9ms 0ms 3.1s
synthetic (title) 54ms 57ms 66ms 290ms 972ms 13.3s
synthetic (string inside object) 52ms 55ms 78ms 180ms 817ms 8.2s

📚 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.

@bjoerge bjoerge requested a review from pedrobonamin February 4, 2025 13:20
@bjoerge bjoerge marked this pull request as ready for review February 4, 2025 13:20
@bjoerge bjoerge requested a review from a team as a code owner February 4, 2025 13:20
Copy link
Contributor

@pedrobonamin pedrobonamin left a comment

Choose a reason for hiding this comment

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

Thank you @bjoerge !

@bjoerge bjoerge merged commit 64884f9 into feat/content-releases Feb 4, 2025
57 checks passed
@bjoerge bjoerge deleted the sapp-2043 branch February 4, 2025 13:36
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