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
Tatuya Kamada
gitlab-ce
Commits
78840333
Commit
78840333
authored
Mar 22, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'add-todos-shortcut' into 'master'
Add global `g t` shortcut to go to todos See merge request !10041
parents
141ee129
c77fc4ce
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
1 deletion
+23
-1
app/assets/javascripts/shortcuts_dashboard_navigation.js
app/assets/javascripts/shortcuts_dashboard_navigation.js
+3
-0
app/assets/javascripts/shortcuts_navigation.js
app/assets/javascripts/shortcuts_navigation.js
+3
-0
app/views/help/_shortcuts.html.haml
app/views/help/_shortcuts.html.haml
+6
-0
app/views/layouts/header/_default.html.haml
app/views/layouts/header/_default.html.haml
+1
-1
changelogs/unreleased/add-todos-shortcut.yml
changelogs/unreleased/add-todos-shortcut.yml
+4
-0
doc/workflow/shortcuts.md
doc/workflow/shortcuts.md
+1
-0
spec/features/dashboard/shortcuts_spec.rb
spec/features/dashboard/shortcuts_spec.rb
+5
-0
No files found.
app/assets/javascripts/shortcuts_dashboard_navigation.js
View file @
78840333
...
...
@@ -22,6 +22,9 @@ require('./shortcuts');
Mousetrap
.
bind
(
'
g m
'
,
function
()
{
return
ShortcutsDashboardNavigation
.
findAndFollowLink
(
'
.dashboard-shortcuts-merge_requests
'
);
});
Mousetrap
.
bind
(
'
g t
'
,
function
()
{
return
ShortcutsDashboardNavigation
.
findAndFollowLink
(
'
.shortcuts-todos
'
);
});
Mousetrap
.
bind
(
'
g p
'
,
function
()
{
return
ShortcutsDashboardNavigation
.
findAndFollowLink
(
'
.dashboard-shortcuts-projects
'
);
});
...
...
app/assets/javascripts/shortcuts_navigation.js
View file @
78840333
...
...
@@ -43,6 +43,9 @@ require('./shortcuts');
Mousetrap
.
bind
(
'
g m
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-merge_requests
'
);
});
Mousetrap
.
bind
(
'
g t
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-todos
'
);
});
Mousetrap
.
bind
(
'
g w
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-wiki
'
);
});
...
...
app/views/help/_shortcuts.html.haml
View file @
78840333
...
...
@@ -118,6 +118,12 @@
.key
m
%td
Go to merge requests
%tr
%td
.shortcut
.key
g
.key
t
%td
Go to todos
%tbody
%tr
%th
...
...
app/views/layouts/header/_default.html.haml
View file @
78840333
...
...
@@ -32,7 +32,7 @@
=
link_to
admin_root_path
,
title:
'Admin Area'
,
aria:
{
label:
"Admin Area"
},
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'wrench fw'
)
%li
=
link_to
dashboard_todos_path
,
title:
'Todos'
,
aria:
{
label:
"Todos"
},
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
link_to
dashboard_todos_path
,
title:
'Todos'
,
aria:
{
label:
"Todos"
},
class:
'shortcuts-todos'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'bell fw'
)
%span
.badge.todos-pending-count
{
class:
(
"hidden"
if
todos_pending_count
==
0
)
}
=
todos_count_format
(
todos_pending_count
)
...
...
changelogs/unreleased/add-todos-shortcut.yml
0 → 100644
View file @
78840333
---
title
:
Add `g t` global shortcut to go to todos
merge_request
:
author
:
doc/workflow/shortcuts.md
View file @
78840333
...
...
@@ -36,6 +36,7 @@ You can see GitLab's keyboard shortcuts by using 'shift + ?'
|
<kbd>
g
</kbd>
+
<kbd>
p
</kbd>
| Go to projects |
|
<kbd>
g
</kbd>
+
<kbd>
i
</kbd>
| Go to issues |
|
<kbd>
g
</kbd>
+
<kbd>
m
</kbd>
| Go to merge requests |
|
<kbd>
g
</kbd>
+
<kbd>
t
</kbd>
| Go to todos |
## Project
...
...
spec/features/dashboard/shortcuts_spec.rb
View file @
78840333
...
...
@@ -21,6 +21,11 @@ feature 'Dashboard shortcuts', feature: true, js: true do
find
(
'body'
).
native
.
send_key
(
'm'
)
check_page_title
(
'Merge Requests'
)
find
(
'body'
).
native
.
send_key
(
'g'
)
find
(
'body'
).
native
.
send_key
(
't'
)
check_page_title
(
'Todos'
)
end
def
check_page_title
(
title
)
...
...
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