summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Friend <nfriend@gitlab.com>2019-01-08 09:10:48 -0400
committerNathan Friend <nfriend@gitlab.com>2019-01-18 11:11:54 -0400
commit51359a1fb8976292b4735715e5cb4cbf664ab34b (patch)
treefbbd3ff7145c1b0e65dc62a82150040542ecd08c
parent5e01cf72249725cb6e0c8aa3d28325d9b4942566 (diff)
downloadgitlab-ce-53714-inconsistent-text-color-for-labels.tar.gz
Fix inconsistent label foreground color53714-inconsistent-text-color-for-labels
In different parts of the application, the same label was being rendered with a different foreground color. This was due to the "textColor" JSON property not being generated by the backend. This commit adds this property to JSON representation of labels.
-rw-r--r--app/models/label.rb1
-rw-r--r--changelogs/unreleased/53714-inconsistent-text-color-for-labels.yml5
2 files changed, 6 insertions, 0 deletions
diff --git a/app/models/label.rb b/app/models/label.rb
index 5d2d1afd1d9..1c3db3eb35d 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -214,6 +214,7 @@ class Label < ActiveRecord::Base
super(options).tap do |json|
json[:type] = self.try(:type)
json[:priority] = priority(options[:project]) if options.key?(:project)
+ json[:textColor] = text_color
end
end
diff --git a/changelogs/unreleased/53714-inconsistent-text-color-for-labels.yml b/changelogs/unreleased/53714-inconsistent-text-color-for-labels.yml
new file mode 100644
index 00000000000..d804e2df2cd
--- /dev/null
+++ b/changelogs/unreleased/53714-inconsistent-text-color-for-labels.yml
@@ -0,0 +1,5 @@
+---
+title: Fix foreground color for labels to ensure consistency of label appearance
+merge_request: 23873
+author: Nathan Friend
+type: fixed