Repository navigation
Add debug display bookmarklet and React debug entry point - #201
Merged
Merged
Conversation
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
🦋 Changeset detectedLatest commit: b8ed4f3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
MattiasBuelens
added this pull request to stack #202
October 8, 2026 08:22
devin-ai-integration
Bot
force-pushed
the
feature/debug-bookmarklet
branch
3 times, most recently
from
October 8, 2026 09:49
1da148f to
5c29dd3
Compare
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration
Bot
force-pushed
the
feature/debug-bookmarklet
branch
from
October 8, 2026 11:20
5c29dd3 to
b8ed4f3
Compare
ceyhun-o
approved these changes
Oct 8, 2026
Merged
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
Stacked on #200. This PR adds two things:
dist/THEOplayerUI.debug.bookmarklet.js, that injects the debug display into any page using Open Video UI. It works with ESM, UMD, React or bundled apps, because it doesn't rely on the page's module graph.@theoplayer/react-ui/debugentry point with React wrappers for the debug elements.The intended bookmarklet:
Bookmarklet bundle (
src/debug/bookmarklet.ts, IIFE, ~55 KB)DebugDisplayandRollingChart.DebugButtonis left out because it extends the page'sButton.DebugDisplaynow deep-imports only pure helpers (Attribute,stateReceiver,version) instead of../index, so the bundle registers nothing from the main UI. The page'sUIContaineraccepts our copy ofstateReceiver, because receivers are recognized by a string-keyed prototype property.theoplayer-default-ui/theolive-default-ui/theoplayer-uielements, including inside open shadow roots. It only uses UIs that have anoverlayslot, so older versions aren't supported. For each UI, it either toggles an existing direct-child<theoplayer-debug-display>or appends a new one withslot="overlay".UIContainer'sMutationObserverthen registers the new display and sets itsplayer.exports, since nothing imports it by specifier.files: ['dist/']already publishes it, and CDNs serve it by path.Idempotent registration
defineElementOnce(name, ctor)instead of@customElement. Running the bookmarklet again doesn't throw, and neither does running it on a page that already imports@theoplayer/web-ui/debug.versionon UI elementsUIContainerandDefaultUIget a read-onlyversiongetter.THEOliveDefaultUIinherits it.React:
@theoplayer/react-ui/debugDebugDisplayandDebugButtonarecreateComponentwrappers around the elements from@theoplayer/web-ui/debug.DebugButtonmapsonClick../debug→types+import), the same as the web-ui debug entry. It is built asdist/THEOplayerReactUI.debug.mjsand.d.ts, keepingreact,@lit/react,@theoplayer/web-uiand@theoplayer/web-ui/debugexternal. It is left out of typedoc.DebugButtonlists its events inline instead of importingButtonEvents, so the unusedButtonwrapper isn't pulled into the debug bundle.Docs
docs/guides/debug-display.mdwith a screenshot (docs/assets/debug-display.png). It covers adding the debug display through@theoplayer/web-ui/debugand theoverlayslot, and gives the bookmarklet code to paste as a bookmark URL.docs/react/guides/debug-display.md, linked from the web guide.textcode block (with the Docusaurus copy button), not a drag-to-bookmarks link, because React 19 replacesjavascript:URLs inhref. Thetextlanguage also stops Prettier from reformatting the one-liner.Checks
DebugDisplayandDebugButtoninDefaultUI.theoplayer-debug-displayandtheoplayer-rolling-chart. The main React bundle contains notheoplayer-debug.THEOplayer 11.4.0 / UI 2.5.0.Link to Devin session: https://dolby.devinenterprise.com/sessions/50ad8a122b354986bcfc78390b5a7f00
Open in Devin Desktop: https://dolby.devinenterprise.com/desktop/session/50ad8a122b354986bcfc78390b5a7f00?variant=devin
Requested by: @MattiasBuelens