Refactor theme script for embed mode support#241
Open
gilbrotheraway wants to merge 1 commit intokoala73:mainfrom
Open
Refactor theme script for embed mode support#241gilbrotheraway wants to merge 1 commit intokoala73:mainfrom
gilbrotheraway wants to merge 1 commit intokoala73:mainfrom
Conversation
Enhance theme script to support embed mode so people can embed specific features(map, etc)
|
@gilbrotheraway is attempting to deploy a commit to the Elie Team on Vercel. A member of the Team first needs to authorize it. |
Author
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.
Enhance theme script to support embed mode so people can embed specific features(map, etc)
Summary
This PR introduces a lightweight "embed mode" to allow external dashboards (like Glance) to embed the application via an iframe without the surrounding UI clutter.
Changes included:
index.htmlto detect an?embed=trueURL parameter before the first paint.index.htmlthat hides the header, news/data panels, resize handles, and skeleton loaders when theembed-modeclass is active on thebody.100vh) for a seamless embedded widget experience.Type of change
Affected areas
/api/*)index.html(Boot script and critical CSS)Checklist
api/rss-proxy.jsallowlist (if adding feeds)npm run typecheck)Screenshots
(N/A - UI only changes visually when the
?embed=trueparameter is present)Example Glance iframe widget configuration:
Note: You can easily grab the exact view and layers URL string by arranging the map how you want it in your main app, clicking your "Copy Link" header button, and appending &embed=true to it.