Skip to content

Conversation

@cngonzalez
Copy link
Member

Description

Adds canvasSource which behaves like mediaLibrarySource. Right now, the source param is only respected by useQuery and useDispatchIntent. Minimal logic was added to useDispatchIntent to ensure that it can dispatch intents for Canvas documents, and corresponding Kitchensink components were added to this as well.

I also corrected the resource type for the media-library resource type, since that's the string used basically everywhere. It doesn't change functionality, since intents don't care about resource types (only document types).

What to review

Again, please keep me honest and make sure things are appropriately marked beta!

Testing

A few tests were added to ensure 100% coverage of all logic branches. Also, Kitchensink was deployed with these changes: https://core-4owxlg8l9.sanity.build/@oblZgbTFj/application/wkyoigmzawwnnwx458zgoh46/intents

If buttons don't work, try to navigate to another app and back to the Kitchensink (it's a bug I'm working on).

Fun gif

@cngonzalez cngonzalez requested a review from a team as a code owner November 12, 2025 15:07
@cngonzalez cngonzalez requested a review from binoy14 November 12, 2025 15:07
@vercel
Copy link

vercel bot commented Nov 12, 2025

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

Project Deployment Preview Comments Updated (UTC)
sdk-docs Ready Ready Preview Comment Nov 12, 2025 11:51pm
sdk-kitchensink-react Ready Ready Preview Comment Nov 12, 2025 11:51pm

@cngonzalez cngonzalez requested review from colepeters and laurenashpole and removed request for binoy14 November 12, 2025 15:07
Copy link
Contributor

@laurenashpole laurenashpole left a comment

Choose a reason for hiding this comment

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

Looking good! I left a couple comments about document type names and the type changes we talked about at pairing (unfortunately I couldn't leave that as a suggestion).

Co-authored-by: Lauren Ashpole <lauren@laurenashpole.com>
Copy link
Contributor

@laurenashpole laurenashpole left a comment

Choose a reason for hiding this comment

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

LGTM!

@cngonzalez cngonzalez merged commit 60de2d1 into main Nov 13, 2025
18 checks passed
@cngonzalez cngonzalez deleted the feat/add-canvas-source branch November 13, 2025 14:14
@squiggler squiggler bot mentioned this pull request Nov 7, 2025
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