summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-08-10 13:30:04 +0000
committerFatih Acet <acetfatih@gmail.com>2016-08-10 13:30:04 +0000
commiteccefa9bfad94426f9bd87f7b5fd18289bd443f1 (patch)
treef1297a941e95147f61f3659603102d3ac1fd4537
parent242c00dc1c37c5c1161771ecd639ba4bd5eea445 (diff)
parent5b5150301725fd192c328ee811facf2c89ffb528 (diff)
downloadgitlab-ce-eccefa9bfad94426f9bd87f7b5fd18289bd443f1.tar.gz
Merge branch 'fix-filter-label-tooltip' into 'master'
Fix filter label tooltip HTML rendering ## What does this MR do? Tooltips on labels used in a filter are now rendered as HTML ## Are there points in the code the reviewer needs to double check? Shouldn't be ## Why was this MR needed? Fix existing bug (See screenshot below for reference) ## What are the relevant issue numbers? Closes #20592 ## Screenshots (if relevant) Before: ![Screen_Shot_2016-08-04_at_10.27.59_AM__2_](/uploads/7ca37d4116f15a2d22ad16fbbe682f1f/Screen_Shot_2016-08-04_at_10.27.59_AM__2_.png) After: ![Screen_Shot_2016-08-04_at_10.24.37_AM__2_](/uploads/7fce6c8a93d293767dacbcd682831f86/Screen_Shot_2016-08-04_at_10.24.37_AM__2_.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5671
-rw-r--r--CHANGELOG1
-rw-r--r--app/assets/stylesheets/pages/labels.scss11
-rw-r--r--app/views/shared/_labels_row.html.haml6
3 files changed, 13 insertions, 5 deletions
diff --git a/CHANGELOG b/CHANGELOG
index f83d357e4c2..2cff1ff2ee1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -13,6 +13,7 @@ v 8.11.0 (unreleased)
- Ignore URLs starting with // in Markdown links !5677 (winniehell)
- Fix CI status icon link underline (ClemMakesApps)
- The Repository class is now instrumented
+ - Fix filter label tooltip HTML rendering (ClemMakesApps)
- Cache the commit author in RequestStore to avoid extra lookups in PostReceive
- Expand commit message width in repo view (ClemMakesApps)
- Cache highlighted diff lines for merge requests
diff --git a/app/assets/stylesheets/pages/labels.scss b/app/assets/stylesheets/pages/labels.scss
index 3b1e38fc07d..606459f82cd 100644
--- a/app/assets/stylesheets/pages/labels.scss
+++ b/app/assets/stylesheets/pages/labels.scss
@@ -182,6 +182,17 @@
.btn {
color: inherit;
}
+
+ a.btn {
+ padding: 0;
+
+ .has-tooltip {
+ top: 0;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ line-height: 1.1;
+ }
+ }
}
.label-options-toggle {
diff --git a/app/views/shared/_labels_row.html.haml b/app/views/shared/_labels_row.html.haml
index dce492352ac..e324d0e5203 100644
--- a/app/views/shared/_labels_row.html.haml
+++ b/app/views/shared/_labels_row.html.haml
@@ -1,9 +1,5 @@
- labels.each do |label|
%span.label-row.btn-group{ role: "group", aria: { label: label.name }, style: "color: #{text_color_for_bg(label.color)}" }
- = link_to label.name, label_filter_path(@project, label, type: controller.controller_name),
- class: "btn btn-transparent has-tooltip",
- style: "background-color: #{label.color};",
- title: escape_once(label.description),
- data: { container: "body" }
+ = link_to_label(label, css_class: 'btn btn-transparent')
%button.btn.btn-transparent.label-remove.js-label-filter-remove{ type: "button", style: "background-color: #{label.color};", data: { label: label.title } }
= icon("times")