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
Léo-Paul Géneau
gitlab-ce
Commits
cf3c4398
Commit
cf3c4398
authored
Mar 14, 2017
by
Eric Eastwood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix link togglers jumping to top
Fix
https://gitlab.com/gitlab-org/gitlab-ce/issues/29414
parent
6460489b
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
55 additions
and
12 deletions
+55
-12
app/assets/javascripts/behaviors/toggler_behavior.js
app/assets/javascripts/behaviors/toggler_behavior.js
+1
-1
app/assets/stylesheets/pages/diff.scss
app/assets/stylesheets/pages/diff.scss
+15
-0
app/assets/stylesheets/pages/merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+10
-0
app/assets/stylesheets/pages/notes.scss
app/assets/stylesheets/pages/notes.scss
+14
-0
app/views/discussions/_discussion.html.haml
app/views/discussions/_discussion.html.haml
+1
-1
app/views/projects/commits/_commit.html.haml
app/views/projects/commits/_commit.html.haml
+1
-1
app/views/projects/diffs/_stats.html.haml
app/views/projects/diffs/_stats.html.haml
+1
-1
app/views/projects/merge_requests/widget/open/_accept.html.haml
...ews/projects/merge_requests/widget/open/_accept.html.haml
+1
-1
app/views/projects/new.html.haml
app/views/projects/new.html.haml
+1
-1
changelogs/unreleased/29414-fix-toggle-discussion-link-jump.yml
...logs/unreleased/29414-fix-toggle-discussion-link-jump.yml
+4
-0
features/steps/dashboard/new_project.rb
features/steps/dashboard/new_project.rb
+1
-1
features/steps/project/merge_requests.rb
features/steps/project/merge_requests.rb
+1
-1
spec/features/merge_requests/diff_notes_resolve_spec.rb
spec/features/merge_requests/diff_notes_resolve_spec.rb
+3
-3
spec/features/merge_requests/merge_commit_message_toggle_spec.rb
...atures/merge_requests/merge_commit_message_toggle_spec.rb
+1
-1
No files found.
app/assets/javascripts/behaviors/toggler_behavior.js
View file @
cf3c4398
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
// Button does not change visibility. If button has icon - it changes chevron style.
// Button does not change visibility. If button has icon - it changes chevron style.
//
//
// %div.js-toggle-container
// %div.js-toggle-container
// %
a
.js-toggle-button
// %
button
.js-toggle-button
// %div.js-toggle-content
// %div.js-toggle-content
//
//
$
(
'
body
'
).
on
(
'
click
'
,
'
.js-toggle-button
'
,
function
(
e
)
{
$
(
'
body
'
).
on
(
'
click
'
,
'
.js-toggle-button
'
,
function
(
e
)
{
...
...
app/assets/stylesheets/pages/diff.scss
View file @
cf3c4398
...
@@ -431,6 +431,21 @@
...
@@ -431,6 +431,21 @@
border-bottom
:
none
;
border-bottom
:
none
;
}
}
.diff-stats-summary-toggler
{
padding
:
0
;
background-color
:
transparent
;
border
:
0
;
color
:
$gl-link-color
;
transition
:
color
0
.1s
linear
;
&
:hover
,
&
:focus
{
outline
:
none
;
text-decoration
:
underline
;
color
:
$gl-link-hover-color
;
}
}
// Mobile
// Mobile
@media
(
max-width
:
480px
)
{
@media
(
max-width
:
480px
)
{
.diff-title
{
.diff-title
{
...
...
app/assets/stylesheets/pages/merge_requests.scss
View file @
cf3c4398
...
@@ -60,7 +60,17 @@
...
@@ -60,7 +60,17 @@
}
}
.modify-merge-commit-link
{
.modify-merge-commit-link
{
padding
:
0
;
background-color
:
transparent
;
border
:
0
;
color
:
$gl-text-color
;
color
:
$gl-text-color
;
&
:hover
,
&
:focus
{
text-decoration
:
underline
;
}
}
}
.merge-param-checkbox
{
.merge-param-checkbox
{
...
...
app/assets/stylesheets/pages/notes.scss
View file @
cf3c4398
...
@@ -410,8 +410,22 @@ ul.notes {
...
@@ -410,8 +410,22 @@ ul.notes {
}
}
.discussion-toggle-button
{
.discussion-toggle-button
{
padding
:
0
;
background-color
:
transparent
;
border
:
0
;
line-height
:
20px
;
line-height
:
20px
;
font-size
:
13px
;
font-size
:
13px
;
transition
:
color
0
.1s
linear
;
&
:hover
{
color
:
$gl-link-color
;
}
&
:focus
{
text-decoration
:
underline
;
outline
:
none
;
color
:
$gl-link-color
;
}
.fa
{
.fa
{
margin-right
:
3px
;
margin-right
:
3px
;
...
...
app/views/discussions/_discussion.html.haml
View file @
cf3c4398
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
.discussion.js-toggle-container
{
class:
discussion
.
id
,
data:
{
discussion_id:
discussion
.
id
}
}
.discussion.js-toggle-container
{
class:
discussion
.
id
,
data:
{
discussion_id:
discussion
.
id
}
}
.discussion-header
.discussion-header
.discussion-actions
.discussion-actions
=
link_to
"#"
,
class:
"note-action-button discussion-toggle-button js-toggle-button"
do
%button
.note-action-button.discussion-toggle-button.js-toggle-button
{
type:
"button"
}
-
if
expanded
-
if
expanded
=
icon
(
"chevron-up"
)
=
icon
(
"chevron-up"
)
-
else
-
else
...
...
app/views/projects/commits/_commit.html.haml
View file @
cf3c4398
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
.visible-xs-inline
.visible-xs-inline
=
render_commit_status
(
commit
,
ref:
ref
)
=
render_commit_status
(
commit
,
ref:
ref
)
-
if
commit
.
description?
-
if
commit
.
description?
%
a
.text-expander.hidden-xs.js-toggle-button
...
%
button
.text-expander.hidden-xs.js-toggle-button
{
type:
"button"
}
...
-
if
commit
.
description?
-
if
commit
.
description?
%pre
.commit-row-description.js-toggle-content
%pre
.commit-row-description.js-toggle-content
...
...
app/views/projects/diffs/_stats.html.haml
View file @
cf3c4398
.js-toggle-container
.js-toggle-container
.commit-stat-summary
.commit-stat-summary
Showing
Showing
=
link_to
'#'
,
class:
'js-toggle-button'
do
%button
.diff-stats-summary-toggler.js-toggle-button
{
type:
"button"
}
%strong
=
pluralize
(
diff_files
.
size
,
"changed file"
)
%strong
=
pluralize
(
diff_files
.
size
,
"changed file"
)
with
with
%strong
.cgreen
#{
diff_files
.
sum
(
&
:added_lines
)
}
additions
%strong
.cgreen
#{
diff_files
.
sum
(
&
:added_lines
)
}
additions
...
...
app/views/projects/merge_requests/widget/open/_accept.html.haml
View file @
cf3c4398
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
=
check_box_tag
:should_remove_source_branch
=
check_box_tag
:should_remove_source_branch
Remove source branch
Remove source branch
.accept-control
.accept-control
=
link_to
"#"
,
class:
"modify-merge-commit-link js-toggle-button"
do
%button
.modify-merge-commit-link.js-toggle-button
{
type:
"button"
}
=
icon
(
'edit'
)
=
icon
(
'edit'
)
Modify commit message
Modify commit message
.js-toggle-content.hide.prepend-top-default
.js-toggle-content.hide.prepend-top-default
...
...
app/views/projects/new.html.haml
View file @
cf3c4398
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
Gitea
Gitea
%div
%div
-
if
git_import_enabled?
-
if
git_import_enabled?
=
link_to
"#"
,
class:
'btn js-toggle-button import_git'
do
%button
.btn.js-toggle-button.import_git
{
type:
"button"
}
=
icon
(
'git'
,
text:
'Repo by URL'
)
=
icon
(
'git'
,
text:
'Repo by URL'
)
.import_gitlab_project
.import_gitlab_project
-
if
gitlab_project_import_enabled?
-
if
gitlab_project_import_enabled?
...
...
changelogs/unreleased/29414-fix-toggle-discussion-link-jump.yml
0 → 100644
View file @
cf3c4398
---
title
:
Update toggle buttons to be <button>
merge_request
:
author
:
features/steps/dashboard/new_project.rb
View file @
cf3c4398
...
@@ -19,7 +19,7 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps
...
@@ -19,7 +19,7 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps
expect
(
page
).
to
have_link
(
'Bitbucket'
)
expect
(
page
).
to
have_link
(
'Bitbucket'
)
expect
(
page
).
to
have_link
(
'GitLab.com'
)
expect
(
page
).
to
have_link
(
'GitLab.com'
)
expect
(
page
).
to
have_link
(
'Google Code'
)
expect
(
page
).
to
have_link
(
'Google Code'
)
expect
(
page
).
to
have_
link
(
'Repo by URL'
)
expect
(
page
).
to
have_
button
(
'Repo by URL'
)
expect
(
page
).
to
have_link
(
'GitLab export'
)
expect
(
page
).
to
have_link
(
'GitLab export'
)
end
end
...
...
features/steps/project/merge_requests.rb
View file @
cf3c4398
...
@@ -382,7 +382,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
...
@@ -382,7 +382,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
end
step
'I modify merge commit message'
do
step
'I modify merge commit message'
do
find
(
'.modify-merge-commit-link'
).
click
click_button
"Modify commit message"
fill_in
'commit_message'
,
with:
'wow such merge'
fill_in
'commit_message'
,
with:
'wow such merge'
end
end
...
...
spec/features/merge_requests/diff_notes_resolve_spec.rb
View file @
cf3c4398
...
@@ -296,7 +296,7 @@ feature 'Diff notes resolve', feature: true, js: true do
...
@@ -296,7 +296,7 @@ feature 'Diff notes resolve', feature: true, js: true do
it
'displays next discussion even if hidden'
do
it
'displays next discussion even if hidden'
do
page
.
all
(
'.note-discussion'
).
each
do
|
discussion
|
page
.
all
(
'.note-discussion'
).
each
do
|
discussion
|
page
.
within
discussion
do
page
.
within
discussion
do
click_
link
'Toggle discussion'
click_
button
'Toggle discussion'
end
end
end
end
...
@@ -477,13 +477,13 @@ feature 'Diff notes resolve', feature: true, js: true do
...
@@ -477,13 +477,13 @@ feature 'Diff notes resolve', feature: true, js: true do
it
'shows resolved icon'
do
it
'shows resolved icon'
do
expect
(
page
).
to
have_content
'1/1 discussion resolved'
expect
(
page
).
to
have_content
'1/1 discussion resolved'
click_
link
'Toggle discussion'
click_
button
'Toggle discussion'
expect
(
page
).
to
have_selector
(
'.line-resolve-btn.is-active'
)
expect
(
page
).
to
have_selector
(
'.line-resolve-btn.is-active'
)
end
end
it
'does not allow user to click resolve button'
do
it
'does not allow user to click resolve button'
do
expect
(
page
).
to
have_selector
(
'.line-resolve-btn.is-disabled'
)
expect
(
page
).
to
have_selector
(
'.line-resolve-btn.is-disabled'
)
click_
link
'Toggle discussion'
click_
button
'Toggle discussion'
expect
(
page
).
to
have_selector
(
'.line-resolve-btn.is-disabled'
)
expect
(
page
).
to
have_selector
(
'.line-resolve-btn.is-disabled'
)
end
end
...
...
spec/features/merge_requests/merge_commit_message_toggle_spec.rb
View file @
cf3c4398
...
@@ -41,7 +41,7 @@ feature 'Clicking toggle commit message link', feature: true, js: true do
...
@@ -41,7 +41,7 @@ feature 'Clicking toggle commit message link', feature: true, js: true do
visit
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request
)
visit
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request
)
expect
(
textbox
).
not_to
be_visible
expect
(
textbox
).
not_to
be_visible
click_
link
"Modify commit message"
click_
button
"Modify commit message"
expect
(
textbox
).
to
be_visible
expect
(
textbox
).
to
be_visible
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