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: improving type definition for useProjectSubscriptions #8626

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

jordanl17
Copy link
Member

Description

@bjoerge This resolved the comments you'd made in #8597

  • Move to interface over type
  • Correct some incorrect types on the subscription
  • @internal for these types and the hook

What to review

Testing

N/A

Notes for release

N/A

Copy link

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

Copy link
Contributor

No changes to documentation

Copy link
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 42.68% 54205 / 126989
🔵 Statements 42.68% 54205 / 126989
🔵 Functions 48.06% 2783 / 5790
🔵 Branches 78.96% 10426 / 13203
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/sanity/src/core/hooks/useProjectSubscriptions.ts 33.33% 100% 0% 33.33% 101-110, 119-154
Generated in workflow #30349 for commit 244acbe by the Vitest Coverage Report Action

Copy link
Contributor

github-actions bot commented Feb 13, 2025

⚡️ Editor Performance Report

Updated Thu, 13 Feb 2025 15:36:08 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 25.0 efps (40ms) 25.0 efps (40ms) +0ms (-/-%)
article (body) 78.1 efps (13ms) 70.2 efps (14ms) +1ms (-/-%)
article (string inside object) 27.0 efps (37ms) 26.3 efps (38ms) +1ms (+2.7%)
article (string inside array) 24.4 efps (41ms) 23.3 efps (43ms) +2ms (+4.9%)
recipe (name) 38.5 efps (26ms) 41.7 efps (24ms) -2ms (-7.7%)
recipe (description) 42.6 efps (24ms) 45.5 efps (22ms) -2ms (-6.4%)
recipe (instructions) 99.9+ efps (7ms) 99.9+ efps (7ms) +0ms (-/-%)
synthetic (title) 20.4 efps (49ms) 20.4 efps (49ms) +0ms (-/-%)
synthetic (string inside object) 19.6 efps (51ms) 20.4 efps (49ms) -2ms (-3.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) 40ms 46ms 72ms 330ms 429ms 11.0s
article (body) 13ms 15ms 21ms 206ms 268ms 5.0s
article (string inside object) 37ms 39ms 48ms 112ms 269ms 7.1s
article (string inside array) 41ms 43ms 47ms 74ms 173ms 7.1s
recipe (name) 26ms 29ms 41ms 51ms 7ms 7.7s
recipe (description) 24ms 25ms 29ms 53ms 0ms 5.3s
recipe (instructions) 7ms 9ms 11ms 19ms 0ms 3.6s
synthetic (title) 49ms 50ms 54ms 206ms 649ms 13.6s
synthetic (string inside object) 51ms 54ms 60ms 245ms 952ms 8.3s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 40ms 43ms 49ms 480ms 389ms 10.8s
article (body) 14ms 16ms 21ms 49ms 214ms 5.4s
article (string inside object) 38ms 40ms 49ms 159ms 148ms 7.0s
article (string inside array) 43ms 46ms 53ms 296ms 411ms 7.7s
recipe (name) 24ms 27ms 31ms 71ms 8ms 7.8s
recipe (description) 22ms 24ms 26ms 41ms 0ms 5.0s
recipe (instructions) 7ms 9ms 10ms 32ms 0ms 3.6s
synthetic (title) 49ms 54ms 63ms 393ms 609ms 12.8s
synthetic (string inside object) 49ms 56ms 69ms 349ms 528ms 8.1s

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

Component Testing Report Updated Feb 13, 2025 3:14 PM (UTC)

❌ Failed Tests (1) -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 13s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 13s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ❌ Failed (Inspect) 1m 19s 5 0 1
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 53s 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) 27s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 1m 8s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 35s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 2m 5s 21 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 13s 3 9 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 27s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 1m 44s 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

@jordanl17 jordanl17 requested a review from bjoerge February 13, 2025 15:28
@jordanl17 jordanl17 marked this pull request as ready for review February 13, 2025 15:28
@jordanl17 jordanl17 requested a review from a team as a code owner February 13, 2025 15:28
@jordanl17 jordanl17 merged commit ce9e97d into next Feb 14, 2025
62 checks passed
@jordanl17 jordanl17 deleted the chore/sapp-2087-ts-types branch February 14, 2025 10:32
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.

3 participants