Feature Request: Add Relay override confirm() to "report bug" link?

gemelli

Member
I was thinking earlier about KoL bug reports. I think about this stuff a lot, as I'm one of the folks who does the First Responder work on the KoL bug queue.

It's not uncommon for us to see a handful of bugs every day that are related to behavior outside our control -- Mafia behavior, GM script behavior, and the like. It doesn't usually take more than a few kmails to track down the source of the problem and figure out a workaround, but the time it takes to send/read those kmails adds up when you multiply it by ~5 bugs per day.

So, on to my very selfish request :) I was wondering if it would be possible to add a relay browser override to the top pane, adding a confirm() popup when someone clicks the Report Bug link? Something like this:

Before submitting a bug report to the KoL team, please take a moment to try to reproduce the bug in a vanilla browser environment -- shut down Mafia, and log back in with a vanilla web browser with no add-ons/extensions enabled. Click OK to continue writing up your bug report, or Cancel if you'd like to do some more testing first.

Is that reasonable? Let me know what you think. And thanks again for all of your ongoing support of this insanely useful tool!
 
Last edited:

Veracity

Developer
Staff member
Seems reasonable to me. Having to think and click an extra time before submitting a bug report can't be a bad thing. And I don't think it would lead to people grumbling about how KoLmafia changes their user experience from the way the KoL developers intended it to be played. I hope. :)

A browser popup would require Javascript, I believe, which I know little about, although there are plenty of examples in KoL-generated pages. So, although this doesn't sound hard, it might take a while.
 

StDoodle

Minion
On page: adminmail.php
With text: "<b>Please describe the bug:</b>"
(adminmail.php is also used for donation issues & 'other')
Replace this text: "<input id=\"send\" type=submit value=\"Send Message\" class=button></p>"
With something like: "<input id=\"send\" onClick=\"return confirm('Before submitting a bug report to the KoL team, please take a moment to try to reproduce the bug in a vanilla browser environment -- shut down Mafia, and log back in with a vanilla web browser with no add-ons/extensions enabled. Click OK to continue writing up your bug report, or Cancel if you'd like to do some more testing first. ')\" type=submit value=\"Send Message\" class=button></p>"

It appears that this should do the trick, at least for those with javascript enabled. And how exactly does one play this game otherwise?
 

gemelli

Member
Thanks, guys :) I'm absolutely comfortable having the popup only appear for folks who have JS enabled. And I really appreciate the near-instant response!
 

StDoodle

Minion
Well, to be fair, I haven't tested that... not sure how comfortable I feel testing the bug report form! :p
 

lostcalpolydude

Developer
Staff member
I added a javascript popup in my patch to ValhallaDecorator for the discarding karma link, which may or may not be useful here. Ideally I think the popup would be on the link to adminmail.php, but then it would get removed by Mr. Script rewriting the links at the top. There's at least one relay override script that would do the same thing.

StDoodle's change would actually create that popup for all types of reports, because the text for all issues is on the page and it's just CSS that changes what you see of it. Inside the <div id="type_1"> tag, the message could be added in red or something. No javascript needed that way, which also means no popup.

I would have no problem with a popup message adding a few seconds to reporting a bug. What would bother me is taking several minutes to write the bug report, then having the message appear telling me that I should close the window where I spent the time typing it up, which means I have to copy the text to another program while I do my testing.
 

StDoodle

Minion
onClick=\"if (document.getElementByID("type_1").style.display != "none) { return confirm('Before submitting a bug report to the KoL team, please take a moment to try to reproduce the bug in a vanilla browser environment -- shut down Mafia, and log back in with a vanilla web browser with no add-ons/extensions enabled. Click OK to continue writing up your bug report, or Cancel if you'd like to do some more testing first. ') } else return true;\"

Should work for the onclick event in this case, I do believe.
 

Veracity

Developer
Staff member
I added a javascript popup in my patch to ValhallaDecorator for the discarding karma link, which may or may not be useful here.
Where is this? I'd like to see this, anyway.

Ideally I think the popup would be on the link to adminmail.php, but then it would get removed by Mr. Script rewriting the links at the top. There's at least one relay override script that would do the same thing.
That's what I was thinking: when you click the "Report Bug" link, you get the "are you sure?" popup. If Mr. Script would remove it, well, let's hope that gemelli is speaking to fellow dev-team member Hellion about the similar potential issue of people reporting bugs in Mr. Script as if they are bugs in KoL. ;)

StDoodle's change would actually create that popup for all types of reports, because the text for all issues is on the page and it's just CSS that changes what you see of it. Inside the <div id="type_1"> tag, the message could be added in red or something. No javascript needed that way, which also means no popup.

I would have no problem with a popup message adding a few seconds to reporting a bug. What would bother me is taking several minutes to write the bug report, then having the message appear telling me that I should close the window where I spent the time typing it up, which means I have to copy the text to another program while I do my testing.
I agree: you should either get a popup when you click the "report bug" link, asking if you are sure you can reproduce it in a vanilla browser, or, as you suggest, we decorate the report bug page with an additional message.
 

gemelli

Member
Consider Hellion to be pinged :) I agree that the "report bug" link is the right place to add the pop-up, assuming feasibility and ease of implementation.
 

