-
Notifications
You must be signed in to change notification settings - Fork 500
feat: update ResourceMenu studio version and registration #11520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
🧪 E2E Preview environment🔑 Environment Variables for Local TestingThis is the preview URL for the E2E tests: https://e2e-studio-bobo74o07.sanity.dev To run the E2E tests locally, you can use the following environment variables, then run 💬 Remember to build the project first with |
📊 Playwright Test ReportThis report contains test results, including videos of failing tests. |
⚡️ Editor Performance ReportUpdated Tue, 06 Jan 2026 14:39:45 GMT
Detailed information🏠 Reference resultThe performance result of
🧪 Experiment resultThe performance result of this branch
📚 Glossary
|
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mariuslundgard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| const workspaces = useWorkspaces() | ||
| const projectId = workspaces[0]?.projectId | ||
|
|
||
| let manageBaseUrl = 'https://www.sanity.io' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could reuse the existing useEnvAwareSanityWebsiteUrl here
| const handleRegisterStudio = useCallback(() => { | ||
| if (!projectId) return | ||
| const currentOrigin = typeof window === 'undefined' ? '' : window.location.origin | ||
| const registrationUrl = `${manageBaseUrl}/manage/project/${projectId}/studios?studio=add&origin=${encodeURIComponent(currentOrigin)}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd maybe recommend a slightly more declarative approach like
if (!projectId) return
const url = new URL(`/manage/project/${projectId}/studios`, manageBaseUrl)
url.searchParams.set('studio', 'add')
url.searchParams.set('origin', window.location.origin)
window.open(url, '_blank', 'noopener,noreferrer')
jordanl17
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested a few minor improvements to the way we construct the URL, to match existing patterns we have. Otherwise LGTM
jordanl17
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one, thanks for the quick turnaround
Description
What to review
Resource Menu makes sense.
Testing
Changes were tested manually.
Lacking registration:

Lacking registration and user doesn't have permission:

Registered:

Notes for release
Expose the studio's registration status to the UI to enable and encourage users to register their Studio.