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
Boxiang Sun
gitlab-ce
Commits
41b47965
Commit
41b47965
authored
May 26, 2017
by
Douwe Maan
Committed by
Annabel Dunstone Gray
May 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More consistent padding of notes, system notes, and note form
parent
f46d3d60
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
75 additions
and
54 deletions
+75
-54
app/assets/javascripts/notes.js
app/assets/javascripts/notes.js
+1
-1
app/assets/stylesheets/framework/flash.scss
app/assets/stylesheets/framework/flash.scss
+4
-0
app/assets/stylesheets/framework/typography.scss
app/assets/stylesheets/framework/typography.scss
+5
-1
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+2
-2
app/assets/stylesheets/pages/note_form.scss
app/assets/stylesheets/pages/note_form.scss
+10
-2
app/assets/stylesheets/pages/notes.scss
app/assets/stylesheets/pages/notes.scss
+31
-33
app/views/discussions/_notes.html.haml
app/views/discussions/_notes.html.haml
+11
-3
app/views/shared/notes/_notes_with_form.html.haml
app/views/shared/notes/_notes_with_form.html.haml
+11
-12
No files found.
app/assets/javascripts/notes.js
View file @
41b47965
...
@@ -1212,7 +1212,7 @@ const normalizeNewlines = function(str) {
...
@@ -1212,7 +1212,7 @@ const normalizeNewlines = function(str) {
`<li id="
${
uniqueId
}
" class="note being-posted fade-in-half timeline-entry">
`<li id="
${
uniqueId
}
" class="note being-posted fade-in-half timeline-entry">
<div class="timeline-entry-inner">
<div class="timeline-entry-inner">
<div class="timeline-icon">
<div class="timeline-icon">
<a href="/
${
currentUsername
}
"><span class="dummy-avatar"></span></a>
<a href="/
${
currentUsername
}
"><span class="
avatar
dummy-avatar"></span></a>
</div>
</div>
<div class="timeline-content
${
discussionClass
}
">
<div class="timeline-content
${
discussionClass
}
">
<div class="note-header">
<div class="note-header">
...
...
app/assets/stylesheets/framework/flash.scss
View file @
41b47965
...
@@ -36,6 +36,10 @@
...
@@ -36,6 +36,10 @@
border-radius
:
0
;
border-radius
:
0
;
}
}
}
}
&
:empty
{
margin
:
0
;
}
}
}
@media
(
max-width
:
$screen-sm-max
)
{
@media
(
max-width
:
$screen-sm-max
)
{
...
...
app/assets/stylesheets/framework/typography.scss
View file @
41b47965
...
@@ -21,6 +21,10 @@
...
@@ -21,6 +21,10 @@
margin-top
:
0
;
margin-top
:
0
;
}
}
>
:last-child
{
margin-bottom
:
0
;
}
// Single code lines should wrap
// Single code lines should wrap
code
{
code
{
font-family
:
$monospace_font
;
font-family
:
$monospace_font
;
...
@@ -157,7 +161,7 @@
...
@@ -157,7 +161,7 @@
ul
,
ul
,
ol
{
ol
{
padding
:
0
;
padding
:
0
;
margin
:
0
0
16px
!
important
;
margin
:
0
0
16px
;
}
}
ul
:dir
(
rtl
),
ul
:dir
(
rtl
),
...
...
app/assets/stylesheets/pages/issuable.scss
View file @
41b47965
...
@@ -431,7 +431,7 @@
...
@@ -431,7 +431,7 @@
}
}
.detail-page-description
{
.detail-page-description
{
padding
:
16px
0
0
;
padding
:
16px
0
;
small
{
small
{
color
:
$gray-darkest
;
color
:
$gray-darkest
;
...
@@ -441,7 +441,7 @@
...
@@ -441,7 +441,7 @@
.edited-text
{
.edited-text
{
color
:
$gray-darkest
;
color
:
$gray-darkest
;
display
:
block
;
display
:
block
;
margin
:
0
0
16px
;
margin
:
16px
0
0
;
.author_link
{
.author_link
{
color
:
$gray-darkest
;
color
:
$gray-darkest
;
...
...
app/assets/stylesheets/pages/note_form.scss
View file @
41b47965
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
.note-edit-form
{
.note-edit-form
{
.note-form-actions
{
.note-form-actions
{
position
:
relative
;
position
:
relative
;
margin
:
$gl-padding
0
;
margin
:
$gl-padding
0
0
;
}
}
.note-preview-holder
{
.note-preview-holder
{
...
@@ -124,10 +124,18 @@
...
@@ -124,10 +124,18 @@
}
}
.discussion-form
{
.discussion-form
{
padding
:
$gl-padding-top
$gl-padding
;
padding
:
$gl-padding-top
$gl-padding
$gl-padding
;
background-color
:
$white-light
;
background-color
:
$white-light
;
}
}
.discussion-notes
.disabled-comment
{
padding
:
6px
0
;
}
.notes-form
>
li
{
border
:
0
;
}
.note-edit-form
{
.note-edit-form
{
display
:
none
;
display
:
none
;
font-size
:
14px
;
font-size
:
14px
;
...
...
app/assets/stylesheets/pages/notes.scss
View file @
41b47965
...
@@ -14,19 +14,6 @@ ul.notes {
...
@@ -14,19 +14,6 @@ ul.notes {
margin
:
0
;
margin
:
0
;
padding
:
0
;
padding
:
0
;
.timeline-icon
{
float
:
left
;
svg
{
width
:
16px
;
height
:
16px
;
fill
:
$gray-darkest
;
position
:
absolute
;
left
:
0
;
top
:
16px
;
}
}
.timeline-content
{
.timeline-content
{
margin-left
:
55px
;
margin-left
:
55px
;
...
@@ -56,21 +43,22 @@ ul.notes {
...
@@ -56,21 +43,22 @@ ul.notes {
position
:
relative
;
position
:
relative
;
}
}
.note
{
>
li
{
padding
:
$gl-padding
$gl-btn-padding
0
;
padding
:
$gl-padding
$gl-btn-padding
;
display
:
block
;
display
:
block
;
position
:
relative
;
position
:
relative
;
border-bottom
:
1px
solid
$white-normal
;
border-bottom
:
1px
solid
$white-normal
;
&
:last-child
{
// Override `.timeline > li:last-child { border-bottom: none; }`
border-bottom
:
1px
solid
$white-normal
;
}
&
.being-posted
{
&
.being-posted
{
pointer-events
:
none
;
pointer-events
:
none
;
opacity
:
0
.5
;
opacity
:
0
.5
;
.dummy-avatar
{
.dummy-avatar
{
display
:
inline-block
;
height
:
40px
;
width
:
40px
;
border-radius
:
50%
;
background-color
:
$kdb-border
;
background-color
:
$kdb-border
;
border
:
1px
solid
darken
(
$kdb-border
,
25%
);
border
:
1px
solid
darken
(
$kdb-border
,
25%
);
}
}
...
@@ -126,7 +114,7 @@ ul.notes {
...
@@ -126,7 +114,7 @@ ul.notes {
.note-awards
{
.note-awards
{
.js-awards-block
{
.js-awards-block
{
margin-
bottom
:
16px
;
margin-
top
:
16px
;
}
}
}
}
...
@@ -161,7 +149,7 @@ ul.notes {
...
@@ -161,7 +149,7 @@ ul.notes {
.system-note
{
.system-note
{
font-size
:
14px
;
font-size
:
14px
;
padding
:
0
;
padding
-left
:
0
;
clear
:
both
;
clear
:
both
;
@media
(
min-width
:
$screen-sm-min
)
{
@media
(
min-width
:
$screen-sm-min
)
{
...
@@ -198,11 +186,22 @@ ul.notes {
...
@@ -198,11 +186,22 @@ ul.notes {
}
}
}
}
.timeline-
content
{
.timeline-
icon
{
padding
:
14px
10px
;
float
:
left
;
svg
{
width
:
16px
;
height
:
16px
;
fill
:
$gray-darkest
;
position
:
absolute
;
left
:
0
;
top
:
2px
;
}
}
.timeline-content
{
@media
(
min-width
:
$screen-sm-min
)
{
@media
(
min-width
:
$screen-sm-min
)
{
margin-left
:
2
0px
;
margin-left
:
3
0px
;
}
}
}
}
...
@@ -596,10 +595,15 @@ ul.notes {
...
@@ -596,10 +595,15 @@ ul.notes {
.discussion-body
,
.discussion-body
,
.diff-file
{
.diff-file
{
.notes
.note
{
.notes
.note
{
padding
:
10px
15px
;
padding-left
:
$gl-padding
;
padding-right
:
$gl-padding
;
&
.system-note
{
&
.system-note
{
padding
:
0
;
padding-left
:
0
;
@media
(
min-width
:
$screen-sm-min
)
{
margin-left
:
70px
;
}
}
}
}
}
}
}
...
@@ -613,17 +617,11 @@ ul.notes {
...
@@ -613,17 +617,11 @@ ul.notes {
}
}
.disabled-comment
{
.disabled-comment
{
margin-left
:
-
$gl-padding-top
;
margin-right
:
-
$gl-padding-top
;
background-color
:
$gray-light
;
background-color
:
$gray-light
;
border-radius
:
$border-radius-base
;
border-radius
:
$border-radius-base
;
border
:
1px
solid
$border-gray-normal
;
border
:
1px
solid
$border-gray-normal
;
color
:
$note-disabled-comment-color
;
color
:
$note-disabled-comment-color
;
line-height
:
200px
;
padding
:
90px
0
;
.disabled-comment-text
{
line-height
:
normal
;
}
a
{
a
{
color
:
$gl-link-color
;
color
:
$gl-link-color
;
...
...
app/views/discussions/_notes.html.haml
View file @
41b47965
.discussion-notes
.discussion-notes
%ul
.notes
{
data:
{
discussion_id:
discussion
.
id
}
}
%ul
.notes
{
data:
{
discussion_id:
discussion
.
id
}
}
=
render
partial:
"shared/notes/note"
,
collection:
discussion
.
notes
,
as: :note
=
render
partial:
"shared/notes/note"
,
collection:
discussion
.
notes
,
as: :note
.flash-container
-
if
current_user
.flash-container
.discussion-reply-holder
.discussion-reply-holder
-
if
can_create_note?
-
if
discussion
.
potentially_resolvable?
-
if
discussion
.
potentially_resolvable?
-
line_type
=
local_assigns
.
fetch
(
:line_type
,
nil
)
-
line_type
=
local_assigns
.
fetch
(
:line_type
,
nil
)
...
@@ -19,3 +20,10 @@
...
@@ -19,3 +20,10 @@
=
render
"discussions/jump_to_next"
,
discussion:
discussion
=
render
"discussions/jump_to_next"
,
discussion:
discussion
-
else
-
else
=
link_to_reply_discussion
(
discussion
)
=
link_to_reply_discussion
(
discussion
)
-
elsif
!
current_user
.disabled-comment.text-center
Please
=
link_to
"register"
,
new_session_path
(
:user
,
redirect_to_referer:
'yes'
)
or
=
link_to
"sign in"
,
new_session_path
(
:user
,
redirect_to_referer:
'yes'
)
to reply
app/views/shared/notes/_notes_with_form.html.haml
View file @
41b47965
...
@@ -3,24 +3,23 @@
...
@@ -3,24 +3,23 @@
=
render
'shared/notes/edit_form'
,
project:
@project
=
render
'shared/notes/edit_form'
,
project:
@project
%ul
.notes.notes-form.timeline
-
if
can_create_note?
%li
.timeline-entry
%ul
.notes.notes-form.timeline
.flash-container.timeline-content
%li
.timeline-entry
.flash-container.timeline-content
-
if
can_create_note?
.timeline-icon.hidden-xs.hidden-sm
.timeline-icon.hidden-xs.hidden-sm
%a
.author_link
{
href:
user_path
(
current_user
)
}
%a
.author_link
{
href:
user_path
(
current_user
)
}
=
image_tag
avatar_icon
(
current_user
),
alt:
current_user
.
to_reference
,
class:
'avatar s40'
=
image_tag
avatar_icon
(
current_user
),
alt:
current_user
.
to_reference
,
class:
'avatar s40'
.timeline-content.timeline-content-form
.timeline-content.timeline-content-form
=
render
"shared/notes/form"
,
view:
diff_view
=
render
"shared/notes/form"
,
view:
diff_view
-
elsif
!
current_user
-
elsif
!
current_user
.disabled-comment.text-center
.disabled-comment.text-center.prepend-top-default
.disabled-comment-text.inline
Please
Please
=
link_to
"register"
,
new_session_path
(
:user
,
redirect_to_referer:
'yes'
)
=
link_to
"register"
,
new_session_path
(
:user
,
redirect_to_referer:
'yes'
)
or
or
=
link_to
"sign in"
,
new_session_path
(
:user
,
redirect_to_referer:
'yes'
)
=
link_to
"sign in"
,
new_session_path
(
:user
,
redirect_to_referer:
'yes'
)
to comment
to post a comment
:javascript
:javascript
var
notes
=
new
Notes
(
"
#{
notes_url
}
"
,
#{
@notes
.
map
(
&
:id
).
to_json
}
,
#{
Time
.
now
.
to_i
}
,
"
#{
diff_view
}
"
,
#{
autocomplete
}
)
var
notes
=
new
Notes
(
"
#{
notes_url
}
"
,
#{
@notes
.
map
(
&
:id
).
to_json
}
,
#{
Time
.
now
.
to_i
}
,
"
#{
diff_view
}
"
,
#{
autocomplete
}
)
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