Skip to content

Commit f6283a4

Browse files
committed
feat: move activity modal trigger to info icon
1 parent b773ea7 commit f6283a4

File tree

4 files changed

+37
-8
lines changed

4 files changed

+37
-8
lines changed

src/app/app.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { ProgressSliderComponent } from './component/progress-slider/progress-sl
3131
import { KpiComponent } from './component/kpi/kpi.component';
3232
import { MatDialogModule, MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
3333
import { TeamsGroupsEditorModule } from './component/teams-groups-editor/teams-groups-editor.module';
34+
import { MatTooltipModule } from '@angular/material/tooltip';
3435

3536
@NgModule({
3637
declarations: [
@@ -67,6 +68,7 @@ import { TeamsGroupsEditorModule } from './component/teams-groups-editor/teams-g
6768
FormsModule,
6869
HttpClientModule,
6970
TeamsGroupsEditorModule,
71+
MatTooltipModule,
7072
],
7173
providers: [
7274
LoaderService,

src/app/pages/circular-heatmap/circular-heatmap.component.css

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,27 @@
88
shape-rendering: crispEdges;
99
}
1010

11-
.title-button {
12-
background-color: transparent;
13-
border: none;
14-
text-align: left;
15-
cursor: pointer;
16-
font-weight: 700;
11+
.title-text {
12+
font-weight: 500;
13+
margin-right: 5px;
14+
}
15+
16+
.info-button {
17+
width: 24px;
18+
height: 24px;
19+
line-height: 24px;
20+
opacity: 0.6;
21+
}
22+
.compact-tooltip {
23+
transform: translateY(-20px) !important;
24+
}
25+
26+
.info-icon {
27+
font-size: 18px;
28+
}
29+
30+
.info-button:hover {
31+
opacity: 1;
1732
}
1833

1934
.right-panel {

src/app/pages/circular-heatmap/circular-heatmap.component.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,16 @@ <h2>Nothing to show</h2>
7373
(closed)="onPanelClosed(activity)">
7474
<mat-expansion-panel-header>
7575
<mat-panel-title>
76-
<button class="title-button" (click)="openActivityDetails(activity['uuid'])">
76+
<span class="title-text">
7777
{{ activity['name'] }}
78+
</span>
79+
<button
80+
mat-icon-button
81+
class="info-button"
82+
matTooltip="Open activity description"
83+
matTooltipClass="compact-tooltip"
84+
(click)="openActivityDetails(activity['uuid']); $event.stopPropagation()">
85+
<mat-icon class="info-icon">info</mat-icon>
7886
</button>
7987
</mat-panel-title>
8088
</mat-expansion-panel-header>

src/styles.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,8 @@ h1, h2, h3 {
5858

5959
.usage-dimensions img {
6060
max-width: 40rem;
61-
}
61+
}
62+
63+
.compact-tooltip {
64+
transform: translateY(-10px) !important;
65+
}

0 commit comments

Comments
 (0)