Improved commit message body rendering
This commit is contained in:
parent
f50d8079f0
commit
eb41bb6630
6 changed files with 21 additions and 25 deletions
|
@ -2,7 +2,6 @@
|
||||||
background: none;
|
background: none;
|
||||||
border: 0;
|
border: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-top: 10px;
|
|
||||||
word-break: normal;
|
word-break: normal;
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
@ -21,10 +20,6 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: $gl-text-color;
|
color: $gl-text-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.commit-description {
|
|
||||||
margin-top: 15px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.commit-hash-full {
|
.commit-hash-full {
|
||||||
|
@ -178,7 +173,7 @@
|
||||||
.commit-detail {
|
.commit-detail {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: start;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,20 +263,16 @@
|
||||||
|
|
||||||
.commit-row-description {
|
.commit-row-description {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
padding: 10px 15px;
|
padding: 0 0 0 $gl-padding-8;
|
||||||
margin: 10px 0;
|
border: 0;
|
||||||
background: $gray-light;
|
|
||||||
display: none;
|
display: none;
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
word-break: normal;
|
word-break: normal;
|
||||||
|
color: $gl-text-color-secondary;
|
||||||
pre {
|
background: none;
|
||||||
border: 0;
|
font-family: inherit;
|
||||||
background: inherit;
|
border-left: 2px solid $theme-gray-300;
|
||||||
padding: 0;
|
border-radius: unset;
|
||||||
margin: 0;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: $gl-text-color;
|
color: $gl-text-color;
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
%h3.commit-title
|
%h3.commit-title
|
||||||
= markdown_field(@commit, :title)
|
= markdown_field(@commit, :title)
|
||||||
- if @commit.description.present?
|
- if @commit.description.present?
|
||||||
%pre.commit-description
|
.commit-description<
|
||||||
= preserve(markdown_field(@commit, :description))
|
= preserve(markdown_field(@commit, :description))
|
||||||
|
|
||||||
.info-well
|
.info-well
|
||||||
|
|
|
@ -36,16 +36,16 @@
|
||||||
- if commit.description?
|
- if commit.description?
|
||||||
%button.text-expander.hidden-xs.js-toggle-button{ type: "button" } ...
|
%button.text-expander.hidden-xs.js-toggle-button{ type: "button" } ...
|
||||||
|
|
||||||
- if commit.description?
|
|
||||||
%pre.commit-row-description.js-toggle-content
|
|
||||||
= preserve(markdown_field(commit, :description))
|
|
||||||
|
|
||||||
.commiter
|
.commiter
|
||||||
- commit_author_link = commit_author_link(commit, avatar: false, size: 24)
|
- commit_author_link = commit_author_link(commit, avatar: false, size: 24)
|
||||||
- commit_timeago = time_ago_with_tooltip(commit.authored_date, placement: 'bottom')
|
- commit_timeago = time_ago_with_tooltip(commit.authored_date, placement: 'bottom')
|
||||||
- commit_text = _('%{commit_author_link} authored %{commit_timeago}') % { commit_author_link: commit_author_link, commit_timeago: commit_timeago }
|
- commit_text = _('%{commit_author_link} authored %{commit_timeago}') % { commit_author_link: commit_author_link, commit_timeago: commit_timeago }
|
||||||
#{ commit_text.html_safe }
|
#{ commit_text.html_safe }
|
||||||
|
|
||||||
|
- if commit.description?
|
||||||
|
%pre.commit-row-description.js-toggle-content.prepend-top-8.append-bottom-8
|
||||||
|
= preserve(markdown_field(commit, :description))
|
||||||
|
|
||||||
.commit-actions.flex-row.hidden-xs
|
.commit-actions.flex-row.hidden-xs
|
||||||
- if request.xhr?
|
- if request.xhr?
|
||||||
= render partial: 'projects/commit/signature', object: commit.signature
|
= render partial: 'projects/commit/signature', object: commit.signature
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
= form_for [@project.namespace.becomes(Namespace), @project, @merge_request], url: project_new_merge_request_path(@project), method: :get, html: { class: "merge-request-form form-inline js-requires-input" } do |f|
|
= form_for [@project.namespace.becomes(Namespace), @project, @merge_request], url: project_new_merge_request_path(@project), method: :get, html: { class: "merge-request-form form-inline js-requires-input" } do |f|
|
||||||
.hide.alert.alert-danger.mr-compare-errors
|
.hide.alert.alert-danger.mr-compare-errors
|
||||||
.js-merge-request-new-compare.row{ 'data-source-branch-url': project_new_merge_request_branch_from_path(@source_project), 'data-target-branch-url': project_new_merge_request_branch_to_path(@source_project) }
|
.js-merge-request-new-compare.row{ 'data-source-branch-url': project_new_merge_request_branch_from_path(@source_project), 'data-target-branch-url': project_new_merge_request_branch_to_path(@source_project) }
|
||||||
.col-md-6
|
.col-lg-6
|
||||||
.panel.panel-default.panel-new-merge-request
|
.panel.panel-default.panel-new-merge-request
|
||||||
.panel-heading
|
.panel-heading
|
||||||
Source branch
|
Source branch
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
.text-center= icon('spinner spin', class: 'js-source-loading')
|
.text-center= icon('spinner spin', class: 'js-source-loading')
|
||||||
%ul.list-unstyled.mr_source_commit
|
%ul.list-unstyled.mr_source_commit
|
||||||
|
|
||||||
.col-md-6
|
.col-lg-6
|
||||||
.panel.panel-default.panel-new-merge-request
|
.panel.panel-default.panel-new-merge-request
|
||||||
.panel-heading
|
.panel-heading
|
||||||
Target branch
|
Target branch
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
%h3.commit-title
|
%h3.commit-title
|
||||||
= markdown(@commit.title, pipeline: :single_line)
|
= markdown(@commit.title, pipeline: :single_line)
|
||||||
- if @commit.description.present?
|
- if @commit.description.present?
|
||||||
%pre.commit-description
|
.commit-description<
|
||||||
= preserve(markdown(@commit.description, pipeline: :single_line))
|
= preserve(markdown(@commit.description, pipeline: :single_line))
|
||||||
|
|
||||||
.info-well
|
.info-well
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Improve commit message body rendering and fix responsive compare panels
|
||||||
|
merge_request: 18725
|
||||||
|
author: Constance Okoghenun
|
||||||
|
type: changed
|
Loading…
Reference in a new issue