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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Make the orientation of the disabled tooltips variable so that it does not overlap the left side when the element is very close to the left edge Further there are some minor fixes with regards to the styling
Henriette Darge83741650b325
diff --git a/frontend/src/app/features/team-planner/team-planner/add-work-packages/add-existing-pane.component.ts b/frontend/src/app/features/team-planner/team-planner/add-work-packages/add-existing-pane.component.tsindex 29476dbec1d..7769cbd390e 100644--- a/frontend/src/app/features/team-planner/team-planner/add-work-packages/add-existing-pane.component.ts+++ b/frontend/src/app/features/team-planner/team-planner/add-work-packages/add-existing-pane.component.ts@@ -188,8 +188,11 @@ export class AddExistingPaneComponent extends UntilDestroyedMixin implements OnIreturn this.searchString$.value !== '';}- showDisabledText(wp:WorkPackageResource):string {- return this.calendarDrag.workPackageDisabledExplanation(wp);+ showDisabledText(wp:WorkPackageResource):{ text:string, orientation:'left'|'right' } {+ return {+ text: this.calendarDrag.workPackageDisabledExplanation(wp),+ orientation: 'left',+ };}openStateLink(event:{ workPackageId:string; requestedState:string }):void {diff --git a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.tsindex 3570f93aa13..294a12148a2 100644--- a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts+++ b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts@@ -518,8 +518,13 @@ export class TeamPlannerComponent extends UntilDestroyedMixin implements OnInit,return !!workPackage.date;}- showDisabledText(workPackage:WorkPackageResource):string {- return this.calendarDrag.workPackageDisabledExplanation(workPackage);+ showDisabledText(workPackage:WorkPackageResource):{ text:string, orientation:'left'|'right' } {+ const dueDate = new Date(workPackage.dueDate).setHours(0, 0, 0, 0);+ const firstCalendarDay = this.ucCalendar.getApi().view.currentStart.setHours(0, 0, 0, 0);+ return {+ text: this.calendarDrag.workPackageDisabledExplanation(workPackage),+ orientation: dueDate === firstCalendarDay ? 'right' : 'left',+ };}isStatusClosed(workPackage:WorkPackageResource):boolean {diff --git a/frontend/src/app/features/work-packages/components/wp-card-view/wp-single-card/wp-single-card.component.html b/frontend/src/app/features/work-packages/components/wp-card-view/wp-single-card/wp-single-card.component.htmlindex 70d204cb8f8..e1c1e9c2941 100644--- a/frontend/src/app/features/work-packages/components/wp-card-view/wp-single-card/wp-single-card.component.html+++ b/frontend/src/app/features/work-packages/components/wp-card-view/wp-single-card/wp-single-card.component.html@@ -34,14 +34,15 @@(click)="onRemoved(workPackage)"><op-icon icon-classes="icon-context icon-close"></op-icon></button>- </div>- <op-icon- *ngIf="disabledInfo.length > 0"- [attr.data-tooltip]="disabledInfo"- class="tooltip--left -multiline op-wp-single-card--card-action"- icon-classes="icon-context icon-not-supported">- </op-icon>+ <op-icon+ *ngIf="disabledInfo && disabledInfo.text.length > 0"+ [attr.data-tooltip]="disabledInfo.text"+ class="-multiline op-wp-single-card--card-action op-wp-single-card--card-action_closed"+ [ngClass]="'tooltip--' + disabledInfo.orientation"+ icon-classes="icon-context icon-not-supported">+ </op-icon>+ </div></div><edit-form [resource]="workPackage"diff --git a/frontend/src/app/features/work-packages/components/wp-card-view/wp-single-card/wp-single-card.component.sass b/frontend/src/app/features/work-packages/components/wp-card-view/wp-single-card/wp-single-card.component.sassindex 13d5e698dba..7e6422bb11b 100644--- a/frontend/src/app/features/work-packages/components/wp-card-view/wp-single-card/wp-single-card.component.sass+++ b/frontend/src/app/features/work-packages/components/wp-card-view/wp-single-card/wp-single-card.component.sass@@ -31,9 +31,6 @@.op-wp-single-card--inline-buttonsbackground-image: linear-gradient(to left, rgba($spot-color-main-light,1), rgba($spot-color-main-light,0))- &_disabled- opacity: 0.6-&_closed:not(&_selected)background-color: $spot-color-basic-gray-6.op-icon--wrapper@@ -146,14 +143,20 @@&--card-actionz-index: 2+ &_closed+ color: $spot-color-basic-gray-2+.op-wp-single-card_checked &background-color: $spot-color-main-light-+&--inline-buttonsopacity: 0padding-left: 40pxpadding-right: 4px+ .op-wp-single-card_selected &+ background: $spot-color-main-light+&.-showopacity: 1diff --git a/frontend/src/app/features/work-packages/components/wp-card-view/wp-single-card/wp-single-card.component.ts b/frontend/src/app/features/work-packages/components/wp-card-view/wp-single-card/wp-single-card.component.tsindex 3c0914a96f6..9cb53b384a4 100644--- a/frontend/src/app/features/work-packages/components/wp-card-view/wp-single-card/wp-single-card.component.ts+++ b/frontend/src/app/features/work-packages/components/wp-card-view/wp-single-card/wp-single-card.component.ts@@ -54,7 +54,7 @@ export class WorkPackageSingleCardComponent extends UntilDestroyedMixin implemen@Input() public shrinkOnMobile = false;- @Input() public disabledInfo = '';+ @Input() public disabledInfo?:{ text:string, orientation:'left'|'right' };@Input() public showAsInlineCard = false;@@ -143,7 +143,6 @@ export class WorkPackageSingleCardComponent extends UntilDestroyedMixin implemen[`${base}_draggable`]: this.draggable,[`${base}_new`]: isNewResource(this.workPackage),[`${base}_shrink`]: this.shrinkOnMobile,- [`${base}_disabled`]: this.disabledInfo.length > 0,[`${base}_inline`]: this.showAsInlineCard,[`${base}_closed`]: this.isClosed,// eslint-disable-next-line @typescript-eslint/restrict-template-expressions