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(releases): blocking UI elements that allow for adding documents to inactive releases #7879

Merged
merged 4 commits into from
Dec 6, 2024

Conversation

jordanl17
Copy link
Member

@jordanl17 jordanl17 commented Nov 25, 2024

Description

blockAddDocsToScheduled
Currently if you are in published perspective or a scheduled release perspective, trying to add a new release in studio will show a new draft has been created but will be read only. The global perspective will remain as published or scheduled release even though the document form is showing a draft.

This change disables the UI elements that allow for creating documents in these scenarios.

NOTE: currently the tooltip clarification is the same for published as it is for a scheduled release. This should probably be made clearer to avoid confusion by separating these 2 scenarios, but I'd rather get this initial change in, and can then follow up once the copy has been confirmed later.

What to review

Testing

There aren't currently any tests for these components or for their parents, so adding testing coverage here is a larger task

Notes for release

N/A

Copy link

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

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Nov 25, 2024

Component Testing Report Updated Dec 6, 2024 2:20 PM (UTC)

✅ All Tests Passed -- 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) 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) 54s 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) 15s 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 9s 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 45s 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) 28s 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 25, 2024

⚡️ Editor Performance Report

Updated Fri, 06 Dec 2024 14:22:56 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 22.2 efps (45ms) 16.9 efps (59ms) +14ms (+31.1%) 🔴
article (body) 43.9 efps (23ms) 45.0 efps (22ms) -1ms (-2.6%)
article (string inside object) 24.7 efps (41ms) 17.9 efps (56ms) +16ms (+38.3%) 🔴
article (string inside array) 21.1 efps (48ms) 15.0 efps (67ms) +19ms (+40.0%) 🔴
recipe (name) 40.0 efps (25ms) 25.3 efps (40ms) +15ms (+58.0%) 🔴
recipe (description) 43.5 efps (23ms) 27.0 efps (37ms) +14ms (+60.9%) 🔴
recipe (instructions) 99.9+ efps (10ms) 99.9+ efps (9ms) -1ms (-/-%)
synthetic (title) 17.9 efps (56ms) 7.1 efps (141ms) +85ms (+151.8%) 🔴
synthetic (string inside object) 17.9 efps (56ms) 7.4 efps (135ms) +79ms (+141.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) 45ms 48ms 57ms 176ms 199ms 11.1s
article (body) 23ms 27ms 33ms 95ms 130ms 6.7s
article (string inside object) 41ms 44ms 53ms 74ms 158ms 7.7s
article (string inside array) 48ms 50ms 57ms 338ms 406ms 7.9s
recipe (name) 25ms 27ms 39ms 53ms 0ms 7.8s
recipe (description) 23ms 26ms 30ms 51ms 0ms 5.3s
recipe (instructions) 10ms 12ms 12ms 22ms 0ms 3.9s
synthetic (title) 56ms 60ms 65ms 324ms 728ms 13.1s
synthetic (string inside object) 56ms 59ms 80ms 539ms 1137ms 9.5s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 59ms 65ms 69ms 242ms 1135ms 13.9s
article (body) 22ms 30ms 96ms 167ms 518ms 7.7s
article (string inside object) 56ms 61ms 68ms 227ms 1043ms 9.0s
article (string inside array) 67ms 71ms 78ms 380ms 1718ms 10.0s
recipe (name) 40ms 42ms 46ms 75ms 120ms 9.2s
recipe (description) 37ms 39ms 42ms 90ms 62ms 6.7s
recipe (instructions) 9ms 11ms 15ms 89ms 13ms 3.9s
synthetic (title) 141ms 154ms 180ms 483ms 7494ms 23.9s
synthetic (string inside object) 135ms 142ms 148ms 591ms 6456ms 16.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.

@jordanl17 jordanl17 closed this Nov 27, 2024
@jordanl17 jordanl17 reopened this Nov 27, 2024
@vercel vercel bot temporarily deployed to Preview – test-next-studio November 27, 2024 15:46 Inactive
@bjoerge bjoerge force-pushed the corel branch 2 times, most recently from 2a7e87e to 229ecf3 Compare December 4, 2024 08:35
@jordanl17 jordanl17 force-pushed the corel-270-disable-non-active-release-add branch from 3097e4c to 5edf238 Compare December 6, 2024 12:09
import {usePerspective} from './usePerspective'

/** @internal */
export const useIsReleaseActive = () => {
Copy link
Member

Choose a reason for hiding this comment

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

very much a nit, but I think we tend to use/prefer named functions

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.

Very nice, thank you for this @jordanl17 !

@jordanl17 jordanl17 merged commit 4f2194b into corel Dec 6, 2024
53 of 56 checks passed
@jordanl17 jordanl17 deleted the corel-270-disable-non-active-release-add branch December 6, 2024 17:34
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