Skip to content

Commit

Permalink
[#58160] apply the correct color to life cycle header icons
Browse files Browse the repository at this point in the history
  • Loading branch information
EinLama committed Dec 9, 2024
1 parent 1cf3295 commit 65f53dd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/models/queries/projects/selects/life_cycle_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,19 @@ def available?
end

def action_menu_header(button)
# Show the proper icon for the definition with the correct color.
icon = life_cycle_step.is_a?(Project::StageDefinition) ? :"git-commit" : :diamond
button.with_leading_visual_icon(icon:)
button.with_leading_visual_icon(icon:, classes: helpers.hl_inline_class("life_cycle_step_definition", life_cycle_step))

# As all other action menu headers, we will show an action icon and the caption:
button.with_trailing_action_icon(icon: :"triangle-down")

caption.to_s
end

private

def helpers
@helpers ||= Object.new.extend(ColorsHelper)
end
end

0 comments on commit 65f53dd

Please sign in to comment.