Skip to content

Commit 0ef0108

Browse files
dmitshurgopherbot
authored andcommitted
_content/tour: point to contribution guide for reporting issues
The feedback button makes it a bit too easy to file a new issue without being prompted to first check if same issue has already been reported. Try pointing to the Go contribution guide and its "check the issue tracker" section, and see how that goes. The intent is that if someone wishes to provide feedback, it's still possible to do that, and hopefully the less immediate path to the issue tracker makes it more likely that reporters prefer to find (and upvote and/or subscribe to) an existing issue whenever it already exists. Change-Id: I2343711530cf89982fb8725a791b19b5ee5e4a14 Reviewed-on: https://go-review.googlesource.com/c/website/+/708756 Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Carlos Amedee <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]>
1 parent 9253e2b commit 0ef0108

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

_content/tour/static/js/directives.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,16 @@ directive('feedbackButton', ['i18n', function(i18n) {
221221
scope.feedbackMessage = i18n.l('submit-feedback');
222222

223223
elm.on('click', function() {
224+
var customURL = i18n.l('custom-feedback-url');
225+
if (customURL && customURL !== '(no translation for custom-feedback-url)') {
226+
window.open(customURL);
227+
return;
228+
}
229+
224230
var context = window.location.pathname === '/tour/list'
225231
? '/tour/list'
226232
: '/tour/' + scope.params.lessonId + '/' + scope.params.pageNumber;
227-
context = window.location.protocol + '//' + window.location.host + context;
233+
context = window.location.protocol + '//' + window.location.host + context;
228234
var title = i18n.l('issue-title');
229235
var body = i18n.l('context') + ': '+ context + '\n\n'+ i18n.l('issue-message');
230236
var url = 'https://' + i18n.l('github-repo') + '/issues/new'

_content/tour/static/js/values.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ value('translation', {
5454
'submit-feedback': 'Send feedback about this page',
5555

5656
// GitHub issue template: update repo and messaging when translating.
57+
// If a custom-feedback-url is set, it takes higher precedence over other fields.
58+
'custom-feedback-url': '/doc/contribute#check_tracker',
5759
'github-repo': 'github.com/golang/go',
5860
'issue-title': 'x/website/_content/tour: [REPLACE WITH SHORT DESCRIPTION]',
5961
'issue-message': 'Change the title above to describe your issue and add your feedback here, including code if necessary',

0 commit comments

Comments
 (0)