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): duplicate should work with version documents #8323

Open
wants to merge 1 commit into
base: corel
Choose a base branch
from

Conversation

pedrobonamin
Copy link
Contributor

Description

Duplicate action should work with versions.
This PR updates how the id is created for the new document created by the duplicate action, if it's a version id it will preserve the version and it won't create a draft document.

What to review

Is this correct?

Testing

Open a version document.
Click on duplicate, it should create a new document in the same release.

Non version documents should continue being created as draft or live documents.

Notes for release

@pedrobonamin pedrobonamin requested a review from a team as a code owner January 18, 2025 14:48
@pedrobonamin pedrobonamin requested review from juice49 and removed request for a team January 18, 2025 14:48
Copy link

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

Copy link
Contributor

No changes to documentation

Copy link
Contributor

Component Testing Report Updated Jan 18, 2025 2:58 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 20s 5 0 1
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 50s 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 30s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 2m 1s 21 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 12s 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

⚡️ Editor Performance Report

Updated Sat, 18 Jan 2025 15:00:28 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 27.0 efps (37ms) 28.6 efps (35ms) -2ms (-5.4%)
article (body) 72.7 efps (14ms) 68.3 efps (15ms) +1ms (-/-%)
article (string inside object) 27.0 efps (37ms) 29.4 efps (34ms) -3ms (-8.1%)
article (string inside array) 25.6 efps (39ms) 25.3 efps (40ms) +1ms (+1.3%)
recipe (name) 54.1 efps (19ms) 62.5 efps (16ms) -3ms (-13.5%)
recipe (description) 58.8 efps (17ms) 66.7 efps (15ms) -2ms (-11.8%)
recipe (instructions) 99.9+ efps (5ms) 99.9+ efps (6ms) +1ms (-/-%)
synthetic (title) 18.9 efps (53ms) 20.2 efps (50ms) -4ms (-6.6%)
synthetic (string inside object) 19.6 efps (51ms) 19.6 efps (51ms) +0ms (-/-%)

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) 37ms 43ms 50ms 311ms 170ms 9.9s
article (body) 14ms 16ms 20ms 194ms 218ms 4.9s
article (string inside object) 37ms 38ms 41ms 199ms 134ms 6.6s
article (string inside array) 39ms 41ms 42ms 141ms 135ms 6.4s
recipe (name) 19ms 21ms 23ms 46ms 0ms 7.0s
recipe (description) 17ms 18ms 20ms 35ms 0ms 4.3s
recipe (instructions) 5ms 7ms 8ms 9ms 0ms 3.1s
synthetic (title) 53ms 56ms 61ms 79ms 453ms 12.1s
synthetic (string inside object) 51ms 56ms 65ms 479ms 1065ms 8.4s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 35ms 55ms 65ms 177ms 740ms 10.6s
article (body) 15ms 18ms 20ms 54ms 209ms 5.5s
article (string inside object) 34ms 36ms 47ms 207ms 252ms 6.7s
article (string inside array) 40ms 43ms 49ms 159ms 132ms 6.7s
recipe (name) 16ms 18ms 20ms 38ms 0ms 6.8s
recipe (description) 15ms 16ms 18ms 33ms 0ms 4.4s
recipe (instructions) 6ms 7ms 8ms 13ms 0ms 3.1s
synthetic (title) 50ms 51ms 56ms 68ms 293ms 12.2s
synthetic (string inside object) 51ms 56ms 63ms 479ms 1303ms 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.

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.

1 participant