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

use spot tooltip for hovering over icons

bsatarnejadb8ac2c693f16
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.html
index 8974a262fd3..05094110586 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
@@ -113,18 +113,30 @@
<img *ngIf="this.cardCoverImageShown(workPackage) && !showAsInlineCard"
[src]="this.bcfSnapshotPath(workPackage)"
class="op-wp-single-card--content-cover-image">
- <div class="op-wp-single-card--content-status">
+ <div class="op-wp-single-card--content-status-baseline">
<wp-status-button *ngIf="showStatusButton"
[workPackage]="workPackage"
[small]="true"
+ class="op-wp-single-card--content-status"
>
- </wp-status-button>
- <span *ngIf="baselineMode!==''"
- class="spot-icon spot-icon_1 spot-icon_flex op-wp-single-card--content-baseline"
- [ngClass]="baselineMode=='added' ? 'spot-icon_flex spot-icon_add op-table-baseline--icon-added' :
- (baselineMode=='removed' ? 'spot-icon_minus1 op-table-baseline--icon-removed' : 'spot-icon_arrow-left-right op-table-baseline--icon-changed')"
- title="{{baselineMode=='added' ? text.baseLineIconAdded : (baselineMode=='removed' ? text.baseLineIconRemoved : text.baseLineIconChanged)}}"
- ></span>
+ </wp-status-button>
+ <spot-tooltip
+ slot="input"
+ class="spot-body-small"
+ [alignment]="tooltipPosition"
+ [disabled]="false"
+ [light]="true">
+ <span
+ slot="trigger"
+ *ngIf="baselineMode!==''"
+ class="spot-icon spot-icon_1 spot-icon_flex op-wp-single-card--content-baseline"
+ [ngClass]="baselineMode==='added' ? 'spot-icon_flex spot-icon_add op-table-baseline--icon-added' :
+ (baselineMode==='removed' ? 'spot-icon_minus1 op-table-baseline--icon-removed' : 'spot-icon_arrow-left-right op-table-baseline--icon-changed')"
+ ></span>
+ <span slot="body" class="spot-body-small op-wp-single-card--content-baseline-tooltip">
+ {{ baselineMode==='added' ? text.baseLineIconAdded : (baselineMode==='removed' ? text.baseLineIconRemoved : text.baseLineIconChanged) }}</span>
+ </spot-tooltip>
+
</div>
<op-principal
*ngIf="workPackage.assignee"
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.sass
index 1a8f4e73761..0c99fc20164 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
@@ -105,16 +105,19 @@
grid-area: id
color: $spot-color-basic-gray-3
font-size: 12px
- &-status
+ &-status-baseline
grid-area: status
margin-right: 5px
max-width: 6.5rem
- overflow: hidden
display: flex
-
+ &-status
+ overflow: hidden
&-baseline
margin-left: $spot-spacing-0_5
+ &-tooltip
+ width: 6.5rem
+
&-cover-image
grid-area: image
max-height: 350px
diff --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.ts
index 828ecfa89f1..dcd864c7004 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
@@ -32,6 +32,7 @@ import { IWorkPackageTimestamp } from 'core-app/features/hal/resources/work-pack
import { ISchemaProxy } from 'core-app/features/hal/schemas/schema-proxy';
import { SchemaCacheService } from 'core-app/core/schemas/schema-cache.service';
import { WorkPackageViewColumnsService } from 'core-app/features/work-packages/routing/wp-view-base/view-services/wp-view-columns.service';
+import SpotDropAlignmentOption from 'core-app/spot/drop-alignment-options';
@Component({
selector: 'wp-single-card',
@@ -96,6 +97,8 @@ export class WorkPackageSingleCardComponent extends UntilDestroyedMixin implemen
public isNewResource = isNewResource;
+ public tooltipPosition = SpotDropAlignmentOption.BottomLeft;
+
private dateTimeFormatYear = new Intl.DateTimeFormat(this.I18n.locale, {
year: 'numeric',
month: 'short',
@@ -143,7 +146,7 @@ export class WorkPackageSingleCardComponent extends UntilDestroyedMixin implemen
this.selected = selected;
this.cdRef.detectChanges();
});
- this.baselineIcon(this.workPackage);
+ this.baselineIcon(this.workPackage);
}
public classIdentifier(wp:WorkPackageResource):string {