diff --git a/app/components/open_project/common/border_box_list_component/header.rb b/app/components/open_project/common/border_box_list_component/header.rb index 79e687995bb..8a6968d64f7 100644 --- a/app/components/open_project/common/border_box_list_component/header.rb +++ b/app/components/open_project/common/border_box_list_component/header.rb @@ -44,6 +44,8 @@ module OpenProject include Primer::AttributesHelper include HasMenu + DEFAULT_ACTION_SCHEME = :default + DEFAULT_COUNT_ARGUMENTS = { scheme: :primary, round: true, @@ -67,8 +69,8 @@ module OpenProject # def with_action_button(**system_arguments, &block) # end renders_many :actions, types: { - button: ->(**system_arguments) do - Primer::Beta::Button.new(**system_arguments) + button: ->(scheme: DEFAULT_ACTION_SCHEME, **system_arguments) do + Primer::Beta::Button.new(scheme:, **system_arguments) end } diff --git a/lookbook/previews/open_project/common/border_box_list_component_preview.rb b/lookbook/previews/open_project/common/border_box_list_component_preview.rb index 500ca99ef49..b8960fc4216 100644 --- a/lookbook/previews/open_project/common/border_box_list_component_preview.rb +++ b/lookbook/previews/open_project/common/border_box_list_component_preview.rb @@ -39,7 +39,7 @@ module OpenProject ) do |list| list.with_header(title: "Things we're building", count: true) do |header| header.with_description { "There's lots to look forward to" } - header.with_action_button(scheme: :invisible) do |button| + header.with_action_button do |button| button.with_leading_visual_icon(icon: :pencil) "Edit" end diff --git a/modules/backlogs/app/components/backlogs/sprint_component.rb b/modules/backlogs/app/components/backlogs/sprint_component.rb index 2f89621b86d..033112f1214 100644 --- a/modules/backlogs/app/components/backlogs/sprint_component.rb +++ b/modules/backlogs/app/components/backlogs/sprint_component.rb @@ -68,7 +68,7 @@ module Backlogs end def start_sprint_button_arguments - base_arguments = { id: dom_target(sprint, :start_button), scheme: :invisible } + base_arguments = { id: dom_target(sprint, :start_button) } if disable_start_sprint_action? base_arguments.merge(tag: :button, inactive: true, aria: { disabled: true }) @@ -84,7 +84,6 @@ module Backlogs def finish_sprint_button_arguments { id: dom_target(sprint, :finish_button), - scheme: :invisible, tag: :a, href: finish_project_backlogs_sprint_path(project, sprint, all_backlogs_params), data: { turbo_method: :post }