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(core): tasks UpdatedTimeAgo should be a hook #8011

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Conversation

pedrobonamin
Copy link
Contributor

Description

UpdatedTimeAgo was breaking the hook rules by not using the keyword use .

What to review

Testing

Manual testing, opening tasks now works.

Notes for release

Fixes an issue when opening tasks details.

@pedrobonamin pedrobonamin requested a review from a team as a code owner December 11, 2024 08:25
@pedrobonamin pedrobonamin requested review from cngonzalez and removed request for a team December 11, 2024 08:25
Copy link

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

@pedrobonamin pedrobonamin requested a review from stipsan December 11, 2024 08:25
Copy link
Contributor

No changes to documentation

Copy link
Contributor

Component Testing Report Updated Dec 11, 2024 8:35 AM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 18s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 14s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 44s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 1m 2s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 32s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 17s 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 18s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 2m 55s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 57s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 15s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 46s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 32s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 1m 4s 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

⚡️ Editor Performance Report

Updated Wed, 11 Dec 2024 08:37:10 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) 72.2 efps (14ms) +1ms (-/-%)
article (string inside object) 26.3 efps (38ms) 26.3 efps (38ms) +0ms (-/-%)
article (string inside array) 25.0 efps (40ms) 23.8 efps (42ms) +2ms (+5.0%)
recipe (name) 52.6 efps (19ms) 52.6 efps (19ms) +0ms (-/-%)
recipe (description) 55.6 efps (18ms) 58.8 efps (17ms) -1ms (-5.6%)
recipe (instructions) 99.9+ efps (5ms) 99.9+ efps (5ms) +0ms (-/-%)
synthetic (title) 19.2 efps (52ms) 19.2 efps (52ms) +0ms (-/-%)
synthetic (string inside object) 19.0 efps (53ms) 18.9 efps (53ms) +1ms (+1.0%)

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 42ms 45ms 168ms 168ms 10.0s
article (body) 13ms 14ms 16ms 40ms 68ms 4.9s
article (string inside object) 38ms 40ms 42ms 197ms 163ms 6.6s
article (string inside array) 40ms 43ms 46ms 168ms 137ms 6.8s
recipe (name) 19ms 21ms 24ms 44ms 0ms 6.9s
recipe (description) 18ms 19ms 21ms 33ms 0ms 4.6s
recipe (instructions) 5ms 7ms 8ms 9ms 0ms 3.0s
synthetic (title) 52ms 54ms 61ms 109ms 246ms 13.7s
synthetic (string inside object) 53ms 58ms 67ms 437ms 947ms 8.4s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 40ms 43ms 46ms 176ms 147ms 11.3s
article (body) 14ms 17ms 18ms 74ms 42ms 4.9s
article (string inside object) 38ms 40ms 42ms 178ms 141ms 6.6s
article (string inside array) 42ms 44ms 51ms 178ms 138ms 7.0s
recipe (name) 19ms 21ms 28ms 43ms 0ms 7.4s
recipe (description) 17ms 18ms 20ms 36ms 0ms 4.4s
recipe (instructions) 5ms 6ms 7ms 9ms 0ms 3.0s
synthetic (title) 52ms 53ms 57ms 108ms 140ms 14.4s
synthetic (string inside object) 53ms 56ms 72ms 401ms 768ms 8.4s

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

@pedrobonamin pedrobonamin added this pull request to the merge queue Dec 11, 2024
Merged via the queue into next with commit 789f3b2 Dec 11, 2024
57 checks passed
@pedrobonamin pedrobonamin deleted the SAPP-1968 branch December 11, 2024 08:49
bjoerge added a commit that referenced this pull request Dec 12, 2024
* next: (49 commits)
  fix: delays rendering the Start in Create banner until document is ready (#8020)
  fix(deps): update dependency @sanity/ui to ^2.10.9 (#8009)
  chore(deps): dedupe pnpm-lock.yaml (#8023)
  test(playwright-ct): fix issues and flake (#8016)
  feat(cli): misc copy changes (#8003)
  feat(cli): remove is-builtin-module (#6579)
  v3.67.1
  chore(deps): bump minimum requirement of @sanity/import and @sanity/export (#8012)
  chore(deps): update dependency @sanity/pkg-utils to v6.12.0 (#8010)
  fix(core): tasks UpdatedTimeAgo should be a hook (#8011)
  v3.67.0
  chore(prettier): fix unformatted files 🤖 ✨ (#8006)
  chore: reduce renovate double PR noise
  fix(deps): update dependency @sanity/ui to ^2.10.7 (#8005)
  fix(deps): update dependency @sanity/ui to ^2.10.7 (#7998)
  feat(cli): use `@vercel/frameworks` in `bootstrapRemoteTemplate` (#8001)
  feat: switch create integration to opt-out flow (#8002)
  feat: use eslint 9 for new studios (#7978)
  fix(sanity): optimise getLeafWeights to not stack overflow (#7999)
  feat(test-studio): enable `groq2024` search strategy
  ...
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.

Clicking link in task email notification throws an error in Sanity Studio
2 participants