Skip to content

feat: use vanilla-extract for global styles#12476

Draft
stipsan wants to merge 5 commits intomainfrom
global-styles-with-vanilla-extract
Draft

feat: use vanilla-extract for global styles#12476
stipsan wants to merge 5 commits intomainfrom
global-styles-with-vanilla-extract

Conversation

@stipsan
Copy link
Copy Markdown
Member

@stipsan stipsan commented Mar 20, 2026

Description

What to review

Testing

Notes for release

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 20, 2026

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

Project Deployment Actions Updated (UTC)
e2e-studio Building Building Preview, Comment Apr 1, 2026 8:20am
page-building-studio Ready Ready Preview, Comment Apr 1, 2026 8:20am
test-studio Ready Ready Preview, Comment Apr 1, 2026 8:20am

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 20, 2026

🧪 E2E Preview environment

🔑 Environment Variables for Local Testing

This is the preview URL for the E2E tests: https://e2e-studio-jrkiet35r.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-jrkiet35r.sanity.dev
  SANITY_E2E_DATASET="update depending the project you want to test (pr-12476-chromium-23839042583 || pr-12476-firefox-23839042583 )"
  SANITY_E2E_DATASET_CHROMIUM=pr-12476-chromium-23839042583
  SANITY_E2E_DATASET_FIREFOX=pr-12476-firefox-23839042583

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 20, 2026

📊 Playwright Test Report

Download Full E2E Report

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 20, 2026

📦 Bundle Stats — sanity

Compared against main (fa002f6d) · v5.18.0 (npm)

Metric Value vs main (fa002f6) vs v5.18.0
Internal (raw) 4.41 MB +1.6 KB, +0.0% +33.4 KB, +0.7%
Internal (gzip) 1.01 MB +488 B, +0.0% +8.4 KB, +0.8%
Import time ❌ node:internal/modules/esm/get_format:185 - -
Details
  • Import time regressions over 10% are flagged with ⚠️
  • Treemap artifacts are attached to the CI run for detailed size analysis
  • Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.

@socket-security
Copy link
Copy Markdown

socket-security bot commented Mar 20, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​vanilla-extract/​dynamic@​2.1.51001009987100
Updatednpm/​@​vanilla-extract/​css@​1.18.0 ⏵ 1.19.098 +110099 +195 +7100
Addednpm/​@​vanilla-extract/​vite-plugin@​5.2.01001009998100

View full report

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 20, 2026

📚 TypeDoc Generation Result

TypeDoc generated successfully!

  • File size: 8.2M
  • Total exports: 1062
  • Artifact: sanity-typedoc-f36b14f9cd5e66b60ec7203cc6104b8906d414a7

The TypeDoc JSON file has been generated and validated. All documentation scripts completed successfully.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 20, 2026

⚡️ Editor Performance Report

