Skip to content

Conversation

@pepahlavacek
Copy link
Contributor

@pepahlavacek pepahlavacek commented Dec 8, 2025

Description

We're preparing Canvas -> Studio syncing that will allow for documents to be edited in Studio.
To enable this in a feature branch and have it working with the current setup we've added isStudioDocumentEditable to the sanity.canvas.link

When isStudioDocumentEditable is true, we'll enable editing in Studio. If false or not defined, the current locked behavior stays.

New copy:
The Canvas banner has a new copy—only one style, we're not differentiating the type of document for editable ones.
image

Popover - when the info icon in the banner is clicked
image

What to review

If you're not on Canvas team, mainly focus on the code review and regression testing for linking because a canvas + BE branch is required.

  • Link a canvas document
  • The studio document should not be editable
  • Unlink it
  • It should automatically become editable

For reviewers with access to Canvas

  • Link a new document from Canvas from non schema boundary flag
  • It should not be editable
  • Click 3 dots - enable inline structure
  • Click document type -> Update studio document
  • Refresh studio
  • The document in studio should be editable

Testing

Notes for release

No public announcement necessary

@pepahlavacek pepahlavacek requested a review from a team as a code owner December 8, 2025 16:13
@pepahlavacek pepahlavacek requested review from stipsan and removed request for a team December 8, 2025 16:13
@vercel
Copy link

vercel bot commented Dec 8, 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 Dec 10, 2025 4:46pm
test-studio Ready Ready Preview Comment Dec 10, 2025 4:46pm
3 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
e2e-studio Ignored Ignored Dec 10, 2025 4:46pm
studio-workshop Ignored Ignored Preview Dec 10, 2025 4:46pm
test-next-studio Ignored Ignored Dec 10, 2025 4:46pm

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

🧪 E2E Preview environment

🔑 Environment Variables for Local Testing

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

📊 Playwright Test Report

Download Full E2E Report

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

⚡️ Editor Performance Report

Deploying studio and running performance tests…

@pepahlavacek pepahlavacek marked this pull request as draft December 8, 2025 16:22
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 44.77% 64813 / 144761
🔵 Statements 44.77% 64813 / 144761
🔵 Functions 48.53% 3452 / 7112
🔵 Branches 79.32% 13095 / 16509
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/sanity/src/core/canvas/types.ts 0% 0% 0% 0%
packages/sanity/src/core/canvas/actions/useCanvasCompanionDoc.ts 25% 100% 0% 25% 12-30
packages/sanity/src/core/canvas/store/createCanvasCompanionDocsStore.ts 61.42% 100% 66.66% 61.42% 46-49, 54-79
packages/sanity/src/core/form/useDocumentForm.ts 11.64% 100% 0% 11.64% 136-612
packages/sanity/src/structure/i18n/resources.ts 100% 100% 100% 100%
packages/sanity/src/structure/panes/document/documentPanel/banners/CanvasLinkedBanner.tsx 15.17% 100% 0% 15.17% 37-83, 87-131, 136-155
Generated in workflow #47706 for commit ed24ed3 by the Vitest Coverage Report Action

@pepahlavacek
Copy link
Contributor Author

Hey @stipsan, sorry for the switch back to draft mode when I opened this. This should be ready for review now

pedrobonamin
pedrobonamin previously approved these changes Dec 10, 2025
Copy link
Contributor

@pedrobonamin pedrobonamin left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thank you!

Copy link
Contributor

@snorrees snorrees left a comment

Choose a reason for hiding this comment

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

Code looks good, have not tested yet, will be back, might not make it today.

@snorrees snorrees self-requested a review December 10, 2025 10:16
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.

4 participants