summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-01-20 19:55:21 +0000
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-01-20 19:55:21 +0000
commita91ff32b7699039c94ec095ddd658a9edcf38cd4 (patch)
treef9d3961dc81c5e2e4d381c627121fa19779cfbdc
parentff75bd0409f79c8b75cf49a219cfe3257526042d (diff)
parent1446a03e79e7ecdf09e73854062f9ca6349aad9f (diff)
downloadgitlab-ce-a91ff32b7699039c94ec095ddd658a9edcf38cd4.tar.gz
Merge branch '25709-diff-file-overflow' into 'master'
Responsive title in diffs inline, side by side, with and without sidebar Closes #25709 See merge request !8475
-rw-r--r--app/assets/stylesheets/framework/files.scss34
-rw-r--r--app/assets/stylesheets/pages/diff.scss4
-rw-r--r--app/views/projects/diffs/_file.html.haml2
-rw-r--r--app/views/projects/diffs/_file_header.html.haml6
-rw-r--r--changelogs/unreleased/25709-diff-file-overflow.yml4
5 files changed, 46 insertions, 4 deletions
diff --git a/app/assets/stylesheets/framework/files.scss b/app/assets/stylesheets/framework/files.scss
index c51912b4ac4..db1c8da06d0 100644
--- a/app/assets/stylesheets/framework/files.scss
+++ b/app/assets/stylesheets/framework/files.scss
@@ -231,3 +231,37 @@ span.idiff {
}
}
}
+
+
+.file-title-flex-parent {
+ display: flex;
+ align-items: center;
+ background-color: $gray-light;
+ border-bottom: 1px solid $border-color;
+ padding: 10px $gl-padding;
+ margin: 0;
+ border-radius: 3px 3px 0 0;
+
+ > a {
+ flex: 1;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ color: $gl-text-color;
+ }
+
+ small {
+ margin: 0 10px 0 0;
+ }
+
+ .file-actions {
+ white-space: nowrap;
+
+ .btn {
+ padding: 0 10px;
+ font-size: 13px;
+ line-height: 28px;
+ display: inline-block;
+ }
+ }
+}
diff --git a/app/assets/stylesheets/pages/diff.scss b/app/assets/stylesheets/pages/diff.scss
index 96ba7c40634..8b784c2a439 100644
--- a/app/assets/stylesheets/pages/diff.scss
+++ b/app/assets/stylesheets/pages/diff.scss
@@ -37,6 +37,10 @@
.file-title {
cursor: pointer;
+ a:hover {
+ text-decoration: none;
+ }
+
&:hover {
background-color: $gray-normal;
}
diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml
index c37a33bbcd5..7ab2eb1bce9 100644
--- a/app/views/projects/diffs/_file.html.haml
+++ b/app/views/projects/diffs/_file.html.haml
@@ -1,5 +1,5 @@
.diff-file.file-holder{ id: file_hash, data: diff_file_html_data(project, diff_file.file_path, diff_commit.id) }
- .file-title
+ .file-title-flex-parent
= render "projects/diffs/file_header", diff_file: diff_file, blob: blob, diff_commit: diff_commit, project: project, url: "##{file_hash}"
- unless diff_file.submodule?
diff --git a/app/views/projects/diffs/_file_header.html.haml b/app/views/projects/diffs/_file_header.html.haml
index 90c9a0c6c2b..1e5ac4ed38c 100644
--- a/app/views/projects/diffs/_file_header.html.haml
+++ b/app/views/projects/diffs/_file_header.html.haml
@@ -10,13 +10,13 @@
- if diff_file.renamed_file
- old_path, new_path = mark_inline_diffs(diff_file.old_path, diff_file.new_path)
- %strong
+ %strong.file-title-name.has-tooltip{ data: { title: old_path } }
= old_path
&rarr;
- %strong
+ %strong.file-title-name.has-tooltip{ data: { title: new_path } }
= new_path
- else
- %strong
+ %strong.file-title-name.has-tooltip{ data: { title: diff_file.new_path } }
= diff_file.new_path
- if diff_file.deleted_file
deleted
diff --git a/changelogs/unreleased/25709-diff-file-overflow.yml b/changelogs/unreleased/25709-diff-file-overflow.yml
new file mode 100644
index 00000000000..7d1b2b36ab8
--- /dev/null
+++ b/changelogs/unreleased/25709-diff-file-overflow.yml
@@ -0,0 +1,4 @@
+---
+title: Responsive title in diffs inline, side by side, with and without sidebar
+merge_request: 8475
+author: