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

feat(sanity): hide workspace switcher inside Core UI rendering context #8838

Merged

Conversation

juice49
Copy link
Contributor

@juice49 juice49 commented Mar 4, 2025

Description

This branch removes the workspace switcher when Studio is rendered inside Core UI. Core UI instead controls workspace selection.

Screenshot 2025-03-06 at 12 44 52

What to review

Does the removal look okay?

Note: I'm aware the "Select workspace" tooltip is still present. I'd like to do a fast-follow that slightly changes the way we handle this. But I think this is good enough for now.

Testing

This can be tested by running Studio locally and then accessing the local dev server using a Core UI preview deployment.

Copy link

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

Copy link
Contributor Author

juice49 commented Mar 4, 2025

Copy link
Contributor

github-actions bot commented Mar 4, 2025

No changes to documentation

Copy link
Contributor

github-actions bot commented Mar 4, 2025

⚡️ Editor Performance Report

Updated Thu, 06 Mar 2025 18:19:13 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 26.3 efps (38ms) 20.4 efps (49ms) +11ms (+28.9%) 🔴
article (body) 84.0 efps (12ms) 77.2 efps (13ms) +1ms (-/-%)
article (string inside object) 28.6 efps (35ms) 24.4 efps (41ms) +6ms (+17.1%)
article (string inside array) 24.4 efps (41ms) 21.7 efps (46ms) +5ms (+12.2%)
recipe (name) 34.5 efps (29ms) 45.5 efps (22ms) -7ms (-24.1%)
recipe (description) 35.7 efps (28ms) 50.0 efps (20ms) -8ms (-28.6%)
recipe (instructions) 99.9+ efps (6ms) 99.9+ efps (6ms) +0ms (-/-%)
synthetic (title) 19.6 efps (51ms) 20.0 efps (50ms) -1ms (-2.0%)
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) 38ms 57ms 64ms 251ms 505ms 9.9s
article (body) 12ms 14ms 16ms 27ms 39ms 4.8s
article (string inside object) 35ms 37ms 44ms 97ms 167ms 6.5s
article (string inside array) 41ms 42ms 49ms 163ms 144ms 6.6s
recipe (name) 29ms 32ms 35ms 57ms 1ms 8.6s
recipe (description) 28ms 30ms 33ms 78ms 5ms 5.8s
recipe (instructions) 6ms 7ms 9ms 11ms 0ms 3.4s
synthetic (title) 51ms 53ms 58ms 117ms 425ms 14.3s
synthetic (string inside object) 51ms 53ms 66ms 244ms 678ms 7.6s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 49ms 51ms 55ms 336ms 1117ms 11.3s
article (body) 13ms 16ms 21ms 53ms 100ms 5.1s
article (string inside object) 41ms 43ms 48ms 226ms 271ms 7.2s
article (string inside array) 46ms 48ms 49ms 224ms 365ms 7.5s
recipe (name) 22ms 25ms 29ms 53ms 3ms 7.3s
recipe (description) 20ms 21ms 22ms 30ms 0ms 4.8s
recipe (instructions) 6ms 8ms 9ms 10ms 0ms 3.3s
synthetic (title) 50ms 52ms 56ms 209ms 724ms 12.5s
synthetic (string inside object) 49ms 50ms 57ms 128ms 411ms 7.5s

📚 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 Mar 4, 2025

Component Testing Report Updated Mar 6, 2025 6:20 PM (UTC)

❌ Failed Tests (2) -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 3s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ❌ Failed (Inspect) 1m 16s 5 0 1
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 46s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 24s 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 3s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 28s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ❌ Failed (Inspect) 2m 25s 20 0 1
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 12s 3 9 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 24s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 1m 30s 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 Mar 5, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 42.03% 54352 / 129299
🔵 Statements 42.03% 54352 / 129299
🔵 Functions 46.93% 2729 / 5815
🔵 Branches 79.4% 10175 / 12814
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/sanity/src/core/studio/components/navbar/workspace/WorkspaceMenuButton.tsx 24% 100% 0% 24% 32-108
Generated in workflow #31833 for commit 1cc6178 by the Vitest Coverage Report Action

@juice49 juice49 force-pushed the feat/sapp-2363/studio-rendering-content-capability-gate branch from d1fef34 to 87e5ac2 Compare March 6, 2025 12:31
@juice49 juice49 changed the base branch from feat/sapp-2363/studio-rendering-content-capability-gate to graphite-base/8838 March 6, 2025 12:37
@juice49 juice49 force-pushed the feat/sapp-2363/hide-workspace-switcher-inside-core-ui branch from a5b1ebb to 987f0e5 Compare March 6, 2025 12:43
@juice49 juice49 force-pushed the graphite-base/8838 branch from 87e5ac2 to b2df74b Compare March 6, 2025 12:43
@juice49 juice49 changed the base branch from graphite-base/8838 to feat/sapp-2363/studio-rendering-content-capability-gate March 6, 2025 12:43
@juice49 juice49 marked this pull request as ready for review March 6, 2025 12:47
@juice49 juice49 requested a review from a team as a code owner March 6, 2025 12:47
@juice49 juice49 requested review from pedrobonamin and removed request for a team March 6, 2025 12:47
jordanl17
jordanl17 previously approved these changes Mar 6, 2025
@juice49 juice49 force-pushed the feat/sapp-2363/studio-rendering-content-capability-gate branch 2 times, most recently from 34943ef to 0a6f7ba Compare March 6, 2025 15:51
@juice49 juice49 force-pushed the feat/sapp-2363/hide-workspace-switcher-inside-core-ui branch from 987f0e5 to a7f98df Compare March 6, 2025 15:51
@juice49 juice49 changed the base branch from feat/sapp-2363/studio-rendering-content-capability-gate to graphite-base/8838 March 6, 2025 16:56
Copy link
Contributor Author

juice49 commented Mar 6, 2025

Merge activity

  • Mar 6, 12:20 PM EST: A user started a stack merge that includes this pull request via Graphite.
  • Mar 6, 12:23 PM EST: Graphite rebased this pull request as part of a merge.
  • Mar 6, 12:32 PM EST: Graphite couldn't merge this PR because it was not satisfying all requirements (Failed CI: 'efps-test (1, 3)').
  • Mar 6, 1:03 PM EST: Graphite rebased this pull request as part of a merge.

@juice49 juice49 changed the base branch from graphite-base/8838 to next March 6, 2025 17:21
@juice49 juice49 dismissed jordanl17’s stale review March 6, 2025 17:21

The base branch was changed.

@juice49 juice49 force-pushed the feat/sapp-2363/hide-workspace-switcher-inside-core-ui branch from a7f98df to fe09fb8 Compare March 6, 2025 17:22
@juice49 juice49 force-pushed the feat/sapp-2363/hide-workspace-switcher-inside-core-ui branch from fe09fb8 to 1cc6178 Compare March 6, 2025 18:02
@juice49 juice49 merged commit 6ae5097 into next Mar 6, 2025
38 of 41 checks passed
@juice49 juice49 deleted the feat/sapp-2363/hide-workspace-switcher-inside-core-ui branch March 6, 2025 18:04
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