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 force a version for the pane provider #8176

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

pedrobonamin
Copy link
Contributor

@pedrobonamin pedrobonamin commented Jan 3, 2025

Description

Sanity assist uses a document defined as liveEdit so not using the global version is not enough, we need to force the published one.

So, this removes the matchGlobalVersion prop and changes it for a forcedVersion allowing the user to define which version to link the paneProvider to.

See the use for when we have a history item selected.

Assist should do the folllowing:

  <DocumentPaneProvider
        {...props}
        forcedVersion={{
     selectedPerspectiveName:"published",
        selectedReleaseId: undefined,
        isReleaseLocked: false,
       }}
      />

What to review

Is there a better naming we could use for the forcedVersion ?

Testing

Notes for release

@pedrobonamin pedrobonamin requested a review from a team as a code owner January 3, 2025 15:50
@pedrobonamin pedrobonamin requested review from cngonzalez and removed request for a team January 3, 2025 15:50
Copy link

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

@pedrobonamin pedrobonamin requested review from bjoerge and removed request for cngonzalez January 3, 2025 15:50
Copy link
Contributor

github-actions bot commented Jan 3, 2025

No changes to documentation

Copy link
Contributor

github-actions bot commented Jan 3, 2025

Component Testing Report Updated Jan 3, 2025 3:59 PM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 3s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 39s 6 0 0
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 29s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 40s 18 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 43s 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 Jan 3, 2025

⚡️ Editor Performance Report

Updated Fri, 03 Jan 2025 16:02:13 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 25.0 efps (40ms) 19.2 efps (52ms) +12ms (+30.0%) 🔴
article (body) 48.3 efps (21ms) 67.8 efps (15ms) -6ms (-28.7%)
article (string inside object) 25.3 efps (40ms) 20.0 efps (50ms) +11ms (+26.6%) 🔴
article (string inside array) 22.7 efps (44ms) 18.2 efps (55ms) +11ms (+25.0%) 🔴
recipe (name) 55.6 efps (18ms) 33.3 efps (30ms) +12ms (+66.7%) 🔴
recipe (description) 62.5 efps (16ms) 35.7 efps (28ms) +12ms (+75.0%) 🔴
recipe (instructions) 99.9+ efps (5ms) 99.9+ efps (5ms) +0ms (-/-%)
synthetic (title) 20.0 efps (50ms) 8.2 efps (122ms) +72ms (+144.0%) 🔴
synthetic (string inside object) 20.0 efps (50ms) 8.2 efps (122ms) +72ms (+144.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) 40ms 52ms 59ms 345ms 683ms 10.0s
article (body) 21ms 24ms 40ms 93ms 210ms 6.0s
article (string inside object) 40ms 43ms 47ms 78ms 133ms 6.8s
article (string inside array) 44ms 47ms 51ms 173ms 139ms 7.2s
recipe (name) 18ms 19ms 23ms 44ms 0ms 6.6s
recipe (description) 16ms 17ms 20ms 35ms 0ms 4.3s
recipe (instructions) 5ms 7ms 8ms 173ms 20ms 3.5s
synthetic (title) 50ms 51ms 58ms 92ms 162ms 12.6s
synthetic (string inside object) 50ms 54ms 61ms 457ms 952ms 8.3s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 52ms 71ms 93ms 532ms 1334ms 11.8s
article (body) 15ms 17ms 20ms 126ms 266ms 5.4s
article (string inside object) 50ms 53ms 62ms 203ms 675ms 8.3s
article (string inside array) 55ms 59ms 67ms 249ms 1063ms 8.8s
recipe (name) 30ms 31ms 36ms 57ms 0ms 7.4s
recipe (description) 28ms 29ms 32ms 39ms 0ms 5.5s
recipe (instructions) 5ms 7ms 8ms 12ms 0ms 3.1s
synthetic (title) 122ms 131ms 149ms 769ms 6022ms 19.2s
synthetic (string inside object) 122ms 129ms 142ms 472ms 5076ms 14.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.

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.

LGTM! forcedVersion is clear and descriptive to me

@pedrobonamin pedrobonamin merged commit e9a5002 into corel Jan 3, 2025
56 of 57 checks passed
@pedrobonamin pedrobonamin deleted the corel-force-pane-version branch January 3, 2025 16: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