StDoodle

Minion
Just in case you guys didn't catch it, my latest post's code should account for the "everything on one page" issue; the confirm() should only happen when the style of the bug report div is set to display, so it won't happen on other reports. Hopefully. ;)
 

matt.chugg

Moderator
just an idea:

the adminmail.php is used for more that just bug reports, would it make more sense to modify div type_1 on the page in the relay browser to include another warning ? in a red box at the top..

This would prevent accidental clashes with greasemonkey, and would only provide the warning when the user selects the Bug report dropdown.


Code:
<div id="type_1">
<table><tr><td><b>IMPORTANT:</b>  If you can see this notice, the information you're about to submit may be seen by dev team volunteers in addition to the staff of Asymmetric Publications.<p>For the protection of your privacy, please do not submit any passwords, personal data, or donation information as a bug report! If you're having a donation or store issue, please select the appropriate category above.</td></tr></table>
<p><b>Please describe the bug:</b></p>
<textarea class="req" name=message cols=60 rows=10></textarea><br>
</div>

would become:

Code:
<div style="display: block;" id="type_1">
	<span style="width: 90%; border: 3px solid red; color: red; padding: 10px; text-align: left; margin-bottom: 10px; background-color: rgb(254, 226, 226); display:block;">
		You are attempting to submit a bug report using the KoLmafia relay browser. Please ensure that you can replicate the bug in a normal browser such as IE, Firefox, Crome, Safari or Opera with all client side modifications (Greasemonkey, Chickenfoot, Firebug, KoLmafia) turned off
	</span>
	<table><tbody><tr><td><b>IMPORTANT:</b>  If you can see this notice, the information you're about to submit may be seen by dev team volunteers in addition to the staff of Asymmetric Publications.<p>For the protection of your privacy, please do not submit any passwords, personal data, or donation information as a bug report! If you're having a donation or store issue, please select the appropriate category above.</p></td></tr></tbody></table>
	<p><b>Please describe the bug:</b></p>
	<textarea class="req" name="message" cols="60" rows="10"></textarea><br>
</div>

screen.PNG

see screenshot!
 
Last edited:

Theraze

Active member
For grammar purposes, a period at the end of the "turned off" would make my brain happier. :)

Also, maybe differentiating between KoL bug report and KoLmafia bug report? Don't want people to report mafia issues with this...
 

Veracity

Developer
Staff member
the adminmail.php is used for more that just bug reports, would it make more sense to modify div type_1 on the page in the relay browser to include another warning ? in a red box at the top..
Isn't this what St. Doodle suggested? I like it (although I'd tweak the wording a bit and would put our red warning after the KoL-supplied text), it doesn't need Javascript, and it would satisfy lost's concern that he not get warned AFTER typing in a bunch of text.

I would be astonished if ANYBODY has ever used the "report bug" link to report a KoLmafia bug, Theraze.

Would this be acceptable, gemelli?
 

StDoodle

Minion
No, my solution looked at the div type_1, and if it was visible added a confirmation popup with javascript to the submit button. I personally kind of like the "add a red warning message" solution a little better, but in the end... people are still going to submit bad bug reports. (I should know. :p)
 

Bale

Minion
I like the red warning box solution. I quite prefer that to the pop-up warning. I express agreement with Veracity's desire to put it second.

PS. gemelli, thanks for immediately responding to my bug report the other week. I really appreciated that. Oh, and I also appreciate that the bug was fixed so quickly, though that wasn't your doing. :)
 

Veracity

Developer
Staff member
Revision 8780 adds a red text box.

Speaking of dev team members, perhaps you should ping Eleron about kolproxy, too, since that has it own Relay Browser built in, and, contrary to Eleron's disclaimers, it conceivably could have bugs in it. ;)
 
Last edited:
Top