From 6d2d7685f61c4ca4170b09835753e98d6583353e Mon Sep 17 00:00:00 2001 From: Nguyen <87511888+nknguyenhc@users.noreply.github.com> Date: Sat, 30 Mar 2024 23:34:55 +0800 Subject: [PATCH 01/10] Resolve conflicts for 1.2.0 (#329) Co-authored-by: Gabriel Goh <77230723+gycgabriel@users.noreply.github.com> Co-authored-by: Arif Khalid <88131400+Arif-Khalid@users.noreply.github.com> Co-authored-by: NereusWB922 <107099783+NereusWB922@users.noreply.github.com> Co-authored-by: AdityaMisra <114080910+MadLamprey@users.noreply.github.com> Co-authored-by: Misra Aditya Co-authored-by: Vignesh Sankar Iyer <68676914+vigneshsankariyer1234567890@users.noreply.github.com> From 44fd3ca4c69dfd50ee8d825c5c318255530b3963 Mon Sep 17 00:00:00 2001 From: Arif Khalid <88131400+Arif-Khalid@users.noreply.github.com> Date: Mon, 1 Apr 2024 12:14:43 +0800 Subject: [PATCH 02/10] Fix default preset view (#334) The default view is custom instead of currently active. The default view should show the most relevant information to users. This should be the currently active preset view. Let's change the default view to be currently active. --- src/app/core/services/filters.service.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/core/services/filters.service.ts b/src/app/core/services/filters.service.ts index 10c48680..1a7541c3 100644 --- a/src/app/core/services/filters.service.ts +++ b/src/app/core/services/filters.service.ts @@ -107,6 +107,12 @@ export class FiltersService { return; } + // No preset view and no other filters in params, use default view + if (!presetView && Object.keys(nextFilter).every((filterName) => queryParams.get(filterName) === null)) { + this.updatePresetView('currentlyActive'); + return; + } + for (const filterName of Object.keys(nextFilter)) { const stringifiedFilterData = queryParams.get(filterName); if (!stringifiedFilterData) { From b603307a9e30e8bb74773c354fc41e1c36983df9 Mon Sep 17 00:00:00 2001 From: NereusWB922 <107099783+NereusWB922@users.noreply.github.com> Date: Mon, 1 Apr 2024 13:05:42 +0800 Subject: [PATCH 03/10] Show PRs without milestone in "Currently Active" PRs without milestone requires urgent action from the user. Let's show it in the "Currently Active" preset view. --- src/app/core/services/filters.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/core/services/filters.service.ts b/src/app/core/services/filters.service.ts index 1a7541c3..1df13874 100644 --- a/src/app/core/services/filters.service.ts +++ b/src/app/core/services/filters.service.ts @@ -233,14 +233,14 @@ export class FiltersService { getMilestonesForCurrentlyActive(): Milestone[] { const earliestOpenMilestone = this.milestoneService.getEarliestOpenMilestone(); if (earliestOpenMilestone) { - return [earliestOpenMilestone]; + return [earliestOpenMilestone, Milestone.PRWithoutMilestone]; } const latestClosedMilestone = this.milestoneService.getLatestClosedMilestone(); if (latestClosedMilestone) { - return [latestClosedMilestone]; + return [latestClosedMilestone, Milestone.PRWithoutMilestone]; } - return this.milestoneService.milestones; + return [...this.milestoneService.milestones, Milestone.PRWithoutMilestone]; } } From e7fb0f992c82b05cd5418a1e747351b4a8af254a Mon Sep 17 00:00:00 2001 From: Nguyen <87511888+nknguyenhc@users.noreply.github.com> Date: Mon, 1 Apr 2024 13:26:24 +0800 Subject: [PATCH 04/10] Fix preset view selection appearance (#338) For the preset view selection, brackets are removed and left margin is added to increase visibility. --- src/app/shared/layout/header.component.html | 28 ++++++++++----------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/app/shared/layout/header.component.html b/src/app/shared/layout/header.component.html index a914c022..5c58c5d4 100644 --- a/src/app/shared/layout/header.component.html +++ b/src/app/shared/layout/header.component.html @@ -11,8 +11,8 @@ WATcher v{{ this.getVersion() }} - - ({{ this.presetViews[this.filtersService.presetView$.value] }}) + + {{ this.presetViews[this.filtersService.presetView$.value] }} @@ -37,19 +37,17 @@
- +
+ +
From d92079ba532ffc56283da245efe295f5edb4f203 Mon Sep 17 00:00:00 2001 From: AdityaMisra <114080910+MadLamprey@users.noreply.github.com> Date: Wed, 3 Apr 2024 10:37:33 +0800 Subject: [PATCH 05/10] Add icon for PRs without milestones (#337) Co-authored-by: Misra Aditya --- src/app/issues-viewer/card-view/card-view.component.html | 2 +- .../issue-pr-card-milestone.component.html | 6 +++--- .../issue-pr-card-milestone.component.ts | 1 + src/app/shared/issue-pr-card/issue-pr-card.component.html | 5 ++++- src/app/shared/issue-pr-card/issue-pr-card.component.ts | 8 +++++++- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/app/issues-viewer/card-view/card-view.component.html b/src/app/issues-viewer/card-view/card-view.component.html index 40770db3..37b3e98e 100644 --- a/src/app/issues-viewer/card-view/card-view.component.html +++ b/src/app/issues-viewer/card-view/card-view.component.html @@ -6,7 +6,7 @@
- +
diff --git a/src/app/shared/issue-pr-card/issue-pr-card-milestone/issue-pr-card-milestone.component.html b/src/app/shared/issue-pr-card/issue-pr-card-milestone/issue-pr-card-milestone.component.html index 07ef0ccf..4bde84f8 100644 --- a/src/app/shared/issue-pr-card/issue-pr-card-milestone/issue-pr-card-milestone.component.html +++ b/src/app/shared/issue-pr-card/issue-pr-card-milestone/issue-pr-card-milestone.component.html @@ -1,4 +1,4 @@ -
- - {{ milestone.title }} +
+ + {{ milestone.state ? milestone.title : '???' }}
diff --git a/src/app/shared/issue-pr-card/issue-pr-card-milestone/issue-pr-card-milestone.component.ts b/src/app/shared/issue-pr-card/issue-pr-card-milestone/issue-pr-card-milestone.component.ts index 59cbb8d8..c9772a2d 100644 --- a/src/app/shared/issue-pr-card/issue-pr-card-milestone/issue-pr-card-milestone.component.ts +++ b/src/app/shared/issue-pr-card/issue-pr-card-milestone/issue-pr-card-milestone.component.ts @@ -8,6 +8,7 @@ import { Milestone } from '../../../core/models/milestone.model'; }) export class IssuePrCardMilestoneComponent { @Input() milestone: Milestone; + @Input() repoHasMilestones: boolean; constructor() {} } diff --git a/src/app/shared/issue-pr-card/issue-pr-card.component.html b/src/app/shared/issue-pr-card/issue-pr-card.component.html index 9c9c36d8..5c7c50a9 100644 --- a/src/app/shared/issue-pr-card/issue-pr-card.component.html +++ b/src/app/shared/issue-pr-card/issue-pr-card.component.html @@ -3,7 +3,10 @@ - + diff --git a/src/app/shared/issue-pr-card/issue-pr-card.component.ts b/src/app/shared/issue-pr-card/issue-pr-card.component.ts index 47fbf1a8..4db045ee 100644 --- a/src/app/shared/issue-pr-card/issue-pr-card.component.ts +++ b/src/app/shared/issue-pr-card/issue-pr-card.component.ts @@ -4,6 +4,7 @@ import { Filter } from '../../core/services/filters.service'; import { GithubService } from '../../core/services/github.service'; import { LabelService } from '../../core/services/label.service'; import { LoggingService } from '../../core/services/logging.service'; +import { MilestoneService } from '../../core/services/milestone.service'; @Component({ selector: 'app-issue-pr-card', @@ -14,7 +15,12 @@ export class IssuePrCardComponent { @Input() issue: Issue; @Input() filter?: Filter; - constructor(private logger: LoggingService, private githubService: GithubService, public labelService: LabelService) {} + constructor( + private logger: LoggingService, + private githubService: GithubService, + public labelService: LabelService, + public milestoneService: MilestoneService + ) {} /** Opens issue in new window */ viewIssueInBrowser(event: Event) { From 775e59ce6371251c8ae2cb075f75ccb29ad8b6d2 Mon Sep 17 00:00:00 2001 From: NereusWB922 <107099783+NereusWB922@users.noreply.github.com> Date: Wed, 3 Apr 2024 13:20:57 +0800 Subject: [PATCH 06/10] Implement dropdown menu for repo change (#347) Introduce a dropdown menu for repository selection, simplifying the process of switching between repositories. This enhancement offers users a quicker and more intuitive method to navigate to previously visited repositories. --- src/app/shared/layout/header.component.css | 32 +++++++++++++++++++++ src/app/shared/layout/header.component.html | 30 +++++++++++++++++-- src/app/shared/layout/header.component.ts | 17 +++++++++-- 3 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 src/app/shared/layout/header.component.css diff --git a/src/app/shared/layout/header.component.css b/src/app/shared/layout/header.component.css new file mode 100644 index 00000000..02c8f9c8 --- /dev/null +++ b/src/app/shared/layout/header.component.css @@ -0,0 +1,32 @@ +.repo-menu-footer { + display: flex; + justify-content: space-between; + align-items: center; + position: sticky; + bottom: 0; + z-index: 1; + padding: 10px; +} + +.new-repo-button { + flex-grow: 1; +} + +.keep-filter-button { + margin-left: 2px; +} + +.repo-options { + max-height: 300px; + overflow-y: auto; +} + +.repo-options button { + font-size: 17px; +} + +/* Overwrite the width of the menu */ +::ng-deep .repo-menu { + width: fit-content !important; + min-width: 320px !important; +} diff --git a/src/app/shared/layout/header.component.html b/src/app/shared/layout/header.component.html index 5c58c5d4..e0b8c0cf 100644 --- a/src/app/shared/layout/header.component.html +++ b/src/app/shared/layout/header.component.html @@ -60,14 +60,40 @@ {{ this.currentRepo || 'No Repository Set' }}
+ +
+
+ +
+
+ + +
+