Skip to content

Conversation

@pedrobonamin
Copy link
Contributor

Description

The primary action for the published document is the Publish, which doesn't make sense because you cannot publish a published document.
This PR updates the primary action to be the Unpublish action instead.

Before Now
Screenshot 2025-11-27 at 15 00 22 Screenshot 2025-11-27 at 15 01 07

What to review

Testing

Notes for release

Makes Unpublish the primary action for Published documents

@pedrobonamin pedrobonamin requested a review from a team as a code owner November 27, 2025 14:05
@pedrobonamin pedrobonamin requested review from stipsan and removed request for a team November 27, 2025 14:05
@vercel
Copy link

vercel bot commented Nov 27, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
page-building-studio Ready Ready Preview Comment Nov 28, 2025 11:28am
test-studio Ready Ready Preview Comment Nov 28, 2025 11:28am
3 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
e2e-studio Ignored Ignored Nov 28, 2025 11:28am
studio-workshop Ignored Ignored Preview Nov 28, 2025 11:28am
test-next-studio Ignored Ignored Nov 28, 2025 11:28am

@github-actions
Copy link
Contributor

github-actions bot commented Nov 27, 2025

🧪 E2E Preview environment

🔑 Environment Variables for Local Testing

This is the preview URL for the E2E tests: https://e2e-studio-ksbpg1atz.sanity.dev

To run the E2E tests locally, you can use the following environment variables, then run pnpm test:e2e --ui to open the Playwright test runner.

💬 Remember to build the project first with pnpm build:e2e.

  SANITY_E2E_PROJECT_ID=ittbm412
  SANITY_E2E_BASE_URL=https://e2e-studio-ksbpg1atz.sanity.dev
  SANITY_E2E_DATASET="update depending the project you want to test (pr-11308-chromium-19762396129 || pr-11308-firefox-19762396129 )"
  SANITY_E2E_DATASET_CHROMIUM=pr-11308-chromium-19762396129
  SANITY_E2E_DATASET_FIREFOX=pr-11308-firefox-19762396129

@github-actions
Copy link
Contributor

github-actions bot commented Nov 27, 2025

📊 Playwright Test Report

Download Full E2E Report

This report contains test results, including videos of failing tests.

Comment on lines +89 to +94
const sortedActions = [...documentActions].sort((a, b) => {
if (a.action === 'unpublish') return -1
if (b.action === 'unpublish') return 1
return 0
})
return Array.from(new Set([...prevActions, ...sortedActions]))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wonder if we should also remove the Publish action from the published document

@github-actions
Copy link
Contributor

github-actions bot commented Nov 27, 2025

⚡️ Editor Performance Report

Updated Fri, 28 Nov 2025 12:30:18 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 22.0 efps (46ms) 23.3 efps (43ms) -3ms (-5.5%)
article (body) 29.7 efps (34ms) 35.8 efps (28ms) -6ms (-17.2%)
article (string inside object) 23.3 efps (43ms) 26.7 efps (38ms) -6ms (-12.8%)
article (string inside array) 22.2 efps (45ms) 21.5 efps (47ms) +2ms (+3.3%)
recipe (name) 50.0 efps (20ms) 50.0 efps (20ms) +0ms (-/-%)
recipe (description) 62.5 efps (16ms) 60.6 efps (17ms) +1ms (+3.1%)
recipe (instructions) 99.9+ efps (8ms) 99.9+ efps (7ms) -2ms (-/-%)
singleString (stringField) 66.7 efps (15ms) 66.7 efps (15ms) +0ms (-/-%)
synthetic (title) 16.7 efps (60ms) 16.8 efps (60ms) -1ms (-0.8%)
synthetic (string inside object) 17.5 efps (57ms) 16.9 efps (59ms) +2ms (+3.5%)

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) 46ms 50ms 85ms 126ms 49ms 10.6s
article (body) 34ms 51ms 92ms 149ms 166ms 7.1s
article (string inside object) 43ms 48ms 81ms 112ms 16ms 6.6s
article (string inside array) 45ms 52ms 84ms 107ms 36ms 6.6s
recipe (name) 20ms 22ms 25ms 65ms 0ms 6.7s
recipe (description) 16ms 18ms 21ms 32ms 0ms 4.1s
recipe (instructions) 8ms 10ms 11ms 15ms 0ms 3.1s
singleString (stringField) 15ms 18ms 23ms 34ms 0ms 6.7s
synthetic (title) 60ms 62ms 109ms 152ms 463ms 14.9s
synthetic (string inside object) 57ms 58ms 63ms 126ms 295ms 7.5s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 43ms 49ms 66ms 98ms 35ms 10.2s
article (body) 28ms 31ms 76ms 161ms 185ms 6.5s
article (string inside object) 38ms 41ms 66ms 94ms 6ms 6.1s
article (string inside array) 47ms 51ms 87ms 112ms 39ms 6.9s
recipe (name) 20ms 23ms 30ms 62ms 0ms 7.1s
recipe (description) 17ms 20ms 30ms 61ms 0ms 4.4s
recipe (instructions) 7ms 11ms 14ms 33ms 0ms 3.2s
singleString (stringField) 15ms 17ms 19ms 33ms 0ms 6.0s
synthetic (title) 60ms 62ms 64ms 145ms 341ms 14.1s
synthetic (string inside object) 59ms 64ms 126ms 325ms 903ms 8.6s

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 27, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 44.74% 63869 / 142754
🔵 Statements 44.74% 63869 / 142754
🔵 Functions 48.35% 3412 / 7056
🔵 Branches 79.39% 12995 / 16367
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/sanity/src/structure/structureTool.ts 26.31% 100% 0% 26.31% 81-160
Generated in workflow #46622 for commit b366f89 by the Vitest Coverage Report Action

stipsan
stipsan previously approved these changes Nov 27, 2025
Copy link
Member

@stipsan stipsan left a comment

Choose a reason for hiding this comment

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

Makes sense!

@pedrobonamin pedrobonamin merged commit 787d09d into main Nov 28, 2025
80 of 84 checks passed
@pedrobonamin pedrobonamin deleted the sapp-3140 branch November 28, 2025 13:06
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