Updated Wed, 01 Apr 2026 08:29:16 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
arrayI18n (simple-en) 52.6 efps (19ms) 58.8 efps (17ms) -2ms (-10.5%)
article (title) 47.6 efps (21ms) 47.6 efps (21ms) +0ms (-/-%)
article (body) 53.2 efps (19ms) 48.2 efps (21ms) +2ms (+10.4%)
article (string inside object) 50.0 efps (20ms) 48.8 efps (21ms) +1ms (+2.5%)
article (string inside array) 52.6 efps (19ms) 51.3 efps (20ms) +1ms (+2.6%)
recipe (name) 99.9+ efps (9ms) 99.9+ efps (9ms) +0ms (-/-%)
recipe (description) 50.0 efps (20ms) 52.6 efps (19ms) -1ms (-5.0%)
recipe (instructions) 99.9+ efps (5ms) 99.9+ efps (5ms) +0ms (-/-%)
singleString (stringField) 99.9+ efps (7ms) 99.9+ efps (6ms) -1ms (-/-%)
synthetic (title) 62.5 efps (16ms) 58.8 efps (17ms) +1ms (+6.3%)
synthetic (string inside object) 62.5 efps (16ms) 54.1 efps (19ms) +3ms (+15.6%)

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
arrayI18n (simple-en) 19ms 23ms 39ms 57ms 0ms 6.2s
article (title) 21ms 24ms 31ms 57ms 29ms 7.0s
article (body) 19ms 22ms 48ms 73ms 190ms 5.1s
article (string inside object) 20ms 27ms 34ms 90ms 22ms 6.4s
article (string inside array) 19ms 23ms 31ms 64ms 0ms 6.6s
recipe (name) 9ms 11ms 16ms 29ms 0ms 5.1s
recipe (description) 20ms 22ms 30ms 49ms 0ms 4.6s
recipe (instructions) 5ms 7ms 9ms 21ms 0ms 3.0s
singleString (stringField) 7ms 9ms 12ms 28ms 0ms 4.5s
synthetic (title) 16ms 22ms 35ms 112ms 1223ms 8.9s
synthetic (string inside object) 16ms 19ms 22ms 103ms 1142ms 8.8s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
arrayI18n (simple-en) 17ms 21ms 24ms 42ms 13ms 5.9s
article (title) 21ms 28ms 30ms 49ms 17ms 7.3s
article (body) 21ms 32ms 59ms 110ms 241ms 5.6s
article (string inside object) 21ms 24ms 31ms 57ms 31ms 6.4s
article (string inside array) 20ms 24ms 30ms 55ms 30ms 6.6s
recipe (name) 9ms 12ms 14ms 33ms 0ms 5.1s
recipe (description) 19ms 22ms 28ms 53ms 0ms 4.4s
recipe (instructions) 5ms 8ms 10ms 12ms 0ms 3.0s
singleString (stringField) 6ms 9ms 11ms 20ms 0ms 4.5s
synthetic (title) 17ms 20ms 25ms 100ms 1291ms 9.1s
synthetic (string inside object) 19ms 20ms 22ms 96ms 966ms 8.9s

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

@stipsan stipsan force-pushed the global-styles-with-vanilla-extract branch from 4b0c9f7 to c024ab6 Compare March 20, 2026 10:16
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 20, 2026

Preview this PR with pkg.pr.new

Run the Sanity CLI

npx https://pkg.pr.new/@sanity/cli@23db03f <command>

...Or upgrade project dependencies

pnpm logo Using pnpm

📦 sanity
pnpm install https://pkg.pr.new/sanity@f60ab27
📦 @sanity/vision
pnpm install https://pkg.pr.new/@sanity/vision@f60ab27
📦 Other packages…
📦 groq
pnpm install https://pkg.pr.new/groq@f60ab27
📦 @sanity/diff
pnpm install https://pkg.pr.new/@sanity/diff@f60ab27
📦 @sanity/mutator
pnpm install https://pkg.pr.new/@sanity/mutator@f60ab27
📦 @sanity/schema
pnpm install https://pkg.pr.new/@sanity/schema@f60ab27
📦 @sanity/types
pnpm install https://pkg.pr.new/@sanity/types@f60ab27
📦 @sanity/util
pnpm install https://pkg.pr.new/@sanity/util@f60ab27

npm logo Using npm

📦 sanity
npm install https://pkg.pr.new/sanity@f60ab27
📦 @sanity/vision
npm install https://pkg.pr.new/@sanity/vision@f60ab27
📦 Other packages…
📦 groq
npm install https://pkg.pr.new/groq@f60ab27
📦 @sanity/diff
npm install https://pkg.pr.new/@sanity/diff@f60ab27
📦 @sanity/mutator
npm install https://pkg.pr.new/@sanity/mutator@f60ab27
📦 @sanity/schema
npm install https://pkg.pr.new/@sanity/schema@f60ab27
📦 @sanity/types
npm install https://pkg.pr.new/@sanity/types@f60ab27
📦 @sanity/util
npm install https://pkg.pr.new/@sanity/util@f60ab27

View Commit (f60ab27)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 31, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 39.63% 26103 / 65860
🔵 Statements 32.05% 33874 / 105675
🔵 Functions 28.45% 5262 / 18493
🔵 Branches 24.52% 20673 / 84293
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/@sanity/vision/src/components/PerspectivePopover.css.ts 0% 0% 0% 0%
packages/@sanity/vision/src/components/PerspectivePopover.tsx 0% 0% 0% 0% 21-115
packages/sanity/src/core/studio/GlobalStyle.tsx 37.14% 0% 0% 50% 23-25, 34, 35, 37-72, 50-60, 31, 34-35, 38-60
packages/sanity/src/core/studio/styles.css.ts 0% 0% 0% 0%
Generated in workflow #54258 for commit f60ab27 by the Vitest Coverage Report Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants