From 5f9a123a80fe7019d78de756b66b1bb85de2513f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 11 Jul 2019 09:14:31 -0600 Subject: [PATCH 1/2] Require an issue URL (or notes) on rageshakes Fixes https://github.com/vector-im/riot-web/issues/8155 --- src/components/views/dialogs/BugReportDialog.js | 9 ++++++++- src/i18n/strings/en_EN.json | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/views/dialogs/BugReportDialog.js b/src/components/views/dialogs/BugReportDialog.js index 4f9b592691..6a469161bb 100644 --- a/src/components/views/dialogs/BugReportDialog.js +++ b/src/components/views/dialogs/BugReportDialog.js @@ -50,6 +50,13 @@ export default class BugReportDialog extends React.Component { } _onSubmit(ev) { + if ((!this.state.text || !this.state.text.trim()) && (!this.state.issueUrl || !this.state.issueUrl.trim())) { + this.setState({ + err: _t("Please enter an issue URL to help us analyse the problem."), + }); + return; + } + const userText = (this.state.text.length > 0 ? this.state.text + '\n\n': '') + 'Issue: ' + (this.state.issueUrl.length > 0 ? this.state.issueUrl : 'No issue link given'); @@ -93,7 +100,7 @@ export default class BugReportDialog extends React.Component { this.setState({ issueUrl: ev.target.value }); } - _onSendLogsChange(ev) { + _onSendLogsChange(ev) { this.setState({ sendLogs: ev.target.checked }); } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 449c6ce6bc..7588e7557a 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1108,6 +1108,7 @@ "Unable to find profiles for the Matrix IDs listed below - would you like to invite them anyway?": "Unable to find profiles for the Matrix IDs listed below - would you like to invite them anyway?", "Invite anyway and never warn me again": "Invite anyway and never warn me again", "Invite anyway": "Invite anyway", + "Please enter an issue URL to help us analyse the problem.": "Please enter an issue URL to help us analyse the problem.", "Preparing to send logs": "Preparing to send logs", "Logs sent": "Logs sent", "Thank you!": "Thank you!", From c89a864a82284880c01e7168ebd922308cff8014 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 11 Jul 2019 12:54:26 -0600 Subject: [PATCH 2/2] update copy --- src/components/views/dialogs/BugReportDialog.js | 2 +- src/i18n/strings/en_EN.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/dialogs/BugReportDialog.js b/src/components/views/dialogs/BugReportDialog.js index 6a469161bb..e00104b99c 100644 --- a/src/components/views/dialogs/BugReportDialog.js +++ b/src/components/views/dialogs/BugReportDialog.js @@ -52,7 +52,7 @@ export default class BugReportDialog extends React.Component { _onSubmit(ev) { if ((!this.state.text || !this.state.text.trim()) && (!this.state.issueUrl || !this.state.issueUrl.trim())) { this.setState({ - err: _t("Please enter an issue URL to help us analyse the problem."), + err: _t("Please tell us what went wrong or, better, a github issue that describes the problem."), }); return; } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 7588e7557a..4db032f665 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1108,7 +1108,7 @@ "Unable to find profiles for the Matrix IDs listed below - would you like to invite them anyway?": "Unable to find profiles for the Matrix IDs listed below - would you like to invite them anyway?", "Invite anyway and never warn me again": "Invite anyway and never warn me again", "Invite anyway": "Invite anyway", - "Please enter an issue URL to help us analyse the problem.": "Please enter an issue URL to help us analyse the problem.", + "Please tell us what went wrong or, better, a github issue that describes the problem.": "Please tell us what went wrong or, better, a github issue that describes the problem.", "Preparing to send logs": "Preparing to send logs", "Logs sent": "Logs sent", "Thank you!": "Thank you!",