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): improvements to archive release detail #8597

Merged
merged 4 commits into from
Feb 13, 2025

Conversation

jordanl17
Copy link
Member

@jordanl17 jordanl17 commented Feb 11, 2025

Description

PR makes changes for archived and published release details:

  • 'Release' breadcrumb links back to the archived grouping on release overview
  • 'Pin release' hidden on archived and published release details
  • Release Type picker hidden on archived release detail
  • Published release type uses icon and updated style
  • Release title and description are readOnly on archived and published release detail
  • Retention card added on archived and published release detail
Screenshot 2025-02-11 at 18 37 23 Screenshot 2025-02-11 at 18 37 43

What to review

  • Adding useProjectSubscription to get the retention period - this is a close copy of useFeatureEnabled
  • Style updates look ok?

Testing

  • Updated tests on ReleaseDetail to cover the new scenarios for archived and published releases

Notes for release

N/A

Copy link

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

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Feb 11, 2025

⚡️ Editor Performance Report

Updated Thu, 13 Feb 2025 14:51:46 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 28.6 efps (35ms) 28.2 efps (36ms) +1ms (+1.4%)
article (body) 67.6 efps (15ms) 72.5 efps (14ms) -1ms (-/-%)
article (string inside object) 28.6 efps (35ms) 27.8 efps (36ms) +1ms (+2.9%)
article (string inside array) 25.6 efps (39ms) 24.7 efps (41ms) +2ms (+3.8%)
recipe (name) 43.5 efps (23ms) 45.5 efps (22ms) -1ms (-4.3%)
recipe (description) 47.6 efps (21ms) 52.6 efps (19ms) -2ms (-9.5%)
recipe (instructions) 99.9+ efps (6ms) 99.9+ efps (6ms) +0ms (-/-%)
synthetic (title) 20.4 efps (49ms) 20.4 efps (49ms) +0ms (-/-%)
synthetic (string inside object) 20.2 efps (50ms) 21.1 efps (48ms) -2ms (-4.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) 35ms 39ms 43ms 384ms 595ms 10.7s
article (body) 15ms 18ms 26ms 59ms 326ms 5.8s
article (string inside object) 35ms 37ms 41ms 142ms 118ms 6.4s
article (string inside array) 39ms 41ms 46ms 219ms 121ms 6.7s
recipe (name) 23ms 25ms 31ms 67ms 5ms 7.4s
recipe (description) 21ms 22ms 25ms 39ms 0ms 4.9s
recipe (instructions) 6ms 8ms 9ms 34ms 0ms 3.3s
synthetic (title) 49ms 52ms 57ms 298ms 883ms 12.6s
synthetic (string inside object) 50ms 54ms 67ms 464ms 892ms 8.0s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 36ms 40ms 43ms 430ms 267ms 10.5s
article (body) 14ms 16ms 19ms 54ms 189ms 5.6s
article (string inside object) 36ms 39ms 43ms 147ms 315ms 7.0s
article (string inside array) 41ms 43ms 46ms 155ms 119ms 6.8s
recipe (name) 22ms 24ms 26ms 42ms 6ms 7.3s
recipe (description) 19ms 20ms 23ms 25ms 0ms 4.6s
recipe (instructions) 6ms 8ms 16ms 69ms 13ms 3.8s
synthetic (title) 49ms 51ms 54ms 177ms 793ms 11.9s
synthetic (string inside object) 48ms 53ms 63ms 495ms 1110ms 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
Contributor

github-actions bot commented Feb 11, 2025

Component Testing Report Updated Feb 13, 2025 1:06 PM (UTC)

❌ Failed Tests (3) -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 11s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 13s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ❌ Failed (Inspect) 2m 36s 3 0 3
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) 27s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 1m 9s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 37s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 2m 3s 21 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 13s 3 9 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 26s 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

Copy link
Contributor

github-actions bot commented Feb 11, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 42.68% 54205 / 126989
🔵 Statements 42.68% 54205 / 126989
🔵 Functions 48.06% 2783 / 5790
🔵 Branches 78.93% 10405 / 13182
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/sanity/src/core/hooks/useProjectSubscriptions.ts 33.33% 100% 0% 33.33% 102-111, 120-155
packages/sanity/src/core/hooks/__mocks__/useProjectSubscriptions.mock.ts 100% 100% 100% 100%
packages/sanity/src/core/i18n/bundles/studio.ts 100% 100% 100% 100%
packages/sanity/src/core/releases/components/dialog/TitleDescriptionForm.tsx 98.79% 95.65% 100% 98.79% 140
packages/sanity/src/core/releases/i18n/resources.ts 100% 100% 100% 100%
packages/sanity/src/core/releases/tool/detail/ReleaseDashboardDetails.tsx 94.9% 83.33% 66.66% 94.9% 66-68, 82-85, 114, 142
packages/sanity/src/core/releases/tool/detail/ReleaseDashboardHeader.tsx 77.58% 68% 50% 77.58% 24-39
packages/sanity/src/core/releases/tool/detail/ReleaseTypePicker.tsx 87.55% 93.33% 100% 87.55% 83-94, 108-111, 124-125, 150-159, 205, 247-249
Generated in workflow #30330 for commit 0bcd816 by the Vitest Coverage Report Action

@jordanl17 jordanl17 force-pushed the fix/sapp-2087-archived-detail branch from df969a0 to 1a6e1cc Compare February 11, 2025 18:30
@jordanl17 jordanl17 marked this pull request as ready for review February 11, 2025 18:44
@jordanl17 jordanl17 requested review from a team as code owners February 11, 2025 18:44
@jordanl17 jordanl17 requested a review from juice49 February 11, 2025 18:44
@jordanl17 jordanl17 force-pushed the fix/sapp-2087-archived-detail branch from 1a6e1cc to 8929e90 Compare February 12, 2025 13:58
@jordanl17 jordanl17 force-pushed the fix/sapp-2087-archived-detail branch from 8929e90 to 439bc58 Compare February 12, 2025 14:09
@jordanl17 jordanl17 force-pushed the fix/sapp-2087-archived-detail branch from a8d8a1e to 0bcd816 Compare February 13, 2025 12:49

type Feature = {
id: string
variantId: string | null
Copy link
Member

Choose a reason for hiding this comment

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

do we get null back from the server here, or could this be made optional instead?


type FeatureAttributes = Record<string, string | number | boolean | null>

type Feature = {
Copy link
Member

Choose a reason for hiding this comment

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

not critical, but we tend to prefer interface unless there's a specific reason to use type

@@ -0,0 +1,156 @@
import {type SanityClient} from '@sanity/client'
Copy link
Member

Choose a reason for hiding this comment

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

Would be great to have an @internal tsdoc tag on the types here

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