Commit 2f2d82e9 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'ui-improvements' into 'master'

Ui improvements

* improve UI for commits, issues and merge requests lists
* refactor commit css

See merge request !1550
parents de040ffa 692aa783
v 7.9.0 (unreleased) v 7.9.0 (unreleased)
- Fix broken access control for note attachments (Hannes Rosenögger) - Move labels/milestones tabs to sidebar
v 7.8.0 (unreleased) v 7.8.0 (unreleased)
- Replace highlight.js with rouge-fork rugments (Stefan Tatschner) - Replace highlight.js with rouge-fork rugments (Stefan Tatschner)
......
.commit-title{
display: block;
}
.commit-title{
margin-bottom: 10px;
}
.commit-author, .commit-committer{
display: block;
color: #999;
font-weight: normal;
font-style: italic;
}
.commit-author strong, .commit-committer strong{
font-weight: bold;
font-style: normal;
}
.commit-description {
background: none;
border: none;
margin: 0;
padding: 0;
margin-top: 10px;
}
.commit-stat-summary {
color: #666;
font-size: 14px;
font-weight: normal;
padding: 10px 0;
}
.commit-info-row {
margin-bottom: 10px;
.avatar {
@extend .avatar-inline;
}
.commit-committer-link,
.commit-author-link {
color: #444;
font-weight: bold;
}
}
.commit-committer-link,
.commit-author-link {
font-size: 13px;
color: #555;
&:hover {
color: #999;
}
}
.commit-box {
margin: 10px 0;
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
padding: 20px 0;
.commit-title {
margin: 0;
}
.commit-description {
margin-top: 15px;
}
}
.file-stats a {
color: $style_color;
}
.file-stats {
.new-file {
a {
color: #090;
}
i {
color: #1BCF00;
}
}
.renamed-file {
i {
color: #FE9300;
}
}
.deleted-file {
a {
color: #B00;
}
i {
color: #EE0000;
}
}
.edit-file{
i{
color: #555;
}
}
}
/*
* Commit message textarea for web editor and
* custom merge request message
*/
.commit-message-container {
background-color: $body-bg;
position: relative;
font-family: $monospace_font;
$left: 12px;
.max-width-marker {
width: 72ch;
color: rgba(0, 0, 0, 0.0);
font-family: inherit;
left: $left;
height: 100%;
border-right: 1px solid mix($input-border, white);
position: absolute;
z-index: 1;
}
> textarea {
background-color: rgba(0, 0, 0, 0.0);
font-family: inherit;
padding-left: $left;
position: relative;
z-index: 2;
}
}
/**
* Commit file
*/
.commit-committer-link,
.commit-author-link {
font-size: 13px;
color: #555;
&:hover {
color: #999;
}
}
/** COMMIT BLOCK **/
.commit-title{
display: block;
}
.commit-title{
margin-bottom: 10px;
}
.commit-author, .commit-committer{
display: block;
color: #999;
font-weight: normal;
font-style: italic;
}
.commit-author strong, .commit-committer strong{
font-weight: bold;
font-style: normal;
}
.file-stats a {
color: $style_color;
}
.file-stats {
.new-file {
a {
color: #090;
}
i {
color: #1BCF00;
}
}
.renamed-file {
i {
color: #FE9300;
}
}
.deleted-file {
a {
color: #B00;
}
i {
color: #EE0000;
}
}
.edit-file{
i{
color: #555;
}
}
}
.label_commit {
@include border-radius(4px);
padding: 2px 4px;
font-size: 13px;
background: #474D57;
color: #fff;
font-family: $monospace_font;
}
.commits-compare-switch{ .commits-compare-switch{
background: image-url("switch_icon.png") no-repeat center center; background: image-url("switch_icon.png") no-repeat center center;
width: 32px; width: 32px;
...@@ -85,60 +11,40 @@ ...@@ -85,60 +11,40 @@
background-color: #EEE; background-color: #EEE;
} }
.commit-description {
background: none;
border: none;
margin: 0;
padding: 0;
margin-top: 10px;
}
.commit-box { .lists-separator {
margin: 10px 0; margin: 10px 0;
border-top: 1px solid #ddd; border-top: 1px dashed #CCC;
border-bottom: 1px solid #ddd; }
padding: 20px 0;
.commit-title { .commits-row {
ul {
margin: 0; margin: 0;
li.commit {
padding: 8px 0;
}
} }
.commit-description { .commits-row-date {
margin-top: 15px; font-size: 15px;
line-height: 20px;
margin-bottom: 5px;
} }
} }
.commits-feed-holder {
float: right;
.commit-stat-summary { .btn {
color: #666; padding: 4px 12px;
font-size: 14px;
font-weight: normal;
padding: 10px 0;
}
.commit-info-row {
margin-bottom: 10px;
.avatar {
@extend .avatar-inline;
}
.commit-committer-link,
.commit-author-link {
color: #444;
font-weight: bold;
} }
} }
.lists-separator {
margin: 10px 0;
border-top: 1px dashed #CCC;
}
/**
* COMMIT ROW
*/
li.commit { li.commit {
.commit-row-title { .commit-row-title {
font-size: $list-font-size; font-size: $list-font-size;
line-height: 20px;
margin-bottom: 2px; margin-bottom: 2px;
.notes_count { .notes_count {
...@@ -156,9 +62,9 @@ li.commit { ...@@ -156,9 +62,9 @@ li.commit {
} }
.commit-row-message { .commit-row-message {
color: #333; color: #444;
&:hover { &:hover {
color: #444;
text-decoration: underline; text-decoration: underline;
} }
} }
...@@ -193,13 +99,14 @@ li.commit { ...@@ -193,13 +99,14 @@ li.commit {
.commit-row-info { .commit-row-info {
color: #777; color: #777;
line-height: 24px;
a { a {
color: #777; color: #777;
} }
.committed_ago { .committed_ago {
float: right; display: inline-block;
} }
} }
...@@ -214,34 +121,3 @@ li.commit { ...@@ -214,34 +121,3 @@ li.commit {
} }
} }
} }
.commits-feed-holder {
float: right;
.btn {
padding: 4px 12px;
}
}
.commit-message-container {
background-color: $body-bg;
position: relative;
font-family: $monospace_font;
$left: 12px;
.max-width-marker {
width: 72ch;
color: rgba(0, 0, 0, 0.0);
font-family: inherit;
left: $left;
height: 100%;
border-right: 1px solid mix($input-border, white);
position: absolute;
z-index: 1;
}
> textarea {
background-color: rgba(0, 0, 0, 0.0);
font-family: inherit;
padding-left: $left;
position: relative;
z-index: 2;
}
}
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
.issue-title { .issue-title {
margin-bottom: 5px; margin-bottom: 5px;
font-size: $list-font-size; font-size: $list-font-size;
font-weight: bold;
} }
.issue-info { .issue-info {
......
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
.merge-request-title { .merge-request-title {
margin-bottom: 5px; margin-bottom: 5px;
font-size: $list-font-size; font-size: $list-font-size;
font-weight: bold;
} }
.merge-request-info { .merge-request-info {
......
%li.commit.js-toggle-container %li.commit.js-toggle-container
.commit-row-title .commit-row-title
= link_to commit.short_id, project_commit_path(project, commit), class: "commit_short_id" %strong.str-truncated
 
%span.str-truncated
= link_to_gfm commit.title, project_commit_path(project, commit.id), class: "commit-row-message" = link_to_gfm commit.title, project_commit_path(project, commit.id), class: "commit-row-message"
- if commit.description? - if commit.description?
%a.text-expander.js-toggle-button ... %a.text-expander.js-toggle-button ...
...@@ -26,6 +24,9 @@ ...@@ -26,6 +24,9 @@
= preserve(gfm(escape_once(commit.description))) = preserve(gfm(escape_once(commit.description)))
.commit-row-info .commit-row-info
= commit_author_link(commit, avatar: true, size: 16) = commit_author_link(commit, avatar: true, size: 24)
authored
.committed_ago .committed_ago
#{time_ago_with_tooltip(commit.committed_date)}   #{time_ago_with_tooltip(commit.committed_date)}  
.pull-right
= link_to commit.short_id, project_commit_path(project, commit), class: "commit_short_id"
...@@ -3,12 +3,13 @@ ...@@ -3,12 +3,13 @@
- @commits.group_by { |c| c.committed_date.to_date }.sort.reverse.each do |day, commits| - @commits.group_by { |c| c.committed_date.to_date }.sort.reverse.each do |day, commits|
.row.commits-row .row.commits-row
.col-md-2 .col-md-2.hidden-xs.hidden-sm
%h4 %h5.commits-row-date
%i.fa.fa-calendar %i.fa.fa-calendar
%span= day.stamp("28 Aug, 2010") %span= day.stamp("28 Aug, 2010")
%p= pluralize(commits.count, 'commit') .light
.col-md-10 = pluralize(commits.count, 'commit')
.col-md-10.col-sm-12
%ul.bordered-list %ul.bordered-list
= render commits, project: project = render commits, project: project
%hr.lists-separator %hr.lists-separator
...@@ -6,9 +6,15 @@ ...@@ -6,9 +6,15 @@
.issue-title .issue-title
%span.str-truncated %span.str-truncated
= link_to_gfm issue.title, project_issue_path(issue.project, issue), class: "row_title" = link_to_gfm issue.title, project_issue_path(issue.project, issue), class: "row_title"
- if issue.closed? .pull-right
%small.pull-right - if issue.closed?
CLOSED %span
CLOSED
- if issue.notes.any?
 
%span
%i.fa.fa-comments
= issue.notes.count
.issue-info .issue-info
%span.light= "##{issue.iid}" %span.light= "##{issue.iid}"
...@@ -16,10 +22,6 @@ ...@@ -16,10 +22,6 @@
assigned to #{link_to_member(@project, issue.assignee)} assigned to #{link_to_member(@project, issue.assignee)}
- if issue.votes_count > 0 - if issue.votes_count > 0
= render 'votes/votes_inline', votable: issue = render 'votes/votes_inline', votable: issue
- if issue.notes.any?
%span
%i.fa.fa-comments
= issue.notes.count
- if issue.milestone - if issue.milestone
%span %span
%i.fa.fa-clock-o %i.fa.fa-clock-o
......
%li{ class: mr_css_classes(merge_request) } %li{ class: mr_css_classes(merge_request) }
.merge-request-title .merge-request-title
= link_to_gfm truncate(merge_request.title, length: 80), project_merge_request_path(merge_request.target_project, merge_request), class: "row_title" %span.str-truncated
- if merge_request.merged? = link_to_gfm merge_request.title, project_merge_request_path(merge_request.target_project, merge_request), class: "row_title"
%small.pull-right .pull-right
%i.fa.fa-check - if merge_request.merged?
MERGED %span
- else %i.fa.fa-check
%span.pull-right.hidden-xs MERGED
- if merge_request.for_fork? - elsif merge_request.closed?
%span.light %span
#{merge_request.source_project_namespace}: %i.fa.fa-close
= truncate merge_request.source_branch, length: 25 CLOSED
%i.fa.fa-angle-right.light - else
= merge_request.target_branch %span.hidden-xs.hidden-sm
%span.label-branch<
%i.fa.fa-code-fork
%span= merge_request.target_branch
- if merge_request.notes.any?
&nbsp;
%span
%i.fa.fa-comments
= merge_request.mr_and_commit_notes.count
.merge-request-info .merge-request-info
%span.light= "##{merge_request.iid}" %span.light= "##{merge_request.iid}"
- if merge_request.assignee - if merge_request.assignee
...@@ -21,10 +29,6 @@ ...@@ -21,10 +29,6 @@
Unassigned Unassigned
- if merge_request.votes_count > 0 - if merge_request.votes_count > 0
= render 'votes/votes_inline', votable: merge_request = render 'votes/votes_inline', votable: merge_request
- if merge_request.notes.any?
%span
%i.fa.fa-comments
= merge_request.mr_and_commit_notes.count
- if merge_request.milestone_id? - if merge_request.milestone_id?
%span %span
%i.fa.fa-clock-o %i.fa.fa-clock-o
...@@ -33,6 +37,7 @@ ...@@ -33,6 +37,7 @@
%span.task-status %span.task-status
= merge_request.task_status = merge_request.task_status
.pull-right.hidden-xs .pull-right.hidden-xs
%small updated #{time_ago_with_tooltip(merge_request.updated_at, 'bottom', 'merge_request_updated_ago')} %small updated #{time_ago_with_tooltip(merge_request.updated_at, 'bottom', 'merge_request_updated_ago')}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment