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

Revert "remove padding from the inset box"

Behrokh Satarnejad68fbce9fb675
diff --git a/app/components/op_primer/inset_box_component.html.erb b/app/components/op_primer/inset_box_component.html.erb
index ed6bfe9c534..34782cf798c 100644
--- a/app/components/op_primer/inset_box_component.html.erb
+++ b/app/components/op_primer/inset_box_component.html.erb
@@ -28,12 +28,19 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<%=
+ args = system_arguments.dup
+
+ # Only set default padding if no padding keys are given
+ unless args.key?(:p) || args.key?(:pt) || args.key?(:pb) || args.key?(:pl) || args.key?(:pr)
+ args[:p] = 3
+ end
+
render(
Primer::Box.new(
border:,
border_radius: 2,
bg: :inset,
- **system_arguments
+ **args
)
) do
content
diff --git a/app/components/projects/copy_form_component.html.erb b/app/components/projects/copy_form_component.html.erb
index 3374bd4afbe..3a21f331095 100644
--- a/app/components/projects/copy_form_component.html.erb
+++ b/app/components/projects/copy_form_component.html.erb
@@ -32,7 +32,7 @@ See COPYRIGHT and LICENSE files for more details.
settings_primer_form_with(model: target_project, url: copy_project_path(source_project), method: :post) do |f|
flex_layout do |container|
container.with_row(mb: 3) do
- render(OpPrimer::InsetBoxComponent.new(p: 3)) do
+ render(OpPrimer::InsetBoxComponent.new) do
render(Projects::CopyForm.new(f, copy_options:))
end
end
diff --git a/app/components/projects/new_component.html.erb b/app/components/projects/new_component.html.erb
index 6499c8ddb6a..710b661ac0e 100644
--- a/app/components/projects/new_component.html.erb
+++ b/app/components/projects/new_component.html.erb
@@ -40,7 +40,7 @@ See COPYRIGHT and LICENSE files for more details.
flex_layout do |container|
if template
container.with_row(mb: 3) do
- render(OpPrimer::InsetBoxComponent.new(p: 3)) do
+ render(OpPrimer::InsetBoxComponent.new) do
render(
Projects::TemplateForm.new(f, template:, copy_options:)
)
diff --git a/app/components/projects/source_project_select_component.html.erb b/app/components/projects/source_project_select_component.html.erb
index 62c07c07612..282963c84ca 100644
--- a/app/components/projects/source_project_select_component.html.erb
+++ b/app/components/projects/source_project_select_component.html.erb
@@ -34,7 +34,7 @@ See COPYRIGHT and LICENSE files for more details.
method: :get
) do |f|
render(
- OpPrimer::InsetBoxComponent.new(my: 3, p: 3)
+ OpPrimer::InsetBoxComponent.new(my: 3)
) do
source_project_id_value = source_project_id
render_inline_form(f) do |form|
diff --git a/app/components/projects/template_select_component.html.erb b/app/components/projects/template_select_component.html.erb
index ff214cc07f9..c13df020390 100644
--- a/app/components/projects/template_select_component.html.erb
+++ b/app/components/projects/template_select_component.html.erb
@@ -39,7 +39,7 @@ See COPYRIGHT and LICENSE files for more details.
}
) do |f|
render(
- OpPrimer::InsetBoxComponent.new(my: 3, p: 3)
+ OpPrimer::InsetBoxComponent.new(my: 3)
) do
template_id_value = template_id
parent_id_value = parent_id
diff --git a/app/components/shares/project_queries/public_flag_component.html.erb b/app/components/shares/project_queries/public_flag_component.html.erb
index ba97a8c663e..5720675ed31 100644
--- a/app/components/shares/project_queries/public_flag_component.html.erb
+++ b/app/components/shares/project_queries/public_flag_component.html.erb
@@ -1,7 +1,7 @@
<%=
container.with_row do
render(
- OpPrimer::InsetBoxComponent.new(p: 3)
+ OpPrimer::InsetBoxComponent.new
) do
content_tag(:div, class: tooltip_wrapper_classes, data: { tooltip: tooltip_message }) do
render(
diff --git a/modules/meeting/app/components/work_package_meetings_tab/meeting_agenda_item_component.html.erb b/modules/meeting/app/components/work_package_meetings_tab/meeting_agenda_item_component.html.erb
index e60ecdc15d0..9f2c6e5bf5a 100644
--- a/modules/meeting/app/components/work_package_meetings_tab/meeting_agenda_item_component.html.erb
+++ b/modules/meeting/app/components/work_package_meetings_tab/meeting_agenda_item_component.html.erb
@@ -13,7 +13,7 @@
if @meeting_agenda_item.outcomes.exists?
outcome = @meeting_agenda_item.outcomes.information_kind.last
flex.with_row do
- render(OpPrimer::InsetBoxComponent.new(border: false, mt: 2, p: 3, classes: "outcome-container")) do
+ render(OpPrimer::InsetBoxComponent.new(border: false, mt: 2, classes: "outcome-container")) do
concat render(Primer::Beta::Heading.new(tag: :h5)) { t(:label_agenda_outcome) }
concat render(Primer::Box.new(classes: "op-uc-container", pb: 0, mt: 1)) { format_text(outcome, :notes) }
end