Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Add icon class name for star color

Oliver Güntherf13fa9563f5c
diff --git a/app/components/projects/row_component.rb b/app/components/projects/row_component.rb
index 641dbba5773..ee236f8ad7b 100644
--- a/app/components/projects/row_component.rb
+++ b/app/components/projects/row_component.rb
@@ -46,7 +46,7 @@ module Projects
def favored
if favored_projects.include?(project.id)
- render(Primer::Beta::Octicon.new(icon: "star-fill", color: :attention, "aria-label": I18n.t(:label_favoured)))
+ render(Primer::Beta::Octicon.new(icon: "star-fill", classes: "op-primer--star-icon", "aria-label": I18n.t(:label_favoured)))
end
end
diff --git a/frontend/src/app/shared/components/grids/widgets/project-favorites/widget-project-favorites.component.html b/frontend/src/app/shared/components/grids/widgets/project-favorites/widget-project-favorites.component.html
index c753a165f05..de2808e5ef5 100644
--- a/frontend/src/app/shared/components/grids/widgets/project-favorites/widget-project-favorites.component.html
+++ b/frontend/src/app/shared/components/grids/widgets/project-favorites/widget-project-favorites.component.html
@@ -17,7 +17,7 @@
<li *ngFor="let project of projects">
<svg
star-fill-icon
- class="button--icon upsale-colored"
+ class="op-primer--star-icon"
size="small"
></svg>
<a
diff --git a/frontend/src/global_styles/openproject.sass b/frontend/src/global_styles/openproject.sass
index e2bcd889692..6048a0657f7 100644
--- a/frontend/src/global_styles/openproject.sass
+++ b/frontend/src/global_styles/openproject.sass
@@ -6,6 +6,7 @@
@import "vendor/_index.sass"
@import "layout/_index.sass"
@import "content/_index.sass"
+@import "primer/_index.sass"
@import "./common/openproject-common.module"
@import "../app/shared/directives/search-highlight.directive"
diff --git a/frontend/src/global_styles/openproject/_index.sass b/frontend/src/global_styles/openproject/_index.sass
index 6647b5351e4..857b3e217af 100644
--- a/frontend/src/global_styles/openproject/_index.sass
+++ b/frontend/src/global_styles/openproject/_index.sass
@@ -13,4 +13,3 @@
@import working-days-admin-settings
@import ndc-dynamic
-@import primer-adjustments
diff --git a/frontend/src/global_styles/primer/_icons.sass b/frontend/src/global_styles/primer/_icons.sass
new file mode 100644
index 00000000000..62288b6bbab
--- /dev/null
+++ b/frontend/src/global_styles/primer/_icons.sass
@@ -0,0 +1,32 @@
+//-- copyright
+// OpenProject is an open source project management software.
+// Copyright (C) 2012-2024 the OpenProject GmbH
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License version 3.
+//
+// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+// Copyright (C) 2006-2013 Jean-Philippe Lang
+// Copyright (C) 2010-2013 the ChiliProject Team
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// See COPYRIGHT and LICENSE files for more details.
+//++
+
+// Adjustments for icons
+
+.op-primer--star-icon
+ color: var(--color-scale-yellow-2)
diff --git a/frontend/src/global_styles/primer/_index.sass b/frontend/src/global_styles/primer/_index.sass
new file mode 100644
index 00000000000..cd140c4f036
--- /dev/null
+++ b/frontend/src/global_styles/primer/_index.sass
@@ -0,0 +1,2 @@
+@import icons
+@import overrides
diff --git a/frontend/src/global_styles/openproject/_primer-adjustments.sass b/frontend/src/global_styles/primer/_overrides.sass
similarity index 100%
rename from frontend/src/global_styles/openproject/_primer-adjustments.sass
rename to frontend/src/global_styles/primer/_overrides.sass
diff --git a/modules/overviews/app/views/overviews/overviews/show.html.erb b/modules/overviews/app/views/overviews/overviews/show.html.erb
index d63c1516f0b..2c20be8c5d3 100644
--- a/modules/overviews/app/views/overviews/overviews/show.html.erb
+++ b/modules/overviews/app/views/overviews/overviews/show.html.erb
@@ -23,8 +23,8 @@
Primer::Beta::IconButton.new(
icon: favored ? "star-fill" : "star",
size: :medium,
- color: favored ? :attention : :default,
type: :submit,
+ classes: "op-primer--star-icon",
aria: { label: favored ? I18n.t(:button_unfavorite) : I18n.t(:button_favorite) },
test_selector: 'project-favorite-button'
)