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

[#55523] Add Dialog not mobile friendly: don't center align on mobile (Review feedback)

Judith Rothd18d52dbd791
diff --git a/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_component.html.erb b/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_component.html.erb
index f1b856ed975..fa2afd5cf3f 100644
--- a/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_component.html.erb
+++ b/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_component.html.erb
@@ -27,7 +27,7 @@
) do |form|
concat(render(Primer::Alpha::Dialog::Body.new(
id: dialog_body_id, test_selector: dialog_body_id, aria: { label: title },
- classes: "FormControl-horizontalGroup--sm-vertical FormControl-horizontalGroup--non-mobile-center-aligned",
+ classes: "FormControl-horizontalGroup--sm-vertical FormControl-horizontalGroup--center-aligned",
style: "min-height: 300px"
)) do
render(Projects::CustomFields::CustomFieldMappingForm.new(form, project_custom_field: @project_custom_field))
diff --git a/frontend/src/global_styles/primer/_overrides.sass b/frontend/src/global_styles/primer/_overrides.sass
index 68503e9526a..9c22086bd42 100644
--- a/frontend/src/global_styles/primer/_overrides.sass
+++ b/frontend/src/global_styles/primer/_overrides.sass
@@ -67,14 +67,16 @@ page-header
// For some specific cases like progress form in small screens,
// we need to change the direction of elements to column,
-// therefore elements are placed below each other
-.FormControl-horizontalGroup--sm-vertical
+// therefore elements are placed below each other.
+//
+// body needed for higher specificity compared to .FormControl-horizontalGroup--center-aligned
+body .FormControl-horizontalGroup--sm-vertical
@media screen and (max-width: $breakpoint-sm)
.FormControl-horizontalGroup
flex-direction: column
row-gap: 1rem
+ align-items: normal
-.FormControl-horizontalGroup--non-mobile-center-aligned
+.FormControl-horizontalGroup--center-aligned
.FormControl-horizontalGroup
- @media screen and (min-width: $breakpoint-sm)
- align-items: center
+ align-items: center