Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
71bce1c857ae
Commit
fc508045
authored
May 18, 2018
by
Lukas Eipert
Committed by
Annabel Gray
May 18, 2018
Browse files
Add Keyboard shortcuts for "Kubernetes" and "Environments"
parent
9c9cbe9b8798
Changes
9
Hide whitespace changes
Inline
Side-by-side
app/assets/javascripts/shortcuts_navigation.js
View file @
71bce1c8
...
...
@@ -7,7 +7,7 @@ export default class ShortcutsNavigation extends Shortcuts {
super
();
Mousetrap
.
bind
(
'
g p
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-project
'
));
Mousetrap
.
bind
(
'
g
e
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-project-activity
'
));
Mousetrap
.
bind
(
'
g
v
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-project-activity
'
));
Mousetrap
.
bind
(
'
g f
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-tree
'
));
Mousetrap
.
bind
(
'
g c
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-commits
'
));
Mousetrap
.
bind
(
'
g j
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-builds
'
));
...
...
@@ -16,9 +16,10 @@ export default class ShortcutsNavigation extends Shortcuts {
Mousetrap
.
bind
(
'
g i
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-issues
'
));
Mousetrap
.
bind
(
'
g b
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-issue-boards
'
));
Mousetrap
.
bind
(
'
g m
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-merge_requests
'
));
Mousetrap
.
bind
(
'
g t
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-todos
'
));
Mousetrap
.
bind
(
'
g w
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-wiki
'
));
Mousetrap
.
bind
(
'
g s
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-snippets
'
));
Mousetrap
.
bind
(
'
g k
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-kubernetes
'
));
Mousetrap
.
bind
(
'
g e
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-environments
'
));
Mousetrap
.
bind
(
'
i
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-new-issue
'
));
this
.
enabledHelp
.
push
(
'
.hidden-shortcut.project
'
);
...
...
app/views/help/_shortcuts.html.haml
View file @
71bce1c8
...
...
@@ -121,7 +121,7 @@
%tr
%td
.shortcut
.key
g
.key
e
.key
v
%td
Go to the project's activity feed
%tr
...
...
@@ -172,6 +172,18 @@
.key
m
%td
Go to merge requests
%tr
%td
.shortcut
.key
g
.key
e
%td
Go to environments
%tr
%td
.shortcut
.key
g
.key
k
%td
Go to kubernetes
%tr
%td
.shortcut
.key
g
...
...
app/views/layouts/nav/sidebar/_project.html.haml
View file @
71bce1c8
...
...
@@ -212,7 +212,7 @@
-
if
project_nav_tab?
:clusters
-
show_cluster_hint
=
show_gke_cluster_integration_callout?
(
@project
)
=
nav_link
(
controller:
[
:clusters
,
:user
,
:gcp
])
do
=
link_to
project_clusters_path
(
@project
),
title:
_
(
'Kubernetes'
),
class:
'shortcuts-
clus
te
r
'
do
=
link_to
project_clusters_path
(
@project
),
title:
_
(
'Kubernetes'
),
class:
'shortcuts-
kuberne
te
s
'
do
%span
=
_
(
'Kubernetes'
)
-
if
show_cluster_hint
...
...
changelogs/unreleased/46427-add-keyboard-shortcut-environments.yml
0 → 100644
View file @
71bce1c8
---
title
:
Adds keyboard shortcut `g e` for Environments on Project pages
merge_request
:
19002
author
:
type
:
added
changelogs/unreleased/46427-add-keyboard-shortcut-kubernetes.yml
0 → 100644
View file @
71bce1c8
---
title
:
Adds keyboard shortcut `g k` for Kubernetes on Project pages
merge_request
:
19002
author
:
type
:
added
changelogs/unreleased/46427-change-keyboard-shortcut-of-activity-feed.yml
0 → 100644
View file @
71bce1c8
---
title
:
Changes keyboard shortcut of Activity feed to `g v`
merge_request
:
19002
author
:
type
:
changed
changelogs/unreleased/46427-remove-outdated-todos-shortcut.yml
0 → 100644
View file @
71bce1c8
---
title
:
Removes outdated `g t` shortcut for TODO in favor of `Shift+T`
merge_request
:
19002
author
:
type
:
removed
doc/workflow/shortcuts.md
View file @
71bce1c8
...
...
@@ -46,15 +46,19 @@ You can see GitLab's keyboard shortcuts by using 'shift + ?'
| Keyboard Shortcut | Description |
| ----------------- | ----------- |
|
<kbd>
g
</kbd>
+
<kbd>
p
</kbd>
| Go to the project's home page |
|
<kbd>
g
</kbd>
+
<kbd>
e
</kbd>
| Go to the project's activity feed |
|
<kbd>
g
</kbd>
+
<kbd>
v
</kbd>
| Go to the project's activity feed |
|
<kbd>
g
</kbd>
+
<kbd>
f
</kbd>
| Go to files |
|
<kbd>
g
</kbd>
+
<kbd>
c
</kbd>
| Go to commits |
|
<kbd>
g
</kbd>
+
<kbd>
b
</kbd>
| Go to jobs |
|
<kbd>
g
</kbd>
+
<kbd>
j
</kbd>
| Go to jobs |
|
<kbd>
g
</kbd>
+
<kbd>
n
</kbd>
| Go to network graph |
|
<kbd>
g
</kbd>
+
<kbd>
g
</kbd>
| Go to repository charts |
|
<kbd>
g
</kbd>
+
<kbd>
d
</kbd>
| Go to repository charts |
|
<kbd>
g
</kbd>
+
<kbd>
i
</kbd>
| Go to issues |
|
<kbd>
g
</kbd>
+
<kbd>
b
</kbd>
| Go to issue boards |
|
<kbd>
g
</kbd>
+
<kbd>
m
</kbd>
| Go to merge requests |
|
<kbd>
g
</kbd>
+
<kbd>
e
</kbd>
| Go to environments |
|
<kbd>
g
</kbd>
+
<kbd>
k
</kbd>
| Go to kubernetes |
|
<kbd>
g
</kbd>
+
<kbd>
s
</kbd>
| Go to snippets |
|
<kbd>
g
</kbd>
+
<kbd>
w
</kbd>
| Go to wiki |
|
<kbd>
t
</kbd>
| Go to finding file |
|
<kbd>
i
</kbd>
| New issue |
...
...
spec/features/projects/user_uses_shortcuts_spec.rb
View file @
71bce1c8
...
...
@@ -13,6 +13,8 @@
context
'when navigating to the Project pages'
do
it
'redirects to the details page'
do
visit
project_issues_path
(
project
)
find
(
'body'
).
native
.
send_key
(
'g'
)
find
(
'body'
).
native
.
send_key
(
'p'
)
...
...
@@ -22,7 +24,7 @@
it
'redirects to the activity page'
do
find
(
'body'
).
native
.
send_key
(
'g'
)
find
(
'body'
).
native
.
send_key
(
'
e
'
)
find
(
'body'
).
native
.
send_key
(
'
v
'
)
expect
(
page
).
to
have_active_navigation
(
'Project'
)
expect
(
page
).
to
have_active_sub_navigation
(
'Activity'
)
...
...
@@ -72,10 +74,19 @@
expect
(
page
).
to
have_active_sub_navigation
(
'List'
)
end
it
'redirects to the issue board page'
do
find
(
'body'
).
native
.
send_key
(
'g'
)
find
(
'body'
).
native
.
send_key
(
'b'
)
expect
(
page
).
to
have_active_navigation
(
'Issues'
)
expect
(
page
).
to
have_active_sub_navigation
(
'Board'
)
end
it
'redirects to the new issue page'
do
find
(
'body'
).
native
.
send_key
(
'i'
)
expect
(
page
).
to
have_content
(
project
.
title
)
expect
(
page
).
to
have_content
(
'New Issue'
)
end
end
...
...
@@ -88,6 +99,34 @@
end
end
context
'when navigating to the CI / CD pages'
do
it
'redirects to the Jobs page'
do
find
(
'body'
).
native
.
send_key
(
'g'
)
find
(
'body'
).
native
.
send_key
(
'j'
)
expect
(
page
).
to
have_active_navigation
(
'CI / CD'
)
expect
(
page
).
to
have_active_sub_navigation
(
'Jobs'
)
end
end
context
'when navigating to the Operations pages'
do
it
'redirects to the Environments page'
do
find
(
'body'
).
native
.
send_key
(
'g'
)
find
(
'body'
).
native
.
send_key
(
'e'
)
expect
(
page
).
to
have_active_navigation
(
'Operations'
)
expect
(
page
).
to
have_active_sub_navigation
(
'Environments'
)
end
it
'redirects to the Kubernetes page'
do
find
(
'body'
).
native
.
send_key
(
'g'
)
find
(
'body'
).
native
.
send_key
(
'k'
)
expect
(
page
).
to
have_active_navigation
(
'Operations'
)
expect
(
page
).
to
have_active_sub_navigation
(
'Kubernetes'
)
end
end
context
'when navigating to the Snippets pages'
do
it
'redirects to the snippets page'
do
find
(
'body'
).
native
.
send_key
(
'g'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment