Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 453675f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
✅ E2E Tests🟢 46 passed • view full report • view run Studio: https://plugins-e2e-test-studio-poxbv1b95.sanity.dev Datasets: |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cursor
Bot
force-pushed
the
cody/themer-legacy-url-import-41ad
branch
from
October 22, 2026 13:04
59ad690 to
453675f
Compare
Ported from sanity-io/ui#3009. With the themer sidebar open, pasting a themer.sanity.build URL, or a snippet that contains one, anywhere except a text field converts its theme to buildTheme options, adds it and opens it in the editor. "Add from URL" in the list's menu opens a dialog that previews the converted theme first. The URL is parsed by parseHuesFromUrl from @sanity/themer-legacy, the hosted service's own parser. The theme code paste listener now skips pastes that something else has already handled, like the import dialog. Co-authored-by: Cody Olsen <stipsan@users.noreply.github.com>
cursor
Bot
force-pushed
the
cody/themer-legacy-url-import-41ad
branch
from
October 22, 2026 13:09
453675f to
4d6a38a
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports sanity-io/ui#3009, with the same title and intent. It's stacked on #2202 (vanilla-extract to CSS modules), so its base is
cody/themer-css-modules-3ea2. Once #2202 merges, the base can go back tomain.What it does
With the themer sidebar open, paste a
https://themer.sanity.build/api/hues?…URL, or a snippet that contains one, anywhere except a text field. The tool converts the theme tobuildThemeoptions, adds it and opens it in the editor. Add from URL in the list's menu opens a dialog that previews the converted theme first.src/tool/legacyTheme.tsparses the URL withparseHuesFromUrlfrom@sanity/themer-legacy, the hosted service's own parser. The primary hue becomes the accent, the default hue the text color, and the default hue's lightest and darkest colors the backgrounds.Add from URL in the theme list
The import dialog previewing a converted Pink Synth theme
Changes from ui#3009
The themer changed a lot after ui#3009 branched, so the port follows the current code:
dialog.import), like the paste and snippet dialogs. Adding the theme leaves the list, which closes the dialog.autoFocus, so the text area refocuses on the next frame.actorRef, and the hook lives inThemerSidebar.ImportThemeDialog.module.css, with committed css-modules-kit typings. Nothing imports vanilla-extract.buildThemeFromUrl. This adds a short part on converting the theme in the tool.Checks
pnpm lint(typings, stylelint, oxlint),pnpm knip,pnpm --filter @sanity/themer build(publint) and the themer's tests (15 files, 168 tests) pass. A temporary Storybook harness, not committed, drove the real sidebar with Playwright, and all 8 checks passed. They cover the menu item, focus, the CSS module class, import, pasting a URL anywhere, and a code pasted on the dialog. There are no dependency, lockfile, Vercel or Sanity changes.To show artifacts inline, enable in settings.