BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
535d1130
Commit
535d1130
authored
Jun 06, 2016
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove prev/next buttons on issues and merge requests
The buttons were rarely used and added at least 1 query each on every page load.
parent
316630ad
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1 addition
and
70 deletions
+1
-70
CHANGELOG
CHANGELOG
+1
-0
shortcuts_issuable.coffee
app/assets/javascripts/shortcuts_issuable.coffee
+0
-18
issuables_helper.rb
app/helpers/issuables_helper.rb
+0
-12
_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+0
-15
issues.feature
features/project/issues/issues.feature
+0
-7
merge_requests.feature
features/project/merge_requests.feature
+0
-2
issuable.rb
features/steps/shared/issuable.rb
+0
-16
No files found.
CHANGELOG
View file @
535d1130
...
...
@@ -45,6 +45,7 @@ v 8.8.4 (unreleased)
- Fix todos page throwing errors when you have a project pending deletion
- Reduce number of SQL queries when rendering user references
- Upgrade to jQuery 2
- Remove prev/next buttons on issues and merge requests
v 8.8.3
- Fix 404 page when viewing TODOs that contain milestones or labels in different projects. !4312
...
...
app/assets/javascripts/shortcuts_issuable.coffee
View file @
535d1130
...
...
@@ -10,14 +10,6 @@ class @ShortcutsIssuable extends ShortcutsNavigation
@
replyWithSelectedText
()
return
false
)
Mousetrap
.
bind
(
'j'
,
=>
@
prevIssue
()
return
false
)
Mousetrap
.
bind
(
'k'
,
=>
@
nextIssue
()
return
false
)
Mousetrap
.
bind
(
'e'
,
=>
@
editIssue
()
return
false
...
...
@@ -29,16 +21,6 @@ class @ShortcutsIssuable extends ShortcutsNavigation
else
@
enabledHelp
.
push
(
'.hidden-shortcut.issues'
)
prevIssue
:
->
$prevBtn
=
$
(
'.prev-btn'
)
if
not
$prevBtn
.
hasClass
(
'disabled'
)
Turbolinks
.
visit
(
$prevBtn
.
attr
(
'href'
))
nextIssue
:
->
$nextBtn
=
$
(
'.next-btn'
)
if
not
$nextBtn
.
hasClass
(
'disabled'
)
Turbolinks
.
visit
(
$nextBtn
.
attr
(
'href'
))
replyWithSelectedText
:
->
if
window
.
getSelection
selected
=
window
.
getSelection
().
toString
()
...
...
app/helpers/issuables_helper.rb
View file @
535d1130
...
...
@@ -8,14 +8,6 @@ module IssuablesHelper
"right-sidebar-
#{
sidebar_gutter_collapsed?
?
'collapsed'
:
'expanded'
}
"
end
def
issuables_count
(
issuable
)
base_issuable_scope
(
issuable
).
maximum
(
:iid
)
end
def
next_issuable_for
(
issuable
)
base_issuable_scope
(
issuable
).
where
(
'iid > ?'
,
issuable
.
iid
).
last
end
def
multi_label_name
(
current_labels
,
default_label
)
# current_labels may be a string from before
if
current_labels
.
is_a?
(
Array
)
...
...
@@ -45,10 +37,6 @@ module IssuablesHelper
end
end
def
prev_issuable_for
(
issuable
)
base_issuable_scope
(
issuable
).
where
(
'iid < ?'
,
issuable
.
iid
).
first
end
def
user_dropdown_label
(
user_id
,
default_label
)
return
default_label
if
user_id
.
nil?
return
"Unassigned"
if
user_id
==
"0"
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
535d1130
...
...
@@ -2,23 +2,8 @@
.issuable-sidebar
-
can_edit_issuable
=
can?
(
current_user
,
:"admin_
#{
issuable
.
to_ability_name
}
"
,
@project
)
.block.issuable-sidebar-header
%span
.issuable-count.hide-collapsed.pull-left
=
issuable
.
iid
of
=
issuables_count
(
issuable
)
%a
.gutter-toggle.pull-right.js-sidebar-toggle
{
href:
'#'
}
=
sidebar_gutter_toggle_icon
.issuable-nav.hide-collapsed.pull-right.btn-group
{
role:
'group'
,
"aria-label"
=>
'...'
}
-
if
prev_issuable
=
prev_issuable_for
(
issuable
)
=
link_to
'Prev'
,
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
prev_issuable
],
class:
'btn btn-default prev-btn issuable-pager'
-
else
%a
.btn.btn-default.issuable-pager.disabled
{
href:
'#'
}
Prev
-
if
next_issuable
=
next_issuable_for
(
issuable
)
=
link_to
'Next'
,
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
next_issuable
],
class:
'btn btn-default next-btn issuable-pager'
-
else
%a
.btn.btn-default.issuable-pager.disabled
{
href:
'#'
}
Next
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
issuable
],
remote:
true
,
format: :json
,
html:
{
class:
'issuable-context-form inline-update js-issuable-update'
}
do
|
f
|
.block.assignee
...
...
features/project/issues/issues.feature
View file @
535d1130
...
...
@@ -25,13 +25,6 @@ Feature: Project Issues
Scenario
:
I
visit issue page
Given
I click link
"Release 0.4"
Then
I should see issue
"Release 0.4"
And
I should see
"1 of 2"
in the sidebar
Scenario
:
I
navigate between issues
Given
I click link
"Release 0.4"
Then
I click link
"Next"
in the sidebar
Then
I should see issue
"Tweet control"
And
I should see
"2 of 2"
in the sidebar
@javascript
Scenario
:
I
filter by author
...
...
features/project/merge_requests.feature
View file @
535d1130
...
...
@@ -49,14 +49,12 @@ Feature: Project Merge Requests
Scenario
:
I
visit an open merge request page
Given
I click link
"Bug NS-04"
Then
I should see merge request
"Bug NS-04"
And
I should see
"1 of 1"
in the sidebar
Scenario
:
I
visit a merged merge request page
Given
project
"Shop"
have
"Feature NS-05"
merged merge request
And
I click link
"Merged"
And
I click link
"Feature NS-05"
Then
I should see merge request
"Feature NS-05"
And
I should see
"3 of 3"
in the sidebar
Scenario
:
I
close merge request page
Given
I click link
"Bug NS-04"
...
...
features/steps/shared/issuable.rb
View file @
535d1130
...
...
@@ -138,22 +138,6 @@ module SharedIssuable
end
end
step
'I should see "1 of 1" in the sidebar'
do
expect_sidebar_content
(
'1 of 1'
)
end
step
'I should see "1 of 2" in the sidebar'
do
expect_sidebar_content
(
'1 of 2'
)
end
step
'I should see "2 of 2" in the sidebar'
do
expect_sidebar_content
(
'2 of 2'
)
end
step
'I should see "3 of 3" in the sidebar'
do
expect_sidebar_content
(
'3 of 3'
)
end
step
'I click link "Next" in the sidebar'
do
page
.
within
'.issuable-sidebar'
do
click_link
'Next'
...
...
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