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
8404ab46
Commit
8404ab46
authored
Jul 08, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add shortcut for project activity page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
c2f02fc1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
3 deletions
+22
-3
app/assets/javascripts/dispatcher.js.coffee
app/assets/javascripts/dispatcher.js.coffee
+1
-0
app/assets/javascripts/shortcuts_navigation.coffee
app/assets/javascripts/shortcuts_navigation.coffee
+1
-0
app/views/help/_shortcuts.html.haml
app/views/help/_shortcuts.html.haml
+6
-0
app/views/layouts/nav/_project.html.haml
app/views/layouts/nav/_project.html.haml
+2
-2
features/project/shortcuts.feature
features/project/shortcuts.feature
+7
-1
features/steps/project/project_shortcuts.rb
features/steps/project/project_shortcuts.rb
+5
-0
No files found.
app/assets/javascripts/dispatcher.js.coffee
View file @
8404ab46
...
@@ -64,6 +64,7 @@ class Dispatcher
...
@@ -64,6 +64,7 @@ class Dispatcher
shortcut_handler
=
new
ShortcutsNavigation
()
shortcut_handler
=
new
ShortcutsNavigation
()
when
'projects:activity'
when
'projects:activity'
new
Activities
()
new
Activities
()
shortcut_handler
=
new
ShortcutsNavigation
()
when
'projects:show'
when
'projects:show'
shortcut_handler
=
new
ShortcutsNavigation
()
shortcut_handler
=
new
ShortcutsNavigation
()
when
'groups:show'
when
'groups:show'
...
...
app/assets/javascripts/shortcuts_navigation.coffee
View file @
8404ab46
...
@@ -4,6 +4,7 @@ class @ShortcutsNavigation extends Shortcuts
...
@@ -4,6 +4,7 @@ class @ShortcutsNavigation extends Shortcuts
constructor
:
->
constructor
:
->
super
()
super
()
Mousetrap
.
bind
(
'g p'
,
->
ShortcutsNavigation
.
findAndFollowLink
(
'.shortcuts-project'
))
Mousetrap
.
bind
(
'g p'
,
->
ShortcutsNavigation
.
findAndFollowLink
(
'.shortcuts-project'
))
Mousetrap
.
bind
(
'g e'
,
->
ShortcutsNavigation
.
findAndFollowLink
(
'.shortcuts-project-activity'
))
Mousetrap
.
bind
(
'g f'
,
->
ShortcutsNavigation
.
findAndFollowLink
(
'.shortcuts-tree'
))
Mousetrap
.
bind
(
'g f'
,
->
ShortcutsNavigation
.
findAndFollowLink
(
'.shortcuts-tree'
))
Mousetrap
.
bind
(
'g c'
,
->
ShortcutsNavigation
.
findAndFollowLink
(
'.shortcuts-commits'
))
Mousetrap
.
bind
(
'g c'
,
->
ShortcutsNavigation
.
findAndFollowLink
(
'.shortcuts-commits'
))
Mousetrap
.
bind
(
'g n'
,
->
ShortcutsNavigation
.
findAndFollowLink
(
'.shortcuts-network'
))
Mousetrap
.
bind
(
'g n'
,
->
ShortcutsNavigation
.
findAndFollowLink
(
'.shortcuts-network'
))
...
...
app/views/help/_shortcuts.html.haml
View file @
8404ab46
...
@@ -79,6 +79,12 @@
...
@@ -79,6 +79,12 @@
%td
.shortcut
%td
.shortcut
.key
g
.key
g
.key
p
.key
p
%td
Go to the project's home page
%tr
%td
.shortcut
.key
g
.key
e
%td
%td
Go to the project's activity feed
Go to the project's activity feed
%tr
%tr
...
...
app/views/layouts/nav/_project.html.haml
View file @
8404ab46
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
=
icon
(
'home fw'
)
=
icon
(
'home fw'
)
%span
%span
Project
Project
=
nav_link
(
path:
'projects#activity'
,
html_options:
{
class:
'activity'
}
)
do
=
nav_link
(
path:
'projects#activity'
)
do
=
link_to
activity_project_path
(
@project
),
title:
'Project'
,
data:
{
placement:
'right'
}
do
=
link_to
activity_project_path
(
@project
),
title:
'Project
Activity'
,
class:
'shortcuts-project-activity
'
,
data:
{
placement:
'right'
}
do
=
icon
(
'dashboard fw'
)
=
icon
(
'dashboard fw'
)
%span
%span
Activity
Activity
...
...
features/project/shortcuts.feature
View file @
8404ab46
...
@@ -46,7 +46,13 @@ Feature: Project Shortcuts
...
@@ -46,7 +46,13 @@ Feature: Project Shortcuts
Then
the active main tab should be Wiki
Then
the active main tab should be Wiki
@javascript
@javascript
Scenario
:
Navigate to project
feed
Scenario
:
Navigate to project
home
Given
I visit my project's files page
Given
I visit my project's files page
Given
I press
"g"
and
"p"
Given
I press
"g"
and
"p"
Then
the active main tab should be Home
Then
the active main tab should be Home
@javascript
Scenario
:
Navigate to project feed
Given
I visit my project's files page
Given
I press
"g"
and
"e"
Then
the active main tab should be Activity
features/steps/project/project_shortcuts.rb
View file @
8404ab46
...
@@ -33,4 +33,9 @@ class Spinach::Features::ProjectShortcuts < Spinach::FeatureSteps
...
@@ -33,4 +33,9 @@ class Spinach::Features::ProjectShortcuts < Spinach::FeatureSteps
find
(
'body'
).
native
.
send_key
(
'g'
)
find
(
'body'
).
native
.
send_key
(
'g'
)
find
(
'body'
).
native
.
send_key
(
'w'
)
find
(
'body'
).
native
.
send_key
(
'w'
)
end
end
step
'I press "g" and "e"'
do
find
(
'body'
).
native
.
send_key
(
'g'
)
find
(
'body'
).
native
.
send_key
(
'e'
)
end
end
end
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