Skip to content
代码片段 群组 项目
提交 66404d58 编辑于 作者: Artur Fedorov's avatar Artur Fedorov
浏览文件

Merge branch 'sf/fix/429807-add-keyboard-shortcut-for-compare-view' into 'master'

Add keyboard shortcut for compare button

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/135465



Merged-by: default avatarArtur Fedorov <afedorov@gitlab.com>
Approved-by: default avatarJon Glassman <jglassman@gitlab.com>
Approved-by: default avatarDiana Zubova <dzubova@gitlab.com>
Approved-by: default avatarArtur Fedorov <afedorov@gitlab.com>
Co-authored-by: default avatarJon Glassman <jglassman@gitlab.com>
Co-authored-by: default avatarSam Figueroa <sfigueroa@gitlab.com>
No related branches found
No related tags found
无相关合并请求
...@@ -381,6 +381,12 @@ export const PROJECT_FILES_GO_TO_PERMALINK = { ...@@ -381,6 +381,12 @@ export const PROJECT_FILES_GO_TO_PERMALINK = {
defaultKeys: ['y'], defaultKeys: ['y'],
}; };
export const PROJECT_FILES_GO_TO_COMPARE = {
id: 'projectFiles.goToCompare',
description: __('Compare Branches'),
defaultKeys: ['shift+c'],
};
export const ISSUABLE_COMMENT_OR_REPLY = { export const ISSUABLE_COMMENT_OR_REPLY = {
id: 'issuables.commentReply', id: 'issuables.commentReply',
description: __('Comment/Reply (quoting selected text)'), description: __('Comment/Reply (quoting selected text)'),
...@@ -606,6 +612,7 @@ const PROJECT_FILES_SHORTCUTS_GROUP = { ...@@ -606,6 +612,7 @@ const PROJECT_FILES_SHORTCUTS_GROUP = {
PROJECT_FILES_OPEN_SELECTION, PROJECT_FILES_OPEN_SELECTION,
PROJECT_FILES_GO_BACK, PROJECT_FILES_GO_BACK,
PROJECT_FILES_GO_TO_PERMALINK, PROJECT_FILES_GO_TO_PERMALINK,
PROJECT_FILES_GO_TO_COMPARE,
], ],
}; };
......
...@@ -18,6 +18,7 @@ import { ...@@ -18,6 +18,7 @@ import {
GO_TO_PROJECT_KUBERNETES, GO_TO_PROJECT_KUBERNETES,
GO_TO_PROJECT_ENVIRONMENTS, GO_TO_PROJECT_ENVIRONMENTS,
GO_TO_PROJECT_WEBIDE, GO_TO_PROJECT_WEBIDE,
PROJECT_FILES_GO_TO_COMPARE,
NEW_ISSUE, NEW_ISSUE,
} from './keybindings'; } from './keybindings';
import Shortcuts from './shortcuts'; import Shortcuts from './shortcuts';
...@@ -43,6 +44,7 @@ export default class ShortcutsNavigation extends Shortcuts { ...@@ -43,6 +44,7 @@ export default class ShortcutsNavigation extends Shortcuts {
[GO_TO_PROJECT_SNIPPETS, () => findAndFollowLink('.shortcuts-snippets')], [GO_TO_PROJECT_SNIPPETS, () => findAndFollowLink('.shortcuts-snippets')],
[GO_TO_PROJECT_KUBERNETES, () => findAndFollowLink('.shortcuts-kubernetes')], [GO_TO_PROJECT_KUBERNETES, () => findAndFollowLink('.shortcuts-kubernetes')],
[GO_TO_PROJECT_ENVIRONMENTS, () => findAndFollowLink('.shortcuts-environments')], [GO_TO_PROJECT_ENVIRONMENTS, () => findAndFollowLink('.shortcuts-environments')],
[PROJECT_FILES_GO_TO_COMPARE, () => findAndFollowLink('.shortcuts-compare')],
[GO_TO_PROJECT_WEBIDE, ShortcutsNavigation.navigateToWebIDE], [GO_TO_PROJECT_WEBIDE, ShortcutsNavigation.navigateToWebIDE],
[NEW_ISSUE, () => findAndFollowLink('.shortcuts-new-issue')], [NEW_ISSUE, () => findAndFollowLink('.shortcuts-new-issue')],
]); ]);
......
...@@ -135,6 +135,7 @@ These shortcuts are available when browsing the files in a project (go to ...@@ -135,6 +135,7 @@ These shortcuts are available when browsing the files in a project (go to
| <kbd>Enter</kbd> | Open selection. | | <kbd>Enter</kbd> | Open selection. |
| <kbd>Escape</kbd> | Go back to file list screen (only while searching for files, **Code > Repository**, then select **Find File**). | | <kbd>Escape</kbd> | Go back to file list screen (only while searching for files, **Code > Repository**, then select **Find File**). |
| <kbd>y</kbd> | Go to file permalink (only while viewing a file). | | <kbd>y</kbd> | Go to file permalink (only while viewing a file). |
| <kbd>Shift</kbd> + <kbd>c</kbd> | Go to compare branches view. |
| <kbd>.</kbd> | Open the [Web IDE](project/web_ide/index.md). | | <kbd>.</kbd> | Open the [Web IDE](project/web_ide/index.md). |
### Web IDE ### Web IDE
......
...@@ -12235,6 +12235,9 @@ msgstr "" ...@@ -12235,6 +12235,9 @@ msgstr ""
msgid "Compare %{oldCommitId}...%{newCommitId}" msgid "Compare %{oldCommitId}...%{newCommitId}"
msgstr "" msgstr ""
   
msgid "Compare Branches"
msgstr ""
msgid "Compare GitLab editions" msgid "Compare GitLab editions"
msgstr "" msgstr ""
   
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册