Commit c36ab8ac authored by Jacob Schatz's avatar Jacob Schatz

Merge branch 'review-commits-and-commit-scss' into 'master'

Review commits and commit scss

See merge request !8010
parents 034d2e4e ce9357e8
...@@ -182,3 +182,52 @@ span.idiff { ...@@ -182,3 +182,52 @@ span.idiff {
border-bottom-right-radius: 2px; border-bottom-right-radius: 2px;
} }
} }
.file-stats {
ul {
list-style: none;
margin: 0;
padding: 10px 0;
li {
padding: 3px 0;
line-height: 20px;
}
}
.new-file {
a {
color: $gl-text-green;
}
}
.renamed-file {
a {
color: $gl-text-orange;
}
}
.deleted-file {
a {
color: $gl-text-red;
}
}
.edit-file {
a {
color: $gl-text-color;
}
}
a {
text-decoration: none;
.new-file {
color: $notify-new-file;
}
.deleted-file {
color: $notify-deleted-file;
}
}
}
...@@ -234,14 +234,46 @@ ul.content-list { ...@@ -234,14 +234,46 @@ ul.content-list {
} }
} }
.panel > .content-list > li { // Table list
padding: $gl-padding-top $gl-padding; .table-list {
display: table;
width: 100%;
&.commit { .table-list-row {
@media (min-width: $screen-sm-min) { display: table-row;
padding-left: 46px + $gl-padding; }
.table-list-cell {
display: table-cell;
vertical-align: top;
padding: 10px 16px;
border-bottom: 1px solid $gray-darker;
&.avatar-cell {
width: 36px;
padding-right: 0;
img {
margin-right: 0;
}
} }
} }
&.table-wide {
.table-list-cell {
&:last-of-type {
padding-right: 0;
}
&:first-of-type {
padding-left: 0;
}
}
}
}
.panel > .content-list > li {
padding: $gl-padding-top $gl-padding;
} }
ul.controls { ul.controls {
......
...@@ -48,3 +48,11 @@ ...@@ -48,3 +48,11 @@
line-height: inherit; line-height: inherit;
} }
} }
.panel-default {
.table-list-row:last-child {
.table-list-cell {
border-bottom: 0;
}
}
}
...@@ -376,7 +376,6 @@ $callout-success-color: #3c763d; ...@@ -376,7 +376,6 @@ $callout-success-color: #3c763d;
/* /*
* Commit Page * Commit Page
*/ */
$commit-committer-color: #999;
$commit-max-width-marker-color: rgba(0, 0, 0, 0.0); $commit-max-width-marker-color: rgba(0, 0, 0, 0.0);
$commit-message-text-area-bg: rgba(0, 0, 0, 0.0); $commit-message-text-area-bg: rgba(0, 0, 0, 0.0);
......
...@@ -18,15 +18,3 @@ p.details { ...@@ -18,15 +18,3 @@ p.details {
pre.commit-message { pre.commit-message {
white-space: pre-wrap; white-space: pre-wrap;
} }
.file-stats > a {
text-decoration: none;
> .new-file {
color: $notify-new-file;
}
> .deleted-file {
color: $notify-deleted-file;
}
}
.divergence-graph {
padding: 12px 12px 0 0;
float: right;
.graph-side {
position: relative;
width: 80px;
height: 22px;
padding: 5px 0 13px;
float: left;
.bar {
position: absolute;
height: 4px;
background-color: $divergence-graph-bar-bg;
}
.bar-behind {
right: 0;
border-radius: 3px 0 0 3px;
}
.bar-ahead {
left: 0;
border-radius: 0 3px 3px 0;
}
.count {
padding-top: 6px;
padding-bottom: 0;
font-size: 12px;
color: $gl-title-color;
display: block;
}
.count-behind {
padding-right: 4px;
text-align: right;
}
.count-ahead {
padding-left: 4px;
text-align: left;
}
}
.graph-separator {
position: relative;
width: 1px;
height: 18px;
margin: 5px 0 0;
float: left;
background-color: $divergence-graph-separator-bg;
}
}
.commit-title {
display: block;
}
.commit-author,
.commit-committer {
display: block;
color: $commit-committer-color;
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;
word-break: normal;
white-space: pre-wrap;
}
.js-details-expand {
&:hover {
text-decoration: none;
}
}
.ci-status-link {
svg {
overflow: visible;
}
}
.commit-box {
border-top: 1px solid $border-color;
padding: $gl-padding 0;
.commit-title {
margin: 0;
font-size: 23px;
color: $gl-gray-dark;
}
.commit-description {
margin-top: 15px;
}
}
.commit-hash-full {
@media (max-width: $screen-sm-max) {
width: 80px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
vertical-align: bottom;
}
}
.file-stats {
ul {
list-style: none;
margin: 0;
padding: 10px 0;
li {
padding: 3px 0;
line-height: 20px;
}
}
.new-file {
a {
color: $gl-text-green;
}
}
.renamed-file {
a {
color: $gl-text-orange;
}
}
.deleted-file {
a {
color: $gl-text-red;
}
}
.edit-file {
a {
color: $gl-text-color;
}
}
}
/*
* 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;
overflow: hidden; // See https://gitlab.com/gitlab-org/gitlab-ce/issues/13987
.max-width-marker {
width: 72ch;
color: $commit-max-width-marker-color;
font-family: inherit;
left: $left;
height: 100%;
border-right: 1px solid mix($input-border, $white-light);
position: absolute;
z-index: 1;
}
> textarea {
background-color: $commit-message-text-area-bg;
font-family: inherit;
padding-left: $left;
position: relative;
z-index: 2;
}
}
.commit-description {
background: none;
border: none;
padding: 0;
margin-top: 10px;
word-break: normal;
white-space: pre-wrap;
}
.js-details-expand {
&:hover {
text-decoration: none;
}
}
.commit-box {
border-top: 1px solid $border-color;
padding: $gl-padding 0;
.commit-title {
margin: 0;
color: $gl-gray-dark;
}
.commit-description {
margin-top: 15px;
}
}
.commit-hash-full {
@media (max-width: $screen-sm-max) {
width: 80px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
vertical-align: bottom;
}
}
/*
* 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;
overflow: hidden; // See https://gitlab.com/gitlab-org/gitlab-ce/issues/13987
.max-width-marker {
width: 72ch;
color: $commit-max-width-marker-color;
font-family: inherit;
left: $left;
height: 100%;
border-right: 1px solid mix($input-border, $white-light);
position: absolute;
z-index: 1;
}
textarea {
background-color: $commit-message-text-area-bg;
font-family: inherit;
padding-left: $left;
position: relative;
z-index: 2;
}
}
.commits-compare-switch { .commits-compare-switch {
@include btn-default;
@include btn-white;
float: left; float: left;
margin-right: 9px; margin-right: 9px;
} }
...@@ -8,7 +77,6 @@ ...@@ -8,7 +77,6 @@
.commit-header { .commit-header {
padding: 5px 10px; padding: 5px 10px;
background-color: $gray-light; background-color: $gray-light;
border-top: 1px solid $gray-darker;
border-bottom: 1px solid $gray-darker; border-bottom: 1px solid $gray-darker;
font-size: 14px; font-size: 14px;
...@@ -18,8 +86,6 @@ ...@@ -18,8 +86,6 @@
} }
.commit-row-title { .commit-row-title {
line-height: 1.35;
.notes_count { .notes_count {
float: right; float: right;
margin-right: 10px; margin-right: 10px;
...@@ -32,7 +98,6 @@ ...@@ -32,7 +98,6 @@
.commit-row-message { .commit-row-message {
color: $gl-dark-link-color; color: $gl-dark-link-color;
} }
} }
.text-expander { .text-expander {
...@@ -54,9 +119,8 @@ ...@@ -54,9 +119,8 @@
.commit-actions { .commit-actions {
@media (min-width: $screen-sm-min) { @media (min-width: $screen-sm-min) {
float: right; width: 300px;
margin-left: $gl-padding; text-align: right;
margin-top: 2px;
font-size: 0; font-size: 0;
} }
...@@ -86,16 +150,6 @@ ...@@ -86,16 +150,6 @@
.commit, .commit,
.generic_commit_status { .generic_commit_status {
padding: 10px 0;
position: relative;
@media (min-width: $screen-sm-min) {
padding-left: 46px;
}
&:not(:last-child) {
border-bottom: 1px solid $gray-darker;
}
a, a,
button { button {
...@@ -103,18 +157,6 @@ ...@@ -103,18 +157,6 @@
vertical-align: baseline; vertical-align: baseline;
} }
.avatar {
margin-left: -46px;
}
.item-title {
display: inline-block;
@media (min-width: $screen-sm-min) {
max-width: 70%;
}
}
.commit-row-description { .commit-row-description {
font-size: 14px; font-size: 14px;
border-left: 1px solid $white-normal; border-left: 1px solid $white-normal;
...@@ -138,19 +180,6 @@ ...@@ -138,19 +180,6 @@
} }
} }
.commit-row-info {
color: $gl-gray;
line-height: 1.35;
a {
color: $gl-gray;
}
.avatar {
margin-right: 8px;
}
}
&.inline-commit { &.inline-commit {
.commit-row-title { .commit-row-title {
font-size: 13px; font-size: 13px;
...@@ -186,59 +215,3 @@ ...@@ -186,59 +215,3 @@
color: $gl-gray; color: $gl-gray;
} }
} }
.divergence-graph {
padding: 12px 12px 0 0;
float: right;
.graph-side {
position: relative;
width: 80px;
height: 22px;
padding: 5px 0 13px;
float: left;
.bar {
position: absolute;
height: 4px;
background-color: $divergence-graph-bar-bg;
}
.bar-behind {
right: 0;
border-radius: 3px 0 0 3px;
}
.bar-ahead {
left: 0;
border-radius: 0 3px 3px 0;
}
.count {
padding-top: 6px;
padding-bottom: 0;
font-size: 12px;
color: $gl-title-color;
display: block;
}
.count-behind {
padding-right: 4px;
text-align: right;
}
.count-ahead {
padding-left: 4px;
text-align: left;
}
}
.graph-separator {
position: relative;
width: 1px;
height: 18px;
margin: 5px 0 0;
float: left;
background-color: $divergence-graph-separator-bg;
}
}
...@@ -310,10 +310,6 @@ ...@@ -310,10 +310,6 @@
left: 0; left: 0;
top: 2px; top: 2px;
} }
.commit-row-info {
line-height: 20px;
}
} }
.btn-clipboard { .btn-clipboard {
......
...@@ -135,3 +135,9 @@ ...@@ -135,3 +135,9 @@
left: 5px; left: 5px;
} }
} }
.ci-status-link {
svg {
overflow: visible;
}
}
...@@ -134,21 +134,18 @@ ...@@ -134,21 +134,18 @@
.blob-commit-info { .blob-commit-info {
list-style: none; list-style: none;
padding: $gl-padding;
background: $gray-light; background: $gray-light;
padding: 6px 0;
border: 1px solid $border-color; border: 1px solid $border-color;
border-bottom: none; border-bottom: none;
margin: 0; margin: 0;
.commit { .table-list-cell {
padding-top: 0; border-bottom: none;
padding-bottom: 0;
.commit-row-title {
.commit-row-message {
font-weight: normal;
}
} }
.commit-actions {
width: 200px;
} }
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
- else - else
= link_to title, '#' = link_to title, '#'
%ul.blob-commit-info.hidden-xs %ul.blob-commit-info.table-list.hidden-xs
- blob_commit = @repository.last_commit_for_path(@commit.id, blob.path) - blob_commit = @repository.last_commit_for_path(@commit.id, blob.path)
= render blob_commit, project: @project, ref: @ref = render blob_commit, project: @project, ref: @ref
......
...@@ -9,13 +9,13 @@ ...@@ -9,13 +9,13 @@
- cache_key.push(commit.status(ref)) if commit.status(ref) - cache_key.push(commit.status(ref)) if commit.status(ref)
= cache(cache_key, expires_in: 1.day) do = cache(cache_key, expires_in: 1.day) do
%li.commit.js-toggle-container{ id: "commit-#{commit.short_id}" } %li.commit.table-list-row.js-toggle-container{ id: "commit-#{commit.short_id}" }
.table-list-cell.avatar-cell.hidden-xs
= author_avatar(commit, size: 36) = author_avatar(commit, size: 36)
.commit-info-block .table-list-cell.commit-content
.commit-row-title = link_to_gfm commit.title, namespace_project_commit_path(project.namespace, project, commit.id), class: "commit-row-message item-title"
%span.item-title
= link_to_gfm commit.title, namespace_project_commit_path(project.namespace, project, commit.id), class: "commit-row-message"
%span.commit-row-message.visible-xs-inline %span.commit-row-message.visible-xs-inline
· ·
= commit.short_id = commit.short_id
...@@ -25,17 +25,17 @@ ...@@ -25,17 +25,17 @@
- if commit.description? - if commit.description?
%a.text-expander.hidden-xs.js-toggle-button ... %a.text-expander.hidden-xs.js-toggle-button ...
.commit-actions.hidden-xs
- if commit.status(ref)
= render_commit_status(commit, ref: ref)
= clipboard_button(clipboard_text: commit.id)
= link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit-short-id btn btn-transparent"
= link_to_browse_code(project, commit)
- if commit.description? - if commit.description?
%pre.commit-row-description.js-toggle-content %pre.commit-row-description.js-toggle-content
= preserve(markdown(commit.description, pipeline: :single_line, author: commit.author)) = preserve(markdown(commit.description, pipeline: :single_line, author: commit.author))
.commiter
= commit_author_link(commit, avatar: false, size: 24) = commit_author_link(commit, avatar: false, size: 24)
committed committed
#{time_ago_with_tooltip(commit.committed_date)} #{time_ago_with_tooltip(commit.committed_date)}
.table-list-cell.commit-actions.hidden-xs
- if commit.status(ref)
= render_commit_status(commit, ref: ref)
= clipboard_button(clipboard_text: commit.id)
= link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit-short-id btn btn-transparent"
= link_to_browse_code(project, commit)
...@@ -11,4 +11,4 @@ ...@@ -11,4 +11,4 @@
%li.warning-row.unstyled %li.warning-row.unstyled
#{number_with_delimiter(hidden)} additional commits have been omitted to prevent performance issues. #{number_with_delimiter(hidden)} additional commits have been omitted to prevent performance issues.
- else - else
%ul.content-list= render commits, project: @project, ref: @ref %ul.content-list.table-list= render commits, project: @project, ref: @ref
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
- commits.chunk { |c| c.committed_date.in_time_zone.to_date }.each do |day, commits| - commits.chunk { |c| c.committed_date.in_time_zone.to_date }.each do |day, commits|
%li.commit-header= "#{day.strftime('%d %b, %Y')} #{pluralize(commits.count, 'commit')}" %li.commit-header= "#{day.strftime('%d %b, %Y')} #{pluralize(commits.count, 'commit')}"
%li.commits-row %li.commits-row
%ul.list-unstyled.commit-list %ul.content-list.commit-list.table-list.table-wide
= render commits, project: project, ref: ref = render commits, project: project, ref: ref
- if hidden > 0 - if hidden > 0
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.clearfix .clearfix
- if params[:to] && params[:from] - if params[:to] && params[:from]
.compare-switch-container .compare-switch-container
= link_to icon('exchange'), {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has-tooltip', title: 'Switch base of comparison'} = link_to icon('exchange'), {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has-tooltip btn btn-white', title: 'Switch base of comparison'}
.form-group.dropdown.compare-form-group.from.js-compare-from-dropdown .form-group.dropdown.compare-form-group.from.js-compare-from-dropdown
.input-group.inline-input-group .input-group.inline-input-group
%span.input-group-addon from %span.input-group-addon from
......
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