From c471256c68fc5416aaeb153fd068962c8dc87718 Mon Sep 17 00:00:00 2001 From: el-rabies Date: Thu, 23 Apr 2026 20:29:55 -0400 Subject: [PATCH 1/4] added new site search tab option --- .../src/app/search/search.component.html | 1445 ++++++++++------- .../src/app/search/search.component.scss | 1 + .../src/app/search/search.component.ts | 4 +- .../site-search/site-search.component.html | 152 +- .../site-search/site-search.component.scss | 5 +- 5 files changed, 913 insertions(+), 694 deletions(-) diff --git a/projects/website-angular/src/app/search/search.component.html b/projects/website-angular/src/app/search/search.component.html index c89f26f..4dae386 100644 --- a/projects/website-angular/src/app/search/search.component.html +++ b/projects/website-angular/src/app/search/search.component.html @@ -1,666 +1,885 @@
- @if (query && searchSubmitted) { - -
-
- - - -
+ @if (!query || !searchSubmitted) { +
+

Search Reactome

+

+ Enter a search term to find pathways, reactions, proteins, and more. +

+
+ } +
+ + + + +
+ +
+ @if (currentMode !== 'site-search') { + + } @else { + + } +
- @if (currentMode === 'advanced') { - - } @else { - - } -
+ + @if (getActiveFilters(); as activeFilters) { @if (activeFilters.length && + currentMode !== 'site-search') { +
+ @for (f of activeFilters; track f.category + f.value) { + + } +
+ } } - - @if (getActiveFilters(); as activeFilters) { - @if (activeFilters.length) { -
- @for (f of activeFilters; track f.category + f.value) { - + + @if (results && !loading && currentMode !== "reference" && currentMode !== + "site-search") { +
+

+ {{ results.numberOfMatches }} results found for "{{ query }}" +

+ @if (!hasNoResults) { + + } +
+ } @if (currentMode !== 'site-search') { +
+ + +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
- } @else { -

Please report to us and we will get back shortly.

- -

 

- - - +
+
-
- -
- -
+
+
+
+
+
+ +
+
+ +
+
+ + } +
+ } @if (!loading && !error && !hasNoResults && results) { @if + (results.results && results.results.length) { @if (grouped) { + + @for (group of results.results; track group.typeName) { + +
+ + @if (!collapsedGroups[group.typeName]) { @if (currentMode === + 'reference') { +
+ @if (group.typeName === 'Protein' && proteinLoading) { +
+ Loading all protein forms... +
+ } @for (entry of getGroupPageEntries(group); track entry.dbId) { +
+
+ +
+ diff --git a/projects/website-angular/src/app/search/search.component.ts b/projects/website-angular/src/app/search/search.component.ts index d619351..5108ba9 100644 --- a/projects/website-angular/src/app/search/search.component.ts +++ b/projects/website-angular/src/app/search/search.component.ts @@ -27,6 +27,7 @@ import { } from '../../services/search.service'; import { DatePipe } from '@angular/common'; import { MatIcon } from '@angular/material/icon'; +import { SiteSearchComponent } from '../site-search/site-search.component'; @Component({ selector: 'app-search', @@ -36,6 +37,7 @@ import { MatIcon } from '@angular/material/icon'; TileComponent, RouterLink, SearchBarComponent, + SiteSearchComponent, FormsModule, DatePipe, MatIcon, @@ -132,7 +134,7 @@ export class SearchComponent implements OnInit, OnDestroy, AfterViewInit { this.currentMode = 'simple'; } - if (this.query) { + if (this.query && this.currentMode !== 'site-search') { this.searchSubmitted = true; this.doSearch(); this.getSuggestions(this.query); diff --git a/projects/website-angular/src/app/site-search/site-search.component.html b/projects/website-angular/src/app/site-search/site-search.component.html index 4b21040..795b5a5 100644 --- a/projects/website-angular/src/app/site-search/site-search.component.html +++ b/projects/website-angular/src/app/site-search/site-search.component.html @@ -1,27 +1,25 @@