diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-08-03 22:15:08 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-08-03 22:15:08 +0300 |
commit | c4be8de7ad404f30dd6bfa9c17be4b94ecaf92e6 (patch) | |
tree | 71aa3afcc0219975881785638b015af29539a9a4 /app | |
parent | 99c033f2888a96267aa0443ad7a07f1f0e861992 (diff) | |
parent | 729951eb63842a3b06e07e8c15bd5f89c7bb8724 (diff) |
Merge branch '47548-monospace-commit-messages' into 'master'
Resolve "Commit messages are no longer monospace, but still white-space: pre-wrap"
Closes #47548
See merge request gitlab-org/gitlab-ce!20988
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/pages/commits.scss | 34 | ||||
-rw-r--r-- | app/views/projects/commit/_commit_box.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/commits/_commit.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/pipelines/_info.html.haml | 2 |
4 files changed, 23 insertions, 17 deletions
diff --git a/app/assets/stylesheets/pages/commits.scss b/app/assets/stylesheets/pages/commits.scss index 9b51c54a0fc..bce83bf0dd0 100644 --- a/app/assets/stylesheets/pages/commits.scss +++ b/app/assets/stylesheets/pages/commits.scss @@ -1,9 +1,17 @@ -.commit-description { - background: none; +%commit-description-base { + padding: $gl-padding-8 0 $gl-padding-8 $gl-padding-8; + margin-top: $gl-padding-8; border: 0; - padding: 0; + border-radius: unset; + background: none; word-break: normal; - white-space: pre-wrap; + overflow-x: auto; + border-left: 3px solid $white-dark; + color: $gl-text-color-secondary; +} + +.commit-description { + @extend %commit-description-base; } .js-details-expand { @@ -175,11 +183,17 @@ justify-content: space-between; align-items: start; flex-grow: 1; + min-width: 0; + + .project_namespace { + color: $gl-text-color-secondary; + } } .commit-content { padding-right: 10px; white-space: normal; + overflow: hidden; .commit-title { display: flex; @@ -270,17 +284,9 @@ } .commit-row-description { - font-size: 14px; - padding: 0 0 0 $gl-padding-8; - border: 0; + @extend %commit-description-base; display: none; - white-space: pre-wrap; - word-break: normal; - color: $gl-text-color-secondary; - background: none; - font-family: inherit; - border-left: 2px solid $theme-gray-300; - border-radius: unset; + flex: 1; a { color: $gl-text-color; diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 8afbbaf378f..aab5712d197 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -55,7 +55,7 @@ %h3.commit-title = markdown_field(@commit, :title) - if @commit.description.present? - .commit-description< + %pre.commit-description< = preserve(markdown_field(@commit, :description)) .info-well diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index feaf44e8c0a..7951a5ddc9e 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -44,7 +44,7 @@ #{ commit_text.html_safe } - if commit.description? - %pre.commit-row-description.js-toggle-content.prepend-top-8.append-bottom-8 + %pre.commit-row-description.js-toggle-content.append-bottom-8 = preserve(markdown_field(commit, :description)) .commit-actions.flex-row.d-none.d-sm-flex diff --git a/app/views/projects/pipelines/_info.html.haml b/app/views/projects/pipelines/_info.html.haml index 78e3b209686..ccb83148ded 100644 --- a/app/views/projects/pipelines/_info.html.haml +++ b/app/views/projects/pipelines/_info.html.haml @@ -2,7 +2,7 @@ %h3.commit-title = markdown(commit.title, pipeline: :single_line) - if commit.description.present? - .commit-description< + %pre.commit-description< = preserve(markdown(commit.description, pipeline: :single_line)) .info-well |