Skip to content
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

Filter System Revamp #44

Merged
merged 14 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ <h2>SYCL.tech is a community driven, open source effort to help developers keep
projects, news, events and more. If you have something to share, please do so using the buttons below. If
you would like to help with the site, please get involved!</h2>
<div class="buttons">
<a class="button" href="https://github.com/codeplaysoftware/sycl.tech-content"target="_blank" rel="noopener">
<a class="button" href="https://github.com/codeplaysoftware/sycl.tech-content" target="_blank" rel="noopener">
<span class="material-symbols-outlined">update</span>Contribute Content</a>
<a class="button" href="https://github.com/codeplaysoftware/sycl.tech-website" target="_blank" rel="noopener">
<span class="material-symbols-outlined">update</span>Edit Page</a>
Expand Down
3 changes: 1 addition & 2 deletions src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ nav {

footer {
padding: 0;
font-size: 1rem;
background: linear-gradient(90deg, transparent 50%, #ffeae5 100%);

.top {
Expand All @@ -267,7 +266,7 @@ footer {

h2 {
font-weight: normal;
font-size: 1.2rem;
font-size: 1rem;
opacity: .6;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h1 [innerHTML]="calendarItem.event.title"></h1>
</li>
<li title="End Time">
<div><span class="material-symbols-outlined">stop_circle</span></div>
<div>{{ calendarItem.event.ends.toDateString() | date:'MMM d, y, h:mm a z' }}</div>
<div>{{ calendarItem.event.ends | date:'MMM d, y, h:mm a z' }}</div>
</li>
@if (calendarItem.event.location) {
<li title="Location">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<header>
<div>
<span class="material-symbols-outlined popup-icon">event</span>
<h1>Set Start Date</h1>
<h1>When Were You Last Here?</h1>

@if (noLastVisit()) {
<h2>You've not been here before.</h2>
}

<h2>Please set a start date that we can use to determine what has changed.</h2>
<h2>Please set the date that you were last here so we can show you what has changed.</h2>
</div>
</header>

Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/changed/changed.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class ChangedComponent implements OnInit {
protected platformService: PlatformService,
protected popupService: PopupService
) {
this.title.setTitle('Digest - SYCL.tech');
this.title.setTitle('What Has Changed - SYCL.tech');

// Compute the quick links signal
this.quickLinks = computed(() => {
Expand Down
1 change: 0 additions & 1 deletion src/app/pages/cookies/cookies.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { CommonModule } from '@angular/common';
import { environment } from '../../../environments/environment';
import { Title } from '@angular/platform-browser';
import { SafeStorageService } from '../../shared/services/safe-storage.service';
import { CookieAcceptanceComponent } from './shared/cookie-acceptance-popup/cookie-acceptance.component';
import { RouterLink } from '@angular/router';

@Component({
Expand Down
4 changes: 2 additions & 2 deletions src/app/pages/ecosystem/projects/projects.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<div class="wrapper">
<st-filter-container
collectionName="Project"
[(filterGroups)]="filtersGroups"
(filterGroupsChange)="onFiltersGroupsChanged()"
[(filterGroups)]="filters"
(filterGroupsChange)="onFiltersChanged()"
[state]="state()"
[totalResultCount]="totalItemCount"
[filteredResultCount]="filteredItemCount"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ <h2>{{ project.description }}</h2>
<st-tag
[title]="tag"
[selected]="true"
[allowSelection]="false"></st-tag>
[allowSelection]="false"
(click)="onTagClicked(tag)"></st-tag>
}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ import {
import { MarkdownComponent } from 'ngx-markdown';
import { LoadingState } from '../../../../../../shared/LoadingState';
import { LoadingComponent } from '../../../../../../shared/components/loading/loading.component';
import { RouterLink } from '@angular/router';
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
import { CopyInputComponent } from '../../../../../../shared/components/copy-input/copy-input.component';
import {
ContributorAvatarComponent
} from '../../../../../../shared/components/contributor-avatar/contributor-avatar.component';
import { MultiDateComponent } from '../../../../../../shared/components/multi-date/multi-date.component';
import { FilterManager, UITagGroup } from '../../../../../../shared/components/filter-result-layout/FilterManager';

@Component({
selector: 'st-project-view-popup',
Expand Down Expand Up @@ -70,10 +71,14 @@ export class ProjectViewPopupComponent {
* Constructor.
* @param popupReference
* @param projectService
* @param activatedRoute
* @param router
*/
constructor(
@Inject('POPUP_DATA') protected popupReference: PopupReference,
protected projectService: ProjectService,
protected activatedRoute: ActivatedRoute,
protected router: Router
) {
this.project = popupReference.data['project'];

Expand All @@ -89,4 +94,17 @@ export class ProjectViewPopupComponent {
take(1)
).subscribe()
}

/**
* Called when a user clicks a tag.
*/
protected onTagClicked(tag: string) {
const tagFilter = new UITagGroup('tags');
tagFilter.add(tag, true);

this.router.navigate(['/ecosystem/projects'], {
relativeTo: this.activatedRoute,
queryParams: FilterManager.convertFiltersToParams([tagFilter])
}).then();
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
:host {
--header-color: #fff0ed;
all: initial;
font: inherit;

:host-context(.dark-mode) {
--header-color: #2d2a29;
Expand Down
4 changes: 2 additions & 2 deletions src/app/pages/ecosystem/research/research.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<div class="wrapper">
<st-filter-container
collectionName="Research Paper"
[(filterGroups)]="filtersGroups"
(filterGroupsChange)="onFiltersGroupsChanged()"
[(filterGroups)]="filters"
(filterGroupsChange)="onFiltersChanged()"
[state]="state()"
[totalResultCount]="totalItemCount"
[filteredResultCount]="filteredItemCount"
Expand Down
Loading