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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
9fca7b43
Commit
9fca7b43
authored
Jun 23, 2017
by
Phil Hughes
Committed by
Annabel Dunstone Gray
Jun 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Limit the width of commit & snippet comment sections
parent
473668b4
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
12 deletions
+23
-12
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+3
-1
app/views/projects/commit/show.html.haml
app/views/projects/commit/show.html.haml
+6
-5
app/views/projects/snippets/show.html.haml
app/views/projects/snippets/show.html.haml
+2
-1
app/views/shared/snippets/_header.html.haml
app/views/shared/snippets/_header.html.haml
+1
-1
app/views/snippets/show.html.haml
app/views/snippets/show.html.haml
+2
-1
changelogs/unreleased/commit-comments-limited-width.yml
changelogs/unreleased/commit-comments-limited-width.yml
+4
-0
spec/views/projects/commit/show.html.haml_spec.rb
spec/views/projects/commit/show.html.haml_spec.rb
+5
-3
No files found.
app/assets/stylesheets/pages/issuable.scss
View file @
9fca7b43
...
@@ -11,7 +11,9 @@
...
@@ -11,7 +11,9 @@
.commit-box
,
.commit-box
,
.info-well
,
.info-well
,
.commit-ci-menu
,
.commit-ci-menu
,
.files-changed
{
.files-changed
,
.limited-header-width
,
.limited-width-notes
{
@extend
.fixed-width-container
;
@extend
.fixed-width-container
;
}
}
...
...
app/views/projects/commit/show.html.haml
View file @
9fca7b43
-
@no_container
=
true
-
@no_container
=
true
-
container_class
=
!
fluid_layout
&&
diff_view
==
:inline
?
'container-limited'
:
''
-
container_class
=
!
fluid_layout
&&
diff_view
==
:inline
?
'container-limited'
:
''
-
limited_container_width
=
fluid_layout
||
diff_view
==
:inline
?
''
:
'limit-container-width'
-
limited_container_width
=
fluid_layout
?
''
:
'limit-container-width'
-
page_title
"
#{
@commit
.
title
}
(
#{
@commit
.
short_id
}
)"
,
"Commits"
-
page_title
"
#{
@commit
.
title
}
(
#{
@commit
.
short_id
}
)"
,
"Commits"
-
page_description
@commit
.
description
-
page_description
@commit
.
description
=
render
"projects/commits/head"
=
render
"projects/commits/head"
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
.block-connector
.block-connector
=
render
"projects/diffs/diffs"
,
diffs:
@diffs
,
environment:
@environment
=
render
"projects/diffs/diffs"
,
diffs:
@diffs
,
environment:
@environment
.limited-width-notes
=
render
"shared/notes/notes_with_form"
,
:autocomplete
=>
true
=
render
"shared/notes/notes_with_form"
,
:autocomplete
=>
true
-
if
can_collaborate_with_project?
-
if
can_collaborate_with_project?
-
%w(revert cherry-pick)
.
each
do
|
type
|
-
%w(revert cherry-pick)
.
each
do
|
type
|
...
...
app/views/projects/snippets/show.html.haml
View file @
9fca7b43
-
@content_class
=
"limit-container-width limited-inner-width-container"
unless
fluid_layout
-
page_title
"
#{
@snippet
.
title
}
(
#{
@snippet
.
to_reference
}
)"
,
"Snippets"
-
page_title
"
#{
@snippet
.
title
}
(
#{
@snippet
.
to_reference
}
)"
,
"Snippets"
=
render
'shared/snippets/header'
=
render
'shared/snippets/header'
...
@@ -9,4 +10,4 @@
...
@@ -9,4 +10,4 @@
.row-content-block.top-block.content-component-block
.row-content-block.top-block.content-component-block
=
render
'award_emoji/awards_block'
,
awardable:
@snippet
,
inline:
true
=
render
'award_emoji/awards_block'
,
awardable:
@snippet
,
inline:
true
#notes
=
render
"shared/notes/notes_with_form"
,
:autocomplete
=>
true
#notes
.limited-width-notes
=
render
"shared/notes/notes_with_form"
,
:autocomplete
=>
true
app/views/shared/snippets/_header.html.haml
View file @
9fca7b43
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
-
else
-
else
=
render
"snippets/actions"
=
render
"snippets/actions"
.snippet-header
.snippet-header
.limited-header-width
%h2
.snippet-title.prepend-top-0.append-bottom-0
%h2
.snippet-title.prepend-top-0.append-bottom-0
=
markdown_field
(
@snippet
,
:title
)
=
markdown_field
(
@snippet
,
:title
)
...
...
app/views/snippets/show.html.haml
View file @
9fca7b43
-
@content_class
=
"limit-container-width limited-inner-width-container"
unless
fluid_layout
-
page_title
"
#{
@snippet
.
title
}
(
#{
@snippet
.
to_reference
}
)"
,
"Snippets"
-
page_title
"
#{
@snippet
.
title
}
(
#{
@snippet
.
to_reference
}
)"
,
"Snippets"
=
render
'shared/snippets/header'
=
render
'shared/snippets/header'
...
@@ -9,4 +10,4 @@
...
@@ -9,4 +10,4 @@
.row-content-block.top-block.content-component-block
.row-content-block.top-block.content-component-block
=
render
'award_emoji/awards_block'
,
awardable:
@snippet
,
inline:
true
=
render
'award_emoji/awards_block'
,
awardable:
@snippet
,
inline:
true
#notes
=
render
"shared/notes/notes_with_form"
,
:autocomplete
=>
false
#notes
.limited-width-notes
=
render
"shared/notes/notes_with_form"
,
:autocomplete
=>
false
changelogs/unreleased/commit-comments-limited-width.yml
0 → 100644
View file @
9fca7b43
---
title
:
Limit commit & snippets comments width
merge_request
:
author
:
spec/views/projects/commit/show.html.haml_spec.rb
View file @
9fca7b43
...
@@ -21,24 +21,26 @@ describe 'projects/commit/show.html.haml', :view do
...
@@ -21,24 +21,26 @@ describe 'projects/commit/show.html.haml', :view do
context
'inline diff view'
do
context
'inline diff view'
do
before
do
before
do
allow
(
view
).
to
receive
(
:diff_view
).
and_return
(
:inline
)
allow
(
view
).
to
receive
(
:diff_view
).
and_return
(
:inline
)
allow
(
view
).
to
receive
(
:diff_view
).
and_return
(
:inline
)
render
render
end
end
it
'
keeps container-limited
'
do
it
'
has limited width
'
do
expect
(
rendered
).
not_
to
have_selector
(
'.limit-container-width'
)
expect
(
rendered
).
to
have_selector
(
'.limit-container-width'
)
end
end
end
end
context
'parallel diff view'
do
context
'parallel diff view'
do
before
do
before
do
allow
(
view
).
to
receive
(
:diff_view
).
and_return
(
:parallel
)
allow
(
view
).
to
receive
(
:diff_view
).
and_return
(
:parallel
)
allow
(
view
).
to
receive
(
:fluid_layout
).
and_return
(
true
)
render
render
end
end
it
'spans full width'
do
it
'spans full width'
do
expect
(
rendered
).
to
have_selector
(
'.limit-container-width'
)
expect
(
rendered
).
not_
to
have_selector
(
'.limit-container-width'
)
end
end
end
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