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

Fix spacing issues on the progress drop-modal which occured because of the mixture of classes of the drop-modal and the "nromal" modal

Henriette Dargead1a64492389
diff --git a/app/components/work_packages/progress/status_based/modal_body_component.html.erb b/app/components/work_packages/progress/status_based/modal_body_component.html.erb
index bdaa051f7b1..8db28d27c5f 100644
--- a/app/components/work_packages/progress/status_based/modal_body_component.html.erb
+++ b/app/components/work_packages/progress/status_based/modal_body_component.html.erb
@@ -18,9 +18,10 @@
<% end %>
<% modal_body.with_row(mt: 3) do |_actions_row| %>
- <%= flex_layout(mt: 3, justify_content: :flex_end) do |action_buttons| %>
+ <%= flex_layout(justify_content: :flex_end) do |action_buttons| %>
<%= action_buttons.with_column do %>
- <%= f.submit t(:button_save), class: "btn btn-primary" %>
+ <%= render(Primer::Beta::Button.new(scheme: :primary,
+ type: :submit)) { t(:button_save) } %>
<% end %>
<% end %>
<% end %>
diff --git a/app/components/work_packages/progress/work_based/modal_body_component.html.erb b/app/components/work_packages/progress/work_based/modal_body_component.html.erb
index a5eb07f619e..89077c2ff67 100644
--- a/app/components/work_packages/progress/work_based/modal_body_component.html.erb
+++ b/app/components/work_packages/progress/work_based/modal_body_component.html.erb
@@ -24,9 +24,10 @@
<% end %>
<% modal_body.with_row(mt: 3) do |_actions_row| %>
- <%= flex_layout(mt: 3, justify_content: :flex_end) do |action_buttons| %>
+ <%= flex_layout(justify_content: :flex_end) do |action_buttons| %>
<%= action_buttons.with_column do %>
- <%= f.submit t(:button_save), class: "btn btn-primary" %>
+ <%= render(Primer::Beta::Button.new(scheme: :primary,
+ type: :submit)) { t(:button_save) } %>
<% end %>
<% end %>
<% end %>
diff --git a/frontend/src/app/shared/components/fields/edit/field-types/progress-popover-edit-field.component.html b/frontend/src/app/shared/components/fields/edit/field-types/progress-popover-edit-field.component.html
index 5d16f3d58b5..0473d04f362 100644
--- a/frontend/src/app/shared/components/fields/edit/field-types/progress-popover-edit-field.component.html
+++ b/frontend/src/app/shared/components/fields/edit/field-types/progress-popover-edit-field.component.html
@@ -16,25 +16,25 @@
<ng-container slot="body">
<div
- class="spot-modal--header"
+ class="spot-drop-modal--header"
>
<div
id="spotModalTitle"
- class="spot-modal--header-title"
+ class="spot-drop-modal--header-title"
[textContent]="this.text.title">
</div>
<button
- class="button button_no-margin -transparent spot-modal--header-close-button"
+ class="button button_no-margin -transparent spot-drop-modal--header-close-button"
[attr.aria-label]="text.button_close"
(click)="closeMe()"
data-test-selector="op-progress-modal--close-icon"
>
- <svg x-icon size="small" class="spot-modal--header-close-button-icon"></svg>
+ <svg x-icon size="small" class="spot-drop-modal--header-close-button-icon"></svg>
</button>
</div>
- <div class="spot-modal--body spot-container">
+ <div class="spot-drop-modal--content">
<turbo-frame
#frameElement
id="work_package_progress_modal"
diff --git a/frontend/src/app/shared/components/fields/edit/field-types/progress-popover-edit-field.component.sass b/frontend/src/app/shared/components/fields/edit/field-types/progress-popover-edit-field.component.sass
index 06757985946..9e9fa3ae164 100644
--- a/frontend/src/app/shared/components/fields/edit/field-types/progress-popover-edit-field.component.sass
+++ b/frontend/src/app/shared/components/fields/edit/field-types/progress-popover-edit-field.component.sass
@@ -1,5 +1,5 @@
@import "../../global_styles/openproject/variables"
@media screen and (min-width: $breakpoint-lg)
- .spot-modal--body
+ .spot-drop-modal--content
width: 500px
diff --git a/frontend/src/app/spot/styles/sass/components/drop-modal.sass b/frontend/src/app/spot/styles/sass/components/drop-modal.sass
index 9731aef33bf..44a3b80e4db 100644
--- a/frontend/src/app/spot/styles/sass/components/drop-modal.sass
+++ b/frontend/src/app/spot/styles/sass/components/drop-modal.sass
@@ -67,6 +67,22 @@
@media #{$spot-mq-drop-modal-in-context}
display: none
+ &--header
+ @extend .spot-modal--header
+ font-size: var(--body-font-size) !important
+
+ &--header-title
+ @extend .spot-modal--header-title
+
+ &--header-close-button
+ @extend .spot-modal--header-close-button
+
+ &--header-close-button-icon
+ @extend .spot-modal--header-close-button-icon
+
+ &--content
+ margin: $spot-spacing-1
+
&--close-button
display: block
position: fixed