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

[#46345] Misaligned "and" in notification card in iOS Safari

Eric Schubert3b869f14a7d9
diff --git a/frontend/src/app/features/in-app-notifications/entry/actors-line/in-app-notification-actors-line.component.html b/frontend/src/app/features/in-app-notifications/entry/actors-line/in-app-notification-actors-line.component.html
index 6649d9d5ec2..16ebc61cac3 100644
--- a/frontend/src/app/features/in-app-notifications/entry/actors-line/in-app-notification-actors-line.component.html
+++ b/frontend/src/app/features/in-app-notifications/entry/actors-line/in-app-notification-actors-line.component.html
@@ -4,10 +4,8 @@
[textContent]="relativeTime$ | async"
></div>
<div class="op-ian-actors--container">
- <ng-container *ngFor="let actor of actors | slice:0:3; let last = last">
- <span *ngIf="last && actors.length > 1 && actors.length < 4">
- {{ text.and }}
- </span>
+ <ng-container *ngFor="let actor of actors | slice:0:3; let idx = index; let last = last">
+ <span *ngIf="last && actors.length > 1 && actors.length < 4" textContent=" {{ text.and }} "></span>
<op-principal
class="op-ian-item--actors"
[principal]="actor"
@@ -15,7 +13,7 @@
[hideAvatar]="true"
[link]="!deviceService.isMobile"
></op-principal>
- <span *ngIf="!last && actors.length > 2" [textContent]="', '"></span>
+ <span *ngIf="(idx === 0 && actors.length > 2) || (idx === 1 && actors.length > 3)" [textContent]="', '"></span>
</ng-container>
<span *ngIf="actors.length > 3"> {{ text_for_additional_authors(actors.length - 3) }}</span>
</div>
diff --git a/frontend/src/app/features/in-app-notifications/entry/actors-line/in-app-notification-actors-line.component.sass b/frontend/src/app/features/in-app-notifications/entry/actors-line/in-app-notification-actors-line.component.sass
index 2f00bf413e1..d430c3f201d 100644
--- a/frontend/src/app/features/in-app-notifications/entry/actors-line/in-app-notification-actors-line.component.sass
+++ b/frontend/src/app/features/in-app-notifications/entry/actors-line/in-app-notification-actors-line.component.sass
@@ -7,13 +7,13 @@
align-items: center
color: var(--gray-dark)
- &--line
- vertical-align: baseline
-
&--date
@include text-shortener
max-width: 100%
- line-height: 16px
+ line-height: 1rem
&--container
@include text-shortener
+ display: flex
+ white-space: pre-wrap
+ line-height: 1rem