Repository navigation
feat(demo): a "My file does not play" button on the player page - #156
Merged
Merged
Conversation
Once something has been played, the button opens the repository's bug report form in a new tab, filled in from the load: the file's name or link, the switches, the content type, the error, the player's version and the event log. Nothing is sent from the page, the file goes only if the visitor attaches it, and every address loses its query and fragment. Closes #155
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
People who try their own
.h5pon the demo's player page can now tell us when it does not play. Closes #155.Changes
Once something has been played, a My file does not play button appears under the player. It opens the repository's bug report form in a new tab, without
opener, filled in from the load:?src=link to the page, or "choose the file from disk";metadata, or frommissingLibraries.mainLibrarywhen the package was refused;__PLAYER_VERSION__), the browser and the OS;The visitor reads the report on GitHub and sends it if they choose. Nothing leaves the page on its own, and the file goes only if they attach it: the form says GitHub takes it renamed to
.zip, up to 25 MB.Every address loses its query and fragment, in the log too, since a signed URL carries its credentials there and an issue is public.
labelsisn't passed, because GitHub answers a visitor who may not set labels with a 404; the form addsbugitself. The log is cut from its middle to keep the address under 7,000 characters, short of GitHub's 414.design/demo.mddescribes the button.Verification
Demo pages are checked by hand, per
design/testing.md. I drove the page in Chromium with Playwright, againstpnpm devand then againstpnpm build:demoserved bypnpm preview:demounder the production headers and CSP. The results were the same on both. In each case below, I read the opened address back and decoded it.runtimeerror, content typeH5P.GreetingCard1, "choose the file from disk", size?token=SECRET123#fragnetworkerror, content type "not known", not the earlier quiz'sH5P.CoursePresentationgithub.com/…/issues/new?template=bug_report.yml&…, with noopenerThe addresses were 1.4–1.9 kB. The row stays hidden until the first load. The button and its note fit side by side on a wide screen and wrap at 390 px, in light and dark.
Not verified: how GitHub draws the filled-in form, which needs a signed-in browser. GitHub documents that a form's fields fill from the query by their
id. Whether that covers thecomponentdropdown isn't documented. If it doesn't, the visitor picks the component, which the form requires anyway.pnpm build:demoScreenshots or reproduction
Play anything on the player page, the Vercel preview included, and press My file does not play under the player.