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

remove unnecessary styles from wp relation component instead use system attributes

Behrokh Satarnejad0b357b64e941
diff --git a/app/components/work_package_relations_tab/index_component.html.erb b/app/components/work_package_relations_tab/index_component.html.erb
index 69bcdf027fc..4528e2b7d36 100644
--- a/app/components/work_package_relations_tab/index_component.html.erb
+++ b/app/components/work_package_relations_tab/index_component.html.erb
@@ -8,6 +8,7 @@
end
end
+ # Prevent the menu from overflowing on Safari
action_bar.with_column(flex_shrink: 0) do
render(Primer::Alpha::ActionMenu.new(test_selector: NEW_RELATION_ACTION_MENU,
menu_id: NEW_RELATION_ACTION_MENU)) do |menu|
diff --git a/app/components/work_package_relations_tab/relation_component.html.erb b/app/components/work_package_relations_tab/relation_component.html.erb
index 732b2d96c5c..36bfa797469 100644
--- a/app/components/work_package_relations_tab/relation_component.html.erb
+++ b/app/components/work_package_relations_tab/relation_component.html.erb
@@ -1,10 +1,10 @@
<%=
-flex_layout(direction: :column, style: "gap: 0.25rem;") do |flex|
- flex.with_row do
+flex_layout do |flex|
+ flex.with_row(mb: 1) do
render(WorkPackages::InfoLineComponent.new(work_package: related_work_package))
end
- flex.with_row(flex_layout: true, justify_content: :space_between, align_items: :center) do |subject_line_row|
+ flex.with_row(flex_layout: true, justify_content: :space_between, align_items: :center, mb: 1) do |subject_line_row|
subject_line_row.with_column do
render(Primer::Beta::Link.new(href: work_package_path(related_work_package),
color: :default,
@@ -53,7 +53,7 @@ flex_layout(direction: :column, style: "gap: 0.25rem;") do |flex|
end
if should_display_description?
- flex.with_row(flex_layout: true, justify_content: :flex_start) do |description_row|
+ flex.with_row(flex_layout: true, mb: 1) do |description_row|
description_row.with_column do
render(Primer::Beta::Text.new(font_size: :small, color: :muted)) { format_text(relation, :description) }
end
@@ -61,8 +61,8 @@ flex_layout(direction: :column, style: "gap: 0.25rem;") do |flex|
end
if should_display_start_and_end_dates?
- flex.with_row(flex_layout: true, justify_content: :flex_start, align_items: :center, style: "gap: 0.25rem;") do |start_and_end_dates_row|
- start_and_end_dates_row.with_column do
+ flex.with_row(flex_layout: true, align_items: :center, mb: 1) do |start_and_end_dates_row|
+ start_and_end_dates_row.with_column(mr: 1) do
icon = if follows?
:calendar
elsif precedes?