Make uv.html available for embed - NOREF#552
Open
sarangj wants to merge 3 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The UV package comes with a uv.html file that is handy to serve for embed links. Use a webpack extension to copy the file into /_next/static so it can be served publicly on DC. Note - the embed link in the UV component refers to the /uv.html route. While I *should* be able to override this using the ShareDialogue's `embedPath` config option, that seems to not be working. The alternative is to copy the uv files to the public/ dir at build time, but the webpack extension doesn't seem to do this properly - I could bake something into the build that directly copies to the repo's public/ dir, but I'm going to try to avoid that for now - this is mostly a proof of concept to try to use UV in the archives portal embed link
We pass a config object as a prop to the UV component, as well as to the 'configure' event. Let's make sure it's the same object. I also stuck the config object into public/ so that archives portal could pass a 'config' param to the iframe src so that we can use the same config from archives.
sarangj
commented
Apr 10, 2026
| "@types/newrelic": "9.14.3", | ||
| "@types/node": "^24.2.1", | ||
| "@types/ua-parser-js": "0.7.39", | ||
| "copy-webpack-plugin": "^14.0.0", |
Contributor
Author
There was a problem hiding this comment.
i should remove the '^'
To reduce the amount of implementation details archives / another client might need to embed an item, just make a route that redirects to the uv.html static page, constructing the necessary client side params on behalf of the client. This way, the client doesn't need to know where the default uv config is / how to construct a manifest. I also forward any other params to uv.html in case the client *does* have opinions on how to render the item.
sarangj
commented
Apr 11, 2026
| config: "/uvConfig.json", | ||
| ...searchParams, | ||
| }).toString(); | ||
| console.log(queryString); |
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.
Ticket:
NOREF
This PR does the following:
The UV package comes with a uv.html file that is handy to serve for
embed links. Use a webpack extension to copy the file into /_next/static
so it can be served publicly on DC.
Note - the embed link in the UV component refers to the /uv.html route.
While I should be able to override this using the ShareDialogue's
embedPathconfig option, that seems to not be working.The alternative is to copy the uv files to the public/ dir at build
time, but the webpack extension doesn't seem to do this properly - I
could bake something into the build that directly copies to the repo's
public/ dir, but I'm going to try to avoid that for now - this is mostly
a proof of concept to try to use UV in the archives portal embed link
Second commit also consolidates the uv config into one place for clarity
Open questions
I put the uvConfig into the public/ folder to make it available for archives to reference - however, it might make sense to just have archives supply its own uv config (do we need / want to show download options and such, idk).
How has this been tested? How should a reviewer test this?
update my local archives portal to pull point at a DC uv.html on this vercel preview and see that the embed link loads
Screen.Recording.2026-04-10.at.3.16.42.PM.mov
Accessibility concerns or updates
Checklist: