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(core): show accurate history for live-edit documents #8497

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

pedrobonamin
Copy link
Contributor

@pedrobonamin pedrobonamin commented Feb 4, 2025

Description

Live edit documents are shown in the Form even if the release selected is not the published one, you can see a live edit document through the drafts perspective.

This PR updates how the id for the Events store is calculated, so the published Id is passed to the history store and not the draft when previewing a live edit document which is missing a draft

What to review

Testing

Notes for release

@pedrobonamin pedrobonamin requested a review from a team as a code owner February 4, 2025 17:50
@pedrobonamin pedrobonamin requested review from rexxars and removed request for a team February 4, 2025 17:50
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 6:03pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 4, 2025 6:03pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 4, 2025 6:03pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Feb 4, 2025 6:03pm
test-next-studio ⬜️ Ignored (Inspect) Feb 4, 2025 6:03pm

@pedrobonamin pedrobonamin requested a review from bjoerge February 4, 2025 17:50
Copy link
Contributor

github-actions bot commented Feb 4, 2025

No changes to documentation

Copy link
Member

@bjoerge bjoerge left a comment

Choose a reason for hiding this comment

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

Nice, thank you @pedrobonamin!

Copy link
Contributor

github-actions bot commented Feb 4, 2025

Component Testing Report Updated Feb 4, 2025 6:01 PM (UTC)

❌ Failed Tests (1) -- 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) 1m 19s 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 8s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 30s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 2m 2s 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 18:18:59 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 23.3 efps (43ms) 21.3 efps (47ms) +4ms (+9.3%)
article (body) 72.2 efps (14ms) 63.5 efps (16ms) +2ms (-/-%)
article (string inside object) 26.3 efps (38ms) 21.5 efps (47ms) +9ms (+22.4%) 🔴
article (string inside array) 23.0 efps (44ms) 19.2 efps (52ms) +9ms (+19.5%)
recipe (name) 52.6 efps (19ms) 43.5 efps (23ms) +4ms (+21.1%) 🔴
recipe (description) 55.6 efps (18ms) 50.0 efps (20ms) +2ms (+11.1%)
recipe (instructions) 99.9+ efps (5ms) 99.9+ efps (5ms) +0ms (-/-%)
synthetic (title) 18.2 efps (55ms) 16.9 efps (59ms) +4ms (+7.3%)
synthetic (string inside object) 18.7 efps (54ms) 17.2 efps (58ms) +5ms (+8.4%)

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) 43ms 49ms 89ms 453ms 1163ms 11.0s
article (body) 14ms 17ms 35ms 179ms 398ms 5.7s
article (string inside object) 38ms 41ms 44ms 170ms 276ms 6.9s
article (string inside array) 44ms 46ms 54ms 149ms 410ms 7.5s
recipe (name) 19ms 21ms 22ms 71ms 0ms 6.8s
recipe (description) 18ms 20ms 23ms 39ms 0ms 4.6s
recipe (instructions) 5ms 7ms 9ms 18ms 0ms 3.1s
synthetic (title) 55ms 59ms 62ms 76ms 799ms 12.7s
synthetic (string inside object) 54ms 58ms 67ms 603ms 1615ms 9.2s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 47ms 52ms 88ms 496ms 1158ms 12.4s
article (body) 16ms 17ms 22ms 186ms 227ms 5.7s
article (string inside object) 47ms 50ms 58ms 234ms 417ms 8.1s
article (string inside array) 52ms 58ms 69ms 189ms 1036ms 8.5s
recipe (name) 23ms 23ms 26ms 40ms 0ms 7.3s
recipe (description) 20ms 21ms 22ms 37ms 0ms 4.7s
recipe (instructions) 5ms 7ms 8ms 32ms 0ms 3.1s
synthetic (title) 59ms 64ms 66ms 267ms 1221ms 14.6s
synthetic (string inside object) 58ms 61ms 78ms 343ms 1597ms 9.1s

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

@pedrobonamin pedrobonamin added this pull request to the merge queue Feb 4, 2025
Merged via the queue into next with commit ccb2a4f Feb 4, 2025
57 checks passed
@pedrobonamin pedrobonamin deleted the live-edit-history-fix branch February 4, 2025 18:19
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