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(deps): upgrade @tanstack/react-virtual to v3.11.1 #8062

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

Conversation

rexxars
Copy link
Member

@rexxars rexxars commented Dec 14, 2024

Description

Moves the dependency out of the beta range, and brings React 19 support which is why this is happening now.

@binoy14 There were some minor crashes in the array input after upgrading - the observeElementOffset seems to need a second argument, isScrolling. I assumed that since we were calling this from a scroll handler it would be safe to set this to always be true, but we're also calling it once on "mount", at which point I am giving it false. Additionally, the virtual items seems to start at an empty array now, which crashed when attempting to use the first element in the styles. Can you see that things works as expected? I did some testing and to my eyes it appears to work fine.

@robinpyon I am requesting a review from you since you have been involved in multiple components that utilize this library: scheduled publishing and CommandList being the two I can find. CommandList is being used quite a number of places, and from what I can tell things seems to work fine - but would really appreciate a quick run through to double check.

What to review

That things still work as expected. Surfaces affected are (at least):

  • "New document" list (scrollable list of schema types)
  • Scheduled publishing tool (list of schedules)
  • Array of objects input
  • Comments/tasks mentions list
  • Search (add filter)
  • Search (recent searches)
  • Search (results)
  • Document list pane
  • List panes
  • Document timeline (history)

Testing

No new tests were added - relying on existing tests and manual review.

Notes for release

None

@rexxars rexxars requested review from robinpyon and binoy14 December 14, 2024 06:51
Copy link

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

@rexxars rexxars marked this pull request as ready for review December 14, 2024 06:51
@rexxars rexxars requested a review from a team as a code owner December 14, 2024 06:51
@rexxars rexxars requested review from cngonzalez and removed request for a team December 14, 2024 06:51
Copy link
Contributor

No changes to documentation

Copy link
Contributor

Component Testing Report Updated Dec 14, 2024 6:58 AM (UTC)

❌ Failed Tests (5) -- 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) 13s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 40s 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) 15s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ❌ Failed (Inspect) 3m 47s 1 0 5
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 1m 14s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 3m 2s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 47s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 14s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 42s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 28s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 1m 52s 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, 14 Dec 2024 07:03:37 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 24.4 efps (41ms) 21.3 efps (47ms) +6ms (+14.6%)
article (body) 62.9 efps (16ms) 61.7 efps (16ms) +0ms (+1.9%)
article (string inside object) 23.5 efps (43ms) 22.2 efps (45ms) +3ms (+5.9%)
article (string inside array) 21.7 efps (46ms) 21.3 efps (47ms) +1ms (+2.2%)
recipe (name) 50.0 efps (20ms) 51.3 efps (20ms) -1ms (-2.5%)
recipe (description) 58.8 efps (17ms) 58.8 efps (17ms) +0ms (-/-%)
recipe (instructions) 99.9+ efps (5ms) 99.9+ efps (5ms) +0ms (-/-%)
synthetic (title) 20.0 efps (50ms) 19.6 efps (51ms) +1ms (+2.0%)
synthetic (string inside object) 20.8 efps (48ms) 19.8 efps (51ms) +3ms (+5.2%)

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) 41ms 43ms 48ms 193ms 165ms 11.8s
article (body) 16ms 20ms 27ms 212ms 261ms 5.7s
article (string inside object) 43ms 45ms 55ms 125ms 206ms 7.3s
article (string inside array) 46ms 47ms 53ms 175ms 154ms 7.5s
recipe (name) 20ms 22ms 24ms 43ms 0ms 7.1s
recipe (description) 17ms 19ms 22ms 35ms 0ms 4.5s
recipe (instructions) 5ms 6ms 9ms 18ms 0ms 3.0s
synthetic (title) 50ms 52ms 57ms 144ms 149ms 12.7s
synthetic (string inside object) 48ms 52ms 54ms 296ms 492ms 8.4s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 47ms 50ms 84ms 136ms 247ms 14.0s
article (body) 16ms 18ms 25ms 68ms 48ms 5.2s
article (string inside object) 45ms 47ms 60ms 190ms 192ms 7.3s
article (string inside array) 47ms 49ms 53ms 310ms 287ms 7.9s
recipe (name) 20ms 20ms 21ms 41ms 0ms 7.3s
recipe (description) 17ms 19ms 19ms 40ms 0ms 4.5s
recipe (instructions) 5ms 7ms 8ms 20ms 0ms 3.2s
synthetic (title) 51ms 52ms 55ms 111ms 203ms 12.9s
synthetic (string inside object) 51ms 54ms 67ms 477ms 824ms 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.

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