Skip to content

Commit fd515cc

Browse files
author
Paul Slaughter
committed
Merge branch 'keyboard-shortcuts-2' into 'master'
Improve Keyboard shortcut help screen Closes #65367 See merge request gitlab-org/gitlab-ce!31642
2 parents 14fe47c + 4361c89 commit fd515cc

File tree

10 files changed

+348
-353
lines changed

10 files changed

+348
-353
lines changed

app/assets/javascripts/behaviors/shortcuts/shortcuts.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export default class Shortcuts {
4646

4747
$(document).on('click.more_help', '.js-more-help-button', function clickMoreHelp(e) {
4848
$(this).remove();
49-
$('.hidden-shortcut').show();
5049
e.preventDefault();
5150
});
5251
}
@@ -104,7 +103,6 @@ export default class Shortcuts {
104103
return results;
105104
}
106105

107-
$('.hidden-shortcut').show();
108106
return $('.js-more-help-button').remove();
109107
});
110108
}

app/assets/javascripts/behaviors/shortcuts/shortcuts_issuable.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,14 @@ import { CopyAsGFM } from '../markdown/copy_as_gfm';
66
import { getSelectedFragment } from '~/lib/utils/common_utils';
77

88
export default class ShortcutsIssuable extends Shortcuts {
9-
constructor(isMergeRequest) {
9+
constructor() {
1010
super();
1111

1212
Mousetrap.bind('a', () => ShortcutsIssuable.openSidebarDropdown('assignee'));
1313
Mousetrap.bind('m', () => ShortcutsIssuable.openSidebarDropdown('milestone'));
1414
Mousetrap.bind('l', () => ShortcutsIssuable.openSidebarDropdown('labels'));
1515
Mousetrap.bind('r', ShortcutsIssuable.replyWithSelectedText);
1616
Mousetrap.bind('e', ShortcutsIssuable.editIssue);
17-
18-
if (isMergeRequest) {
19-
this.enabledHelp.push('.hidden-shortcut.merge_requests');
20-
} else {
21-
this.enabledHelp.push('.hidden-shortcut.issues');
22-
}
2317
}
2418

2519
static replyWithSelectedText() {

app/assets/javascripts/behaviors/shortcuts/shortcuts_navigation.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,5 @@ export default class ShortcutsNavigation extends Shortcuts {
2323
Mousetrap.bind('g e', () => findAndFollowLink('.shortcuts-environments'));
2424
Mousetrap.bind('g l', () => findAndFollowLink('.shortcuts-metrics'));
2525
Mousetrap.bind('i', () => findAndFollowLink('.shortcuts-new-issue'));
26-
27-
this.enabledHelp.push('.hidden-shortcut.project');
2826
}
2927
}

app/assets/javascripts/behaviors/shortcuts/shortcuts_network.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,5 @@ export default class ShortcutsNetwork extends ShortcutsNavigation {
1111
Mousetrap.bind(['down', 'j'], graph.scrollDown);
1212
Mousetrap.bind(['shift+up', 'shift+k'], graph.scrollTop);
1313
Mousetrap.bind(['shift+down', 'shift+j'], graph.scrollBottom);
14-
15-
this.enabledHelp.push('.hidden-shortcut.network');
1614
}
1715
}

app/assets/javascripts/behaviors/shortcuts/shortcuts_wiki.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ export default class ShortcutsWiki extends ShortcutsNavigation {
66
constructor() {
77
super();
88
Mousetrap.bind('e', ShortcutsWiki.editWiki);
9-
10-
this.enabledHelp.push('.hidden-shortcut.wiki');
119
}
1210

1311
static editWiki() {

app/assets/stylesheets/framework/modal.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
max-width: 98%;
33
}
44

5+
.modal-1040 {
6+
@include media-breakpoint-up(xl) {
7+
max-width: 1040px;
8+
}
9+
}
10+
511
.modal-header {
612
background-color: $modal-body-bg;
713

0 commit comments

Comments
 (0)