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(structure): add support to edit live documents in published perspective #7904

Merged
merged 2 commits into from
Nov 28, 2024

Conversation

pedrobonamin
Copy link
Contributor

Description

This PR changes how the readOnly state in the document pane provider works to support editing live edit document from the published view, and it disables editing them in the draft view.

draft mode Publish mode
Screenshot 2024-11-28 at 14 22 49 Screenshot 2024-11-28 at 14 22 57

What to review

Testing

Notes for release

@pedrobonamin pedrobonamin requested a review from a team as a code owner November 28, 2024 13:24
@pedrobonamin pedrobonamin requested review from bjoerge and removed request for a team November 28, 2024 13:24
Copy link

vercel bot commented Nov 28, 2024

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 Nov 28, 2024 2:23pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 28, 2024 2:23pm
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 28, 2024 2:23pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 28, 2024 2:23pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Nov 28, 2024 2:23pm

Copy link
Contributor

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!

Copy link
Contributor

github-actions bot commented Nov 28, 2024

Component Testing Report Updated Nov 28, 2024 2:19 PM (UTC)

✅ All Tests Passed -- 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) 13s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 39s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 53s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 27s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 14s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 3m 0s 0 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 1m 8s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 2m 47s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 46s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 13s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 41s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 27s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 54s 12 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 Nov 28, 2024

⚡️ Editor Performance Report

Updated Thu, 28 Nov 2024 14:21:13 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 23.3 efps (43ms) 15.2 efps (66ms) +23ms (+53.5%) 🔴
article (body) 58.0 efps (17ms) 52.1 efps (19ms) +2ms (+11.3%)
article (string inside object) 25.0 efps (40ms) 16.4 efps (61ms) +21ms (+52.5%) 🔴
article (string inside array) 22.2 efps (45ms) 15.2 efps (66ms) +21ms (+46.7%) 🔴
recipe (name) 47.6 efps (21ms) 25.6 efps (39ms) +18ms (+85.7%) 🔴
recipe (description) 55.6 efps (18ms) 27.0 efps (37ms) +19ms (+105.6%) 🔴
recipe (instructions) 99.9+ efps (7ms) 99.9+ efps (6ms) -1ms (-/-%)
synthetic (title) 18.3 efps (55ms) 6.6 efps (152ms) +97ms (+178.0%) 🔴
synthetic (string inside object) 17.5 efps (57ms) 6.8 efps (146ms) +89ms (+156.1%) 🔴

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 48ms 62ms 295ms 261ms 13.4s
article (body) 17ms 21ms 46ms 189ms 235ms 6.0s
article (string inside object) 40ms 42ms 45ms 260ms 172ms 7.1s
article (string inside array) 45ms 47ms 57ms 226ms 268ms 7.4s
recipe (name) 21ms 24ms 28ms 37ms 0ms 7.2s
recipe (description) 18ms 19ms 23ms 37ms 0ms 4.6s
recipe (instructions) 7ms 9ms 11ms 40ms 0ms 3.6s
synthetic (title) 55ms 59ms 70ms 158ms 659ms 15.1s
synthetic (string inside object) 57ms 59ms 73ms 312ms 712ms 8.4s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 66ms 72ms 82ms 362ms 1581ms 14.6s
article (body) 19ms 24ms 42ms 206ms 370ms 6.2s
article (string inside object) 61ms 66ms 71ms 187ms 1465ms 9.6s
article (string inside array) 66ms 71ms 83ms 304ms 1572ms 9.7s
recipe (name) 39ms 40ms 47ms 88ms 73ms 9.0s
recipe (description) 37ms 40ms 41ms 55ms 26ms 6.6s
recipe (instructions) 6ms 7ms 9ms 17ms 0ms 3.1s
synthetic (title) 152ms 160ms 171ms 599ms 8147ms 24.3s
synthetic (string inside object) 146ms 150ms 172ms 722ms 6953ms 17.0s

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

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