-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix part of #19570: Adding time range filter #19979
Conversation
Hi @masterboy376 please assign the required reviewer(s) for this PR. Thanks! |
Hi @masterboy376, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 4 days, it will be automatically closed so that others can take up the issue. |
Unassigning @masterboy376 since a re-review was requested. @masterboy376, please make sure you have addressed all review comments. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better, thanks
<b *ngIf="isSubmitterTab()" class="filter-label">Filter by Last Contributed after:</b> | ||
<b *ngIf="isReviewerTab()" class="filter-label">Filter by Last Reviewed after:</b> | ||
<mat-form-field> | ||
<input matInput class="e2e-test-last-date-picker-input" [matDatepicker]="lastDatepicker" (dateChange)="changeLastDate($event.value)" [(ngModel)]="lastDateToFilterUsersActivity" [max]="today"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lastDatepicker -> lastDatePicker. Otherwise it seems like a last datepicker, not last date picker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -422,19 +414,51 @@ describe('Contributor dashboard Admin page', () => { | |||
expect(component.selectedLanguage.id).toBe(nonDefaultLanguage.id); | |||
})); | |||
|
|||
it('should select last activity from dropdown', fakeAsync(() => { | |||
it( | |||
'should initially filters users by whether their last activity occurred ' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should...filter, not should...filters. Also please check other test names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
}) | ||
); | ||
|
||
it("should changes filter by users' last activity when end date changes", fakeAsync(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and previous tests could be merged, no need to make them that small
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
this.activeTab === this.TAB_NAME_QUESTION_REVIEWER || | ||
this.activeTab === this.TAB_NAME_QUESTION_REVIEWER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, Thanks for highlighting. Fixed it.
@@ -240,23 +270,46 @@ export class ContributorAdminDashboardPageComponent implements OnInit { | |||
this.languageDropdownShown = !this.languageDropdownShown; | |||
} | |||
|
|||
toggleActivityDropdown(): void { | |||
this.activityDropdownShown = !this.activityDropdownShown; | |||
getDateThatIsDaysBeforeToday(numberOfDaysBeforeToday: number): Date { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming here could be improved a bit. Maybe getDateNDaysAgo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
); | ||
} | ||
|
||
getNumberOfDaysForDateBeforeToday(date: Date): number { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getDaysSince?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Unassigning @nikitaevg since the review is done. |
Hi @masterboy376, it looks like some changes were requested on this pull request by @nikitaevg. PTAL. Thanks! |
@nikitaevg, addressed all the latest comments. PTAL. |
Unassigning @masterboy376 since a re-review was requested. @masterboy376, please make sure you have addressed all review comments. Thanks! |
Unassigning @nikitaevg since they have already approved the PR. |
@vojtechjelinek, PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Hi @masterboy376, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to ask someone to merge your PR once the CI checks pass and you're happy with it. Thanks! |
Overview
Essential Checklist
Proof that changes are correct
screen-recorder-thu-may-16-2024-09-09-36.webm
Proof of changes on desktop with slow/throttled network
screen-recorder-thu-may-16-2024-09-11-32.webm
Proof of changes on mobile phone
Proof of changes in Arabic language
PR Pointers