Skip to content

Conversation

@cngonzalez
Copy link
Member

@cngonzalez cngonzalez commented Aug 5, 2025

Description

This PR introduces a preliminary beta version of useDispatchIntent. It accepts either a typical projectId / dataset handle or a Media Library asset handle, and sends a dispatch message to the Dashboard.

What to review

There's only one new hook being exported. PLEASE help me make sure I didn't forget to mark anything as beta -- this hook can and probably will change!

There's also a helper utility, please keep me accountable for any logic snags there. I'd like to extend it to other Dashboard hooks but wanted to keep this PR focused.

Testing

Tests were added. Full e2e tests will come but not prioritized at the moment because of cycle deadlines. To e2e test yourself, you can go to:
https://core-e3cbdlffn.sanity.build/@oblZgbTFj/application/wkyoigmzawwnnwx458zgoh46/intents

Click on the "Media Library" intent dispatch (not the doc one, I haven't deployed manifests in that org yet). It should take you to the Media Library.

Fun gif

@vercel
Copy link

vercel bot commented Aug 5, 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 7, 2025 2:50pm
sdk-kitchensink-react Ready Ready Preview Comment Nov 7, 2025 2:50pm

Copy link
Member Author

cngonzalez commented Aug 5, 2025

@cngonzalez cngonzalez force-pushed the 07-28-feat_react_create_usesendintent_hook branch from 8a8d13d to be466ab Compare November 6, 2025 21:13
@cngonzalez cngonzalez changed the title feat(react): create useSendIntent hook feat(react): create useDispatchIntent hook Nov 6, 2025
@cngonzalez cngonzalez marked this pull request as ready for review November 6, 2025 21:23
@cngonzalez cngonzalez requested a review from a team as a code owner November 6, 2025 21:23
Copy link
Member

@colepeters colepeters left a comment

Choose a reason for hiding this comment

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

Amaze! A few questions that are mostly minor and likely not blockers! 👏🏻

cngonzalez and others added 2 commits November 7, 2025 08:41
Co-authored-by: Cole Peters <cole@colepeters.com>
Co-authored-by: Cole Peters <cole@colepeters.com>
Copy link
Member

@colepeters colepeters left a comment

Choose a reason for hiding this comment

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

YES

👏🏻 🏆

@cngonzalez cngonzalez merged commit 3d5f45c into main Nov 7, 2025
23 of 24 checks passed
@cngonzalez cngonzalez deleted the 07-28-feat_react_create_usesendintent_hook branch November 7, 2025 16:20
@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