Add dark mode image support to CaptionedImage#4457
Open
Conversation
Both light and dark images are rendered in the DOM and preloaded by the browser so theme switching is instant with no loading delay. Replaces all ThemedImage usages with the new srcDark prop. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📖 Docs PR preview links
|
The original had the image wrapped in a link to open the full SVG in a new tab. Restores that behavior instead of replacing it with zoom. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead of constructing the preview URL from the branch name (which breaks when Vercel truncates long subdomains), poll for the Vercel bot comment and extract the actual preview URL. Falls back to the constructed URL if the comment doesn't appear within 3 minutes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Only poll for the Vercel bot comment when the constructed subdomain exceeds 63 characters (the DNS label limit where Vercel truncates). Short branch names use the constructed URL directly with no delay. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
brianmacdonald-temporal
approved these changes
Apr 22, 2026
flippedcoder
approved these changes
Apr 22, 2026
| uses: actions/github-script@v7 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | |
Contributor
There was a problem hiding this comment.
Just a nit, but could this script be put in a file like preview-url-from-vercel.js? It's usually easier to write and maintain these scripts when they're not embedded in the workflow.
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.
Summary
CaptionedImagecomponent with an optionalsrcDarkprop for dark mode images.ThemedImage).visibility/positiontoggling instead ofdisplay: noneto guarantee all browsers preload the hidden image.ThemedImageusages across the site (external storage, Go/Python data handling, Nexus) with the new prop.Test plan
/external-storage,/develop/go/data-handling,/develop/python/data-handling, and/evaluate/nexus🤖 Generated with Claude Code
┆Attachments: EDU-6229 Add dark mode image support to CaptionedImage