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(core): option to exclude draft perspective #8028

Merged
merged 3 commits into from
Dec 13, 2024
Merged

Conversation

pedrobonamin
Copy link
Contributor

@pedrobonamin pedrobonamin commented Dec 13, 2024

Description

Adds drafts to the perspective menu list and adds the ability to hide it.
This is specially useful when previewing content in presentation or other tools, to avoid adding the drafts to the list of perspective stack.

Screenshot 2024-12-13 at 09 02 17 Screenshot 2024-12-13 at 09 02 28 Screenshot 2024-12-13 at 09 02 36

What to review

Are this changes correct?

Testing

New tests added for this new behavior

Notes for release

Copy link

vercel bot commented Dec 13, 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 Dec 13, 2024 0:50am
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 0:50am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 0:50am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 0:50am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Dec 13, 2024 0:50am

Copy link
Contributor

No changes to documentation

@pedrobonamin pedrobonamin changed the title feat(core): add option to exclude draft perspective from releases stack feat(core): option to exclude draft perspective - usePerspective refactor Dec 13, 2024
Copy link
Contributor

github-actions bot commented Dec 13, 2024

Component Testing Report Updated Dec 13, 2024 12:21 PM (UTC)

❌ Failed Tests (6) -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 12s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 14s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 42s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 56s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 28s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 16s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ❌ Failed (Inspect) 4m 28s 0 0 6
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 1m 12s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 2m 49s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 49s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 14s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 43s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 29s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 1m 54s 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 Dec 13, 2024

⚡️ Editor Performance Report

Updated Fri, 13 Dec 2024 12:21:45 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 21.7 efps (46ms) 16.1 efps (62ms) +16ms (+34.8%) 🔴
article (body) 59.7 efps (17ms) 59.9 efps (17ms) -0ms (-0.3%)
article (string inside object) 25.6 efps (39ms) 16.5 efps (61ms) +22ms (+55.1%) 🔴
article (string inside array) 22.2 efps (45ms) 15.9 efps (63ms) +18ms (+40.0%) 🔴
recipe (name) 50.0 efps (20ms) 28.6 efps (35ms) +15ms (+75.0%) 🔴
recipe (description) 55.6 efps (18ms) 32.3 efps (31ms) +13ms (+72.2%) 🔴
recipe (instructions) 99.9+ efps (5ms) 99.9+ efps (5ms) +0ms (-/-%)
synthetic (title) 19.6 efps (51ms) 7.1 efps (140ms) +89ms (+174.5%) 🔴
synthetic (string inside object) 18.9 efps (53ms) 7.6 efps (132ms) +79ms (+149.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) 46ms 50ms 59ms 275ms 311ms 11.5s
article (body) 17ms 19ms 22ms 132ms 266ms 5.8s
article (string inside object) 39ms 41ms 46ms 170ms 155ms 6.8s
article (string inside array) 45ms 47ms 62ms 343ms 247ms 7.8s
recipe (name) 20ms 23ms 25ms 41ms 0ms 7.5s
recipe (description) 18ms 19ms 22ms 38ms 0ms 4.5s
recipe (instructions) 5ms 7ms 8ms 53ms 0ms 3.2s
synthetic (title) 51ms 52ms 58ms 265ms 588ms 13.0s
synthetic (string inside object) 53ms 62ms 91ms 320ms 920ms 8.6s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 62ms 68ms 96ms 214ms 1400ms 13.5s
article (body) 17ms 21ms 35ms 231ms 396ms 6.8s
article (string inside object) 61ms 63ms 76ms 118ms 1176ms 9.0s
article (string inside array) 63ms 69ms 89ms 153ms 1451ms 9.5s
recipe (name) 35ms 37ms 41ms 48ms 7ms 9.7s
recipe (description) 31ms 32ms 34ms 62ms 0ms 5.8s
recipe (instructions) 5ms 7ms 8ms 23ms 0ms 3.1s
synthetic (title) 140ms 147ms 157ms 539ms 6674ms 21.6s
synthetic (string inside object) 132ms 144ms 152ms 812ms 6454ms 15.5s

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

: getReleaseIdFromReleaseDocumentId(releaseId)
const isReleasePerspectiveExcluded = isPerspectiveExcluded(releasePerspectiveId)

// eslint-disable-next-line no-nested-ternary
Copy link
Contributor Author

@pedrobonamin pedrobonamin Dec 13, 2024

Choose a reason for hiding this comment

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

This will be removed once we refactor latest to just be LATEST = "drafts" as part of #8029

@pedrobonamin pedrobonamin marked this pull request as ready for review December 13, 2024 08:36
@pedrobonamin pedrobonamin requested a review from a team as a code owner December 13, 2024 08:36
@pedrobonamin pedrobonamin requested review from ricokahler and jordanl17 and removed request for a team and ricokahler December 13, 2024 08:36
@pedrobonamin pedrobonamin changed the title feat(core): option to exclude draft perspective - usePerspective refactor feat(core): option to exclude draft perspective Dec 13, 2024
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