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

Add action slot for inputs below it, don't impose padding on it

Oliver Güntherc4b1d29b12be
diff --git a/frontend/src/app/features/invite-user-modal/principal/principal.component.html b/frontend/src/app/features/invite-user-modal/principal/principal.component.html
index 3804bffd5d4..9d17eeb92ae 100644
--- a/frontend/src/app/features/invite-user-modal/principal/principal.component.html
+++ b/frontend/src/app/features/invite-user-modal/principal/principal.component.html
@@ -71,7 +71,7 @@
></op-ium-role-search>
<p
class="spot-form-field--description"
- slot="help-text"
+ slot="action"
[innerHtml]="text.role.description()"
></p>
@@ -98,7 +98,7 @@
<p
class="spot-form-field--description"
- slot="help-text"
+ slot="action"
[innerHtml]="text.message.description()">
</p>
</spot-form-field>
diff --git a/frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.html b/frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.html
index f904891afb9..1ceaaa649e4 100644
--- a/frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.html
+++ b/frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.html
@@ -20,7 +20,7 @@
></op-project-autocompleter>
<div
- slot="help-text"
+ slot="action"
*ngIf="projectControl.errors?.lackingPermission"
>
{{ text.project.lackingPermissionInfo }}
diff --git a/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.html b/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.html
index 89ae05660a3..e1625059ac0 100644
--- a/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.html
+++ b/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.html
@@ -42,9 +42,9 @@
(focusin)="setCurrentActivatedField('start')"
></spot-text-field>
<button
- slot="help-text"
+ slot="action"
type="button"
- class="spot-link"
+ class="spot-link op-datepicker-modal--today-link"
[ngClass]="{ 'op-datepicker-modal--hidden-link': !showTodayLink() }"
(click)="setToday('start')"
[textContent]="text.today">
@@ -68,9 +68,9 @@
(focusin)="setCurrentActivatedField('end')"
></spot-text-field>
<button
- slot="help-text"
+ slot="action"
type="button"
- class="spot-link"
+ class="spot-link op-datepicker-modal--today-link"
[ngClass]="{ 'op-datepicker-modal--hidden-link': !showTodayLink() }"
(click)="setToday('end')"
[textContent]="text.today">
diff --git a/frontend/src/app/spot/components/form-field/form-field.component.html b/frontend/src/app/spot/components/form-field/form-field.component.html
index 19e236e8b4d..32a97e28003 100644
--- a/frontend/src/app/spot/components/form-field/form-field.component.html
+++ b/frontend/src/app/spot/components/form-field/form-field.component.html
@@ -35,8 +35,10 @@
<ng-content select="[slot=errors]"></ng-content>
</div>
- <div class="spot-form-field--help-text">
- <ng-content select="[slot=help-text]"></ng-content>
+ <div
+ class="spot-form-field--action"
+ >
+ <ng-content select="[slot=action]"></ng-content>
</div>
</ng-container>
diff --git a/frontend/src/app/spot/styles/sass/components/form-field.sass b/frontend/src/app/spot/styles/sass/components/form-field.sass
index 39ef892ee2e..0d42cf5b765 100644
--- a/frontend/src/app/spot/styles/sass/components/form-field.sass
+++ b/frontend/src/app/spot/styles/sass/components/form-field.sass
@@ -28,6 +28,9 @@
&--help-text
padding-left: $spot-spacing-0-25
+ &--action
+ @include spot-body-small
+
&--input
margin-bottom: $spot-spacing-0_25
diff --git a/spec/support/components/users/invite_user_modal.rb b/spec/support/components/users/invite_user_modal.rb
index 0647f57f7f7..1b790797701 100644
--- a/spec/support/components/users/invite_user_modal.rb
+++ b/spec/support/components/users/invite_user_modal.rb
@@ -181,7 +181,7 @@ module Components
def expect_help_displayed(message)
within_modal do
expect(page)
- .to have_selector('.spot-form-field--help-text', text: message)
+ .to have_text(message)
end
end
end