This repository has been archived by the owner on Jun 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaner warning to users who submit bad bug reports.
- Loading branch information
Randall Luecke
committed
Mar 10, 2011
1 parent
ad5f723
commit e1ab15e
Showing
6 changed files
with
142 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
|
||
@import <AppKit/CPWindowController.j> | ||
@import "SubmitHelpWindowController.j" | ||
|
||
@implementation NewIssueWindowController : CPWindowController | ||
{ | ||
|
@@ -17,6 +18,8 @@ | |
id delegate @accessors; | ||
BOOL shouldEdit @accessors; | ||
id selectedIssue @accessors; | ||
|
||
CPAlert submitHelpAlert; | ||
} | ||
|
||
- (void)awakeFromCib | ||
|
@@ -109,15 +112,21 @@ | |
[errorField setStringValue:@"You must enter a title."]; | ||
else if (![bodyField stringValue]) | ||
[errorField setStringValue:@"You must enter a description."]; | ||
else if ([[titleField stringValue] length] + [[bodyField stringValue] length] < 30 && | ||
[[selectedRepo selectedItem] tag].identifier === @"280north/cappuccino") | ||
else if ([[titleField stringValue] length] + [[bodyField stringValue] length] < 30) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Me1000
Contributor
|
||
{ | ||
var alert = [CPAlert alertWithMessageText:@"This bug report doesn't pass muster." | ||
defaultButton:@"My bad." | ||
var submitHelpAlert = [CPAlert alertWithMessageText:@"This bug report doesn't pass muster." | ||
defaultButton:@"Cancel." | ||
alternateButton:nil | ||
otherButton:nil | ||
informativeTextWithFormat:@"Please add more information about how and where you encountered the bug. Also, please don't file bug reports on the Cappuccino project just to test out the GitHub Issues app. Cappuccino is a real, live project, and having to devote effort to closing bogus issues makes the maintainers die just a tiny bit inside every time."]; | ||
[alert beginSheetModalForWindow:[self window] modalDelegate:nil didEndSelector:nil contextInfo:nil]; | ||
informativeTextWithFormat:@"This issue doesn't seem very descriptive. Please add more information to it before submitting. Also, please refrain from submit \"test\" issues unless this is your project."]; | ||
|
||
[submitHelpAlert setShowsHelp:YES]; | ||
[submitHelpAlert setDelegate:self]; | ||
|
||
if ([CPPlatform isBrowser]) | ||
[submitHelpAlert beginSheetModalForWindow:[self window] modalDelegate:nil didEndSelector:nil contextInfo:nil]; | ||
else | ||
[submitHelpAlert runModal]; | ||
} | ||
else | ||
{ | ||
|
@@ -228,6 +237,13 @@ | |
delegate._openIssueWindows--; | ||
} | ||
|
||
- (void)alertShowHelp:(id)sender | ||
{ | ||
[submitHelpAlert _takeReturnCodeFrom:nil]; | ||
var controller = [[SubmitHelpWindowController alloc] initWithWindowCibName:"SubmitHelpWindow"]; | ||
[controller showWindow:self]; | ||
} | ||
|
||
@end | ||
|
||
// FIXME: needed because of a missing feature in Atlas | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
<head> | ||
<title></title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
|
||
<style> | ||
body { | ||
background-color: rgb(237, 241, 244); | ||
background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(222, 226, 229)), to(rgb(237, 241, 244))); | ||
background-repeat: no-repeat; | ||
margin: 0; | ||
padding: 0; | ||
color: rgb(77, 77, 77); | ||
font-size: 10px; | ||
font-family: "Helvetica Neue", "Lucida Grande", Arial, sans-serif; | ||
line-height: 2em; | ||
word-wrap: break-word; | ||
text-shadow: 0px 1px 0px white; | ||
} | ||
|
||
h1 { | ||
color: black; | ||
padding-left: 1.1em; | ||
line-height: 3px; | ||
font-size: 2.5em; | ||
} | ||
|
||
#wrapper { | ||
background-color: rgb(248, 248, 248); | ||
background-image: url("Resources/textgrid.png"); | ||
background-repeat: repeat-x repeat-y; | ||
padding: 3px 1em 3em 55px; | ||
min-height: 160px; | ||
margin: 0 1em; | ||
background-color: rgb(248, 248, 248); | ||
position: relative; | ||
font-size: 12px; | ||
line-height: 24px; | ||
-webkit-box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.3); | ||
-moz-box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.3); | ||
box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.3); | ||
} | ||
|
||
.name { | ||
font-weight: bold; | ||
font-size: 1.25em; | ||
} | ||
|
||
ul { | ||
list-style: decimal; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<img src="Resources/main-logo.png" /> | ||
<h1>How To File Helpful Bug Reports</h1> | ||
|
||
<div id="wrapper"> | ||
<h2>Things to include with your bug report:</h2> | ||
<ul> | ||
<li><span class="name">What version are you running?</span> - It's possible this bug was already fixed but hasn't been included with the latest release of the software. Including the version number will help the developers track down the bug more easily.</li> | ||
<li><span class="name">What did you do to cause the issue?</span> - How can the developers reproduce this issue? If you don't know what causes the bug, give as much detail as you can about what you were doing when you noticed it.</li> | ||
<li><span class="name">What should have happened?</span> - When you saw the bug what did you expect to happen?</li> | ||
<li><span class="name">What actually happened?</span> - When the bug occurred what happened to the software? Be sure to include any error messages you found.</li> | ||
<li><span class="name">What operating system and browser are you running? What version?</span> - It's possible the bug you've run across only affects certain operating systems or browsers. You should include all of that information with your bug report!</li> | ||
</ul> | ||
</div> | ||
</body> | ||
</html> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;4E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;7E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;9E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;2;10E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;2;11E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;2;12E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;2;13E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;2;14E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;16E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;18E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;25E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;30E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;34E;E;E;S;16;IBCocoaFrameworkd;3;461D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;25E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;23E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;35E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;36E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;37E;E;D;K;10;$classnameS;20;_CPCibWindowTemplateK;8;$classesA;S;20;_CPCibWindowTemplateS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;20E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;38E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;39E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;40E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;28E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;23E;E;D;K;10;$classnameS;6;CPViewK;8;$classesA;S;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;41E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;42E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;43E;K;15;CPViewWindowKeyD;K;6;CP$UIDd;2;44E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;45E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;41E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;46E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;47E;E;D;K;10;$classnameS;9;CPWebViewK;8;$classesA;S;9;CPWebViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;24E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;23E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;48E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;43E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;43E;K;15;CPViewWindowKeyD;K;6;CP$UIDd;2;44E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;23E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;46E;K;21;CPViewBackgroundColorD;K;6;CP$UIDd;2;50E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;47E;E;S;12;File's OwnerS;11;ApplicationS;6;WindowS;4;ViewS;8;Web viewD;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;31E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;16E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;25E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;51E;E;D;K;6;$classD;K;6;CP$UIDd;2;31E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;16E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;21E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;52E;E;D;K;6;$classD;K;6;CP$UIDd;2;31E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;21E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;16E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;53E;E;S;26;SubmitHelpWindowControllerD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;54E;E;E;S;13;CPApplicationS;8;CPWindowS;22;{{75, 41}, {472, 515}}d;2;15S;5;$nullS;21;{{0, 26}, {472, 515}}S;20;{{0, 0}, {472, 515}}S;5;$nullD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;25E;E;E;d;2;18S;6;normald;1;0D;K;10;$classnameS;7;CPColorK;8;$classesA;S;7;CPColorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;49E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;2;55E;E;S;11;helpWebViewS;6;windowS;8;delegateD;K;6;$classD;K;6;CP$UIDd;2;20E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;2;56E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;38E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;57E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;58E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;28E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;59E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;2;60E;E;E;S;26;{3.40282e+38, 3.40282e+38}S;26;{{18.5, 37.5}, {480, 360}}d;1;7D;K;6;$classD;K;6;CP$UIDd;2;22E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;61E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;62E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;46E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;47E;E;d;1;1S;21;{{0, 26}, {480, 360}}S;20;{{0, 0}, {480, 360}}E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
var SubmitHelpHTMLString; | ||
|
||
@implementation SubmitHelpWindowController : CPWindowController | ||
{ | ||
@outlet CPWebView helpWebView; | ||
} | ||
|
||
+ (void)initialize | ||
{ | ||
//load template | ||
var request = new CFHTTPRequest(); | ||
request.open("GET", "Resources/SubmitHelp.html", true); | ||
|
||
request.oncomplete = function() | ||
{ | ||
if (request.success()) | ||
SubmitHelpHTMLString = request.responseText(); | ||
[[CPNotificationCenter defaultCenter] postNotificationName:"SubmitHelpHTMLStringDidLoad" | ||
object:SubmitHelpHTMLString | ||
userInfo:nil]; | ||
} | ||
|
||
request.send(""); | ||
} | ||
|
||
- (void)windowDidLoad | ||
{ | ||
if ([CPPlatform isBrowser] && [CPPlatformWindow supportsMultipleInstances]) | ||
{ | ||
var platformWindow = [[CPPlatformWindow alloc] initWithContentRect:CGRectMake(200, 50, 630, 550)]; | ||
[[self window] setFullBridge:YES]; | ||
[[self window] setPlatformWindow:platformWindow]; | ||
} | ||
|
||
if (!SubmitHelpHTMLString) | ||
[[CPNotificationCenter defaultCenter] addObserver:self selector:@selector(_loadString:) name:"SubmitHelpHTMLStringDidLoad" object:nil]; | ||
else | ||
[helpWebView loadHTMLString:SubmitHelpHTMLString]; | ||
} | ||
|
||
- (void)_loadString:(CPNotification)aNote | ||
{ | ||
[helpWebView loadHTMLString:[aNote object]]; | ||
[[CPNotificationCenter defaultCenter] removeObserver:self]; | ||
} | ||
|
||
@end |
Still doesn't seem effective... maybe this needs to be bumped up to 100 or something.