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

chore(core): use displayed value for document title #8268

Merged
merged 1 commit into from
Jan 15, 2025
Merged

Conversation

pedrobonamin
Copy link
Contributor

Description

useDocumentTitle is checking for the existence of editState.draft | editState.published
With the introduction of releases this is error prone, because now we can display different values, not only draft or published inside the document pane.

This changes the hook to depend on the displayed value, which will be the value shown in the form.

What to review

Testing

Notes for release

chore(core): use displayed value for document title

@pedrobonamin pedrobonamin requested a review from a team as a code owner January 14, 2025 11:52
@pedrobonamin pedrobonamin requested review from rexxars and removed request for a team January 14, 2025 11:52
Copy link

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

@pedrobonamin pedrobonamin requested review from a team and bjoerge January 14, 2025 11:52
Copy link
Contributor

No changes to documentation

Copy link
Contributor

Component Testing Report Updated Jan 14, 2025 12:01 PM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 4s 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) 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) 25s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 14s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 26s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 1m 6s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 27s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 39s 18 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 Tue, 14 Jan 2025 12:03:43 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 23.8 efps (42ms) 23.8 efps (42ms) +0ms (-/-%)
article (body) 63.3 efps (16ms) 71.9 efps (14ms) -2ms (-/-%)
article (string inside object) 27.0 efps (37ms) 26.0 efps (39ms) +2ms (+4.1%)
article (string inside array) 24.4 efps (41ms) 23.5 efps (43ms) +2ms (+3.7%)
recipe (name) 48.8 efps (21ms) 47.6 efps (21ms) +1ms (+2.4%)
recipe (description) 55.6 efps (18ms) 55.6 efps (18ms) +0ms (-/-%)
recipe (instructions) 99.9+ efps (5ms) 99.9+ efps (6ms) +1ms (-/-%)
synthetic (title) 19.2 efps (52ms) 19.6 efps (51ms) -1ms (-1.9%)
synthetic (string inside object) 18.9 efps (53ms) 18.5 efps (54ms) +1ms (+1.9%)

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) 42ms 54ms 68ms 536ms 964ms 10.5s
article (body) 16ms 18ms 28ms 186ms 245ms 5.6s
article (string inside object) 37ms 40ms 47ms 95ms 203ms 6.7s
article (string inside array) 41ms 45ms 54ms 89ms 287ms 7.0s
recipe (name) 21ms 23ms 24ms 36ms 0ms 7.8s
recipe (description) 18ms 20ms 22ms 29ms 0ms 4.5s
recipe (instructions) 5ms 7ms 8ms 10ms 0ms 3.1s
synthetic (title) 52ms 58ms 64ms 102ms 454ms 12.5s
synthetic (string inside object) 53ms 57ms 65ms 515ms 1354ms 8.8s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 42ms 64ms 71ms 482ms 796ms 10.2s
article (body) 14ms 16ms 20ms 86ms 237ms 5.9s
article (string inside object) 39ms 41ms 45ms 159ms 126ms 6.7s
article (string inside array) 43ms 44ms 48ms 68ms 142ms 6.8s
recipe (name) 21ms 23ms 25ms 55ms 0ms 8.2s
recipe (description) 18ms 20ms 21ms 37ms 0ms 4.7s
recipe (instructions) 6ms 7ms 8ms 21ms 0ms 3.1s
synthetic (title) 51ms 51ms 56ms 97ms 329ms 13.0s
synthetic (string inside object) 54ms 57ms 78ms 409ms 994ms 8.3s

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

Good one!

@pedrobonamin pedrobonamin added this pull request to the merge queue Jan 15, 2025
Merged via the queue into next with commit 9a5fee3 Jan 15, 2025
56 checks passed
@pedrobonamin pedrobonamin deleted the corel-327 branch January 15, 2025 07:08
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