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

applied invisible style to reactions where the current user itself has not reacted as requested by @psatyal

Jonas Jabari0f17cee64ab9
diff --git a/app/components/work_packages/activities_tab/journals/item_component/reactions.html.erb b/app/components/work_packages/activities_tab/journals/item_component/reactions.html.erb
index 809dda4b4e6..2a6404dbc16 100644
--- a/app/components/work_packages/activities_tab/journals/item_component/reactions.html.erb
+++ b/app/components/work_packages/activities_tab/journals/item_component/reactions.html.erb
@@ -5,6 +5,8 @@
journal.detailed_grouped_emoji_reactions.each do |emoji, data|
reactions_container.with_column(mr: 2) do
render(Primer::Beta::Button.new(
+ scheme: button_scheme(data[:users]),
+ color: :default,
bg: counter_color(data[:users]),
id: "#{journal.id}-#{emoji}",
tag: :a,
diff --git a/app/components/work_packages/activities_tab/journals/item_component/reactions.rb b/app/components/work_packages/activities_tab/journals/item_component/reactions.rb
index 8fd1605a5e1..537c5d7f887 100644
--- a/app/components/work_packages/activities_tab/journals/item_component/reactions.rb
+++ b/app/components/work_packages/activities_tab/journals/item_component/reactions.rb
@@ -53,7 +53,11 @@ module WorkPackages
end
def counter_color(users)
- reacted_by_current_user?(users) ? :accent : :default
+ reacted_by_current_user?(users) ? :accent : nil
+ end
+
+ def button_scheme(users)
+ reacted_by_current_user?(users) ? :default : :invisible
end
def tooltip_text(emoji, users)