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

feat(structure): edit liveEdit documents through the global draft perspective #8480

Merged
merged 5 commits into from
Feb 3, 2025

Conversation

pedrobonamin
Copy link
Contributor

Description

This PR updates how the liveEdit documents behave and allows users to edit them while being on the draft perspective.
Instead of forcing them to switch to the published perspective it shows them with the published badge that they are gonna be editing the published document and not the draft. It also adds information in the draft badge on why that one is disabled.

We have two different scenarios to consider for the liveEdit documents, draft exists or not.
In most cases the draft won't exist, given it's a live edit.

No draft

Publish perspective Drafts perspective
Screenshot 2025-02-03 at 09 30 51 Screenshot 2025-02-03 at 09 30 42

Draft exists

Publish perspective Drafts perspective
Screenshot 2025-02-03 at 09 31 43 Screenshot 2025-02-03 at 09 31 37

What to review

Testing

Notes for release

@pedrobonamin pedrobonamin requested a review from a team as a code owner February 3, 2025 14:25
@pedrobonamin pedrobonamin requested review from jordanl17 and removed request for a team February 3, 2025 14:25
Copy link

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

@pedrobonamin pedrobonamin changed the title Feat/content releases live edit feat(structure): edit liveEdit documents through the global draft perspective Feb 3, 2025
Copy link
Contributor

github-actions bot commented Feb 3, 2025

No changes to documentation

Copy link
Contributor

github-actions bot commented Feb 3, 2025

Component Testing Report Updated Feb 3, 2025 2:35 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 22s 5 0 1
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 52s 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 34s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 2m 4s 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 46s 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 3, 2025

⚡️ Editor Performance Report

Updated Mon, 03 Feb 2025 14:37:42 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 25.0 efps (40ms) 23.5 efps (43ms) +3ms (+6.3%)
article (body) 72.2 efps (14ms) 67.6 efps (15ms) +1ms (-/-%)
article (string inside object) 27.8 efps (36ms) 26.3 efps (38ms) +2ms (+5.6%)
article (string inside array) 24.4 efps (41ms) 23.0 efps (44ms) +3ms (+6.1%)
recipe (name) 50.0 efps (20ms) 45.5 efps (22ms) +2ms (+10.0%)
recipe (description) 55.6 efps (18ms) 52.6 efps (19ms) +1ms (+5.6%)
recipe (instructions) 99.9+ efps (6ms) 99.9+ efps (6ms) +0ms (-/-%)
synthetic (title) 19.2 efps (52ms) 19.2 efps (52ms) +0ms (-/-%)
synthetic (string inside object) 18.9 efps (53ms) 20.0 efps (50ms) -3ms (-5.7%)

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) 40ms 48ms 56ms 176ms 63ms 10.5s
article (body) 14ms 16ms 29ms 136ms 208ms 4.9s
article (string inside object) 36ms 38ms 45ms 244ms 304ms 6.8s
article (string inside array) 41ms 45ms 48ms 171ms 406ms 7.1s
recipe (name) 20ms 22ms 28ms 51ms 0ms 7.9s
recipe (description) 18ms 19ms 21ms 37ms 0ms 4.7s
recipe (instructions) 6ms 8ms 8ms 12ms 0ms 3.2s
synthetic (title) 52ms 56ms 60ms 323ms 640ms 12.3s
synthetic (string inside object) 53ms 56ms 63ms 508ms 1324ms 8.6s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 43ms 65ms 81ms 466ms 926ms 11.2s
article (body) 15ms 16ms 19ms 70ms 297ms 5.4s
article (string inside object) 38ms 40ms 46ms 255ms 293ms 6.7s
article (string inside array) 44ms 46ms 48ms 154ms 336ms 7.2s
recipe (name) 22ms 24ms 27ms 40ms 0ms 7.6s
recipe (description) 19ms 20ms 23ms 38ms 0ms 4.7s
recipe (instructions) 6ms 8ms 9ms 32ms 0ms 3.3s
synthetic (title) 52ms 53ms 62ms 318ms 792ms 12.7s
synthetic (string inside object) 50ms 54ms 63ms 449ms 756ms 8.7s

📚 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 merged commit 9afe969 into feat/content-releases Feb 3, 2025
55 of 56 checks passed
@pedrobonamin pedrobonamin deleted the feat/content-releases-live-edit branch February 3, 2025 14:37
pedrobonamin added a commit that referenced this pull request Feb 4, 2025
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