Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
b5821e5f
Commit
b5821e5f
authored
May 18, 2018
by
Lukas Eipert
Committed by
Annabel Gray
May 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Keyboard shortcuts for "Kubernetes" and "Environments"
parent
6fb20b10
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
84 additions
and
8 deletions
+84
-8
app/assets/javascripts/shortcuts_navigation.js
app/assets/javascripts/shortcuts_navigation.js
+3
-2
app/views/help/_shortcuts.html.haml
app/views/help/_shortcuts.html.haml
+13
-1
app/views/layouts/nav/sidebar/_project.html.haml
app/views/layouts/nav/sidebar/_project.html.haml
+1
-1
changelogs/unreleased/46427-add-keyboard-shortcut-environments.yml
...s/unreleased/46427-add-keyboard-shortcut-environments.yml
+5
-0
changelogs/unreleased/46427-add-keyboard-shortcut-kubernetes.yml
...ogs/unreleased/46427-add-keyboard-shortcut-kubernetes.yml
+5
-0
changelogs/unreleased/46427-change-keyboard-shortcut-of-activity-feed.yml
...eased/46427-change-keyboard-shortcut-of-activity-feed.yml
+5
-0
changelogs/unreleased/46427-remove-outdated-todos-shortcut.yml
...elogs/unreleased/46427-remove-outdated-todos-shortcut.yml
+5
-0
doc/workflow/shortcuts.md
doc/workflow/shortcuts.md
+7
-3
spec/features/projects/user_uses_shortcuts_spec.rb
spec/features/projects/user_uses_shortcuts_spec.rb
+40
-1
No files found.
app/assets/javascripts/shortcuts_navigation.js
View file @
b5821e5f
...
...
@@ -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 @
b5821e5f
...
...
@@ -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 @
b5821e5f
...
...
@@ -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-
cluster
'
do
=
link_to
project_clusters_path
(
@project
),
title:
_
(
'Kubernetes'
),
class:
'shortcuts-
kubernetes
'
do
%span
=
_
(
'Kubernetes'
)
-
if
show_cluster_hint
...
...
changelogs/unreleased/46427-add-keyboard-shortcut-environments.yml
0 → 100644
View file @
b5821e5f
---
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 @
b5821e5f
---
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 @
b5821e5f
---
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 @
b5821e5f
---
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 @
b5821e5f
...
...
@@ -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 @
b5821e5f
...
...
@@ -13,6 +13,8 @@ describe 'User uses shortcuts', :js do
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 @@ describe 'User uses shortcuts', :js do
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 @@ describe 'User uses shortcuts', :js do
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 @@ describe 'User uses shortcuts', :js do
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