ruffle
ruffle copied to clipboard
web/demo: Add a way to see panic data w/ metadata without a panic

Clashes with https://github.com/ruffle-rs/ruffle/pull/7534, but if we went with that one instead, the clashes could be removed by removing the demo changes while keeping the ruffle-player changes (which would still allow anyone who wanted to to use the fakePanic() function).
Sorry, but I have a lot of issues with this:
- Having a screen with scary warning colors doesn't make sense when nothing has actually gone wrong
- The presentation of the text is totally barebones, making it very difficult for most users to understand
- The vast majority of users would not be interested in seeing most of the information on this screen. They already know what browser and OS they're using and what page they're on, for instance. What's the use displaying it?
- The information above actually detracts from the information that most users actually would want to see (the SWF info), by making it less noticeable.
- The full modal dialog interrupts gameplay and covers the entire screen for no good reason. And the information presented doesn't remotely take up all of that space
I'd like Ruffle developers to take a user-centered perspective for a moment and consider how a user would react to this dialog:
- User clicks the Info icon hoping to get a little bit of information about the game / SWF file
- A screen with a scary background and some mostly meaningless/impenetrable text pops up. User wonders: did the game crash? Where is my game? What happened?
- User either finds the Dismiss "button" (which has no indication that it's even a button) and goes back to their game having gained nothing, or leaves/reloads the page still thinking something went wrong
Another thing I want to point out is that this adds no value to us or the user 99% of the time because it's up to the web developer to actually implement a button that triggers the "fake panic." So what is the point of this feature?
Now I'd like to suggest an alternative: adding a "Copy debug info" context menu item like the one in the YouTube video player:

Here are the advantages of this alternative:
- It will be usable on all sites immediately, without requiring any extra work from web developers
- One click that doesn't interrupt the user's gameplay or scare them into thinking something went wrong
- If a user is having trouble with a game in our Discord's Help channel, instead of asking them what browser and OS they're using, we can just ask them to click the "Copy debug info" button and paste it into Discord
- Ditto for GitHub issues (besides error reports, which already have the info)
Also, I love the SWF info dialog from #7534 and would hate to see it replaced with an uglier, more confusing, and less useful alternative.
Added "Copy Debug Info" context menu item. Currently always appears but can be a configuration setting if preferred (would be on by default on demo site).
This PR can be updated to remove the demo page changes on request (or if the other PR merges first). Waiting for feedback.
Can remove the fakePanic() function on request too, though doing so is not necessary for the other PR.
I'm assuming this can be closed, as the consensus is to only continue with https://github.com/ruffle-rs/ruffle/pull/7534 , right?
Maybe rebased and adjusted with your approval rather than closed.
- Remove the demo page changes
- Potentially remove the
fakePanic()function (though it doesn't hurt for it to exist if someone wants it)
This still has two useful changes:
- As nosamu suggested and you agreed with, add "Copy Debug Info" context menu item.
- Add metadata to Error Report (potentially useful if desired at least)
Title can be changed to web: Add metadata to error info and add Copy Debug Info context menu item
So, should I remove the demo page changes and/or the fakePanic function?
Demo page changes removed. ~~fakePanic() function renamed showPlayerInfoOverlay(). No longer called, but can be used if someone feels a desire to do so.~~ - This function was removed for now. It can be added back if desired.
"Copy Debug Info" context menu item still added. Metadata still added to panic info.
Thank you!