Skip to content

Commit 8d5b574

Browse files
authored
Add link to GitHub profile from header card
Users have to manually type the URL with the assignee's GitHub username to check their profiles. This makes it tedious for users to look at an assignee's GitHub profile to track issues and PRs contributed or other stuff. Adding a direct link to the assignee's GitHub profile helps users check an assignee's profile more conveniently.
1 parent 3097053 commit 8d5b574

File tree

6 files changed

+39
-2
lines changed

6 files changed

+39
-2
lines changed

src/app/issues-viewer/card-view/card-view.component.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ div.column-header .mat-card-header {
162162
text-overflow: ellipsis;
163163
}
164164

165+
.assignee-name.clickable:hover {
166+
color: #1a73e8;
167+
cursor: pointer;
168+
}
169+
165170
:host ::ng-deep .pagination-hide-arrow .mat-paginator-navigation-previous {
166171
display: none !important;
167172
}

src/app/issues-viewer/card-view/card-view.component.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@
4242
></div>
4343
<mat-card-title>
4444
<div class="assignee-container">
45-
<div class="assignee-name" [matTooltip]="getAssigneeTooltip(assignee)" matTooltipPosition="above">
45+
<div
46+
class="assignee-name"
47+
(click)="goToGithubProfile(assignee.login)"
48+
[ngClass]="{ clickable: assignee.login !== 'Unassigned' }"
49+
[matTooltip]="getAssigneeTooltip(assignee)"
50+
matTooltipPosition="above"
51+
>
4652
{{ assignee.login }}
4753
</div>
4854
<div class="row-count count-margins" [matTooltip]="getIssueTooltip()" matTooltipPosition="above">

src/app/issues-viewer/card-view/card-view.component.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,4 +149,11 @@ export class CardViewComponent implements OnInit, AfterViewInit, OnDestroy, Filt
149149
getAssigneeTooltip(assignee: any): string {
150150
return assignee.login;
151151
}
152+
153+
goToGithubProfile(username: string): void {
154+
if (username && username !== 'Unassigned') {
155+
const url = `https://github.com/${username}`;
156+
window.open(url, '_blank'); // Opens in new tab
157+
}
158+
}
152159
}

src/app/issues-viewer/hidden-groups/hidden-groups.component.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@
4141
word-break: break-word;
4242
}
4343

44+
.assignee-name {
45+
cursor: pointer;
46+
}
47+
48+
.assignee-name:hover {
49+
color: #1a73e8;
50+
}
51+
4452
.mat-card-avatar {
4553
height: 30px;
4654
width: 30px;

src/app/issues-viewer/hidden-groups/hidden-groups.component.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@
3131
'background-size': '30px'
3232
}"
3333
></div>
34-
<mat-card-title>{{ assignee.login }}</mat-card-title>
34+
<mat-card-title>
35+
<div class="assignee-name" (click)="goToGithubProfile(assignee.login)">
36+
{{ assignee.login }}
37+
</div>
38+
</mat-card-title>
3539
</mar-card-header>
3640
</mat-card>
3741
</ng-template>

src/app/issues-viewer/hidden-groups/hidden-groups.component.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,11 @@ export class HiddenGroupsComponent implements AfterViewInit {
3535
return this.defaultCardTemplate;
3636
}
3737
}
38+
39+
goToGithubProfile(username: string): void {
40+
if (username) {
41+
const url = `https://github.com/${username}`;
42+
window.open(url, '_blank'); // Opens in new tab
43+
}
44+
}
3845
}

0 commit comments

Comments
 (0)