Skip to content

Commit 9af6bb9

Browse files
committed
fix(search): Fixed PR comments and conflicts after merge
1 parent 702d618 commit 9af6bb9

24 files changed

Lines changed: 41 additions & 72 deletions

src/app/features/institutions/pages/institutions-search/institutions-search.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ <h1>{{ institution().name }}</h1>
2020
<p [innerHtml]="institution().description | safeHtml"></p>
2121
</div>
2222

23-
<osf-search [resourceTabOptions]="resourceTabOptions" />
23+
<osf-global-search [resourceTabOptions]="resourceTabOptions" />
2424
}
2525
</section>

src/app/features/institutions/pages/institutions-search/institutions-search.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import { ActivatedRoute } from '@angular/router';
1010
import { LoadingSpinnerComponent } from '@osf/shared/components';
1111
import { SEARCH_TAB_OPTIONS } from '@osf/shared/constants';
1212
import { FetchInstitutionById, InstitutionsSearchSelectors } from '@osf/shared/stores/institutions-search';
13-
import { OsfSearchComponent } from '@shared/components';
13+
import { GlobalSearchComponent } from '@shared/components';
1414
import { SetDefaultFilterValue } from '@shared/stores/osf-search';
1515

1616
@Component({
1717
selector: 'osf-institutions-search',
18-
imports: [FormsModule, NgOptimizedImage, LoadingSpinnerComponent, SafeHtmlPipe, OsfSearchComponent],
18+
imports: [FormsModule, NgOptimizedImage, LoadingSpinnerComponent, SafeHtmlPipe, GlobalSearchComponent],
1919
templateUrl: './institutions-search.component.html',
2020
styleUrl: './institutions-search.component.scss',
2121
changeDetection: ChangeDetectionStrategy.OnPush,

src/app/features/preprints/pages/preprint-provider-discover/preprint-provider-discover.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
/>
66

77
@if (preprintProvider()) {
8-
<osf-search [searchControlInput]="searchControl" [provider]="preprintProvider() ?? null" />
8+
<osf-global-search [searchControlInput]="searchControl" [provider]="preprintProvider() ?? null" />
99
}

src/app/features/preprints/pages/preprint-provider-discover/preprint-provider-discover.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import { ActivatedRoute } from '@angular/router';
77
import { PreprintProviderHeroComponent } from '@osf/features/preprints/components';
88
import { BrowserTabHelper, HeaderStyleHelper } from '@osf/shared/helpers';
99
import { BrandService } from '@osf/shared/services';
10-
import { OsfSearchComponent } from '@shared/components/osf-search/osf-search.component';
10+
import { GlobalSearchComponent } from '@shared/components';
1111
import { ResourceType } from '@shared/enums';
12-
import { SetDefaultFilterValue, SetResourceType } from '@shared/stores/osf-search/osf-search.actions';
12+
import { SetDefaultFilterValue, SetResourceType } from '@shared/stores/osf-search';
1313

1414
import { GetPreprintProviderById, PreprintProvidersSelectors } from '../../store/preprint-providers';
1515

1616
@Component({
1717
selector: 'osf-preprint-provider-discover',
18-
imports: [PreprintProviderHeroComponent, OsfSearchComponent],
18+
imports: [PreprintProviderHeroComponent, GlobalSearchComponent],
1919
templateUrl: './preprint-provider-discover.component.html',
2020
styleUrl: './preprint-provider-discover.component.scss',
2121
changeDetection: ChangeDetectionStrategy.OnPush,

src/app/features/profile/pages/my-profile/my-profile.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
@if (currentUser()) {
44
<div class="m-t-48">
5-
<osf-search [resourceTabOptions]="resourceTabOptions" />
5+
<osf-global-search [resourceTabOptions]="resourceTabOptions" />
66
</div>
77
}

src/app/features/profile/pages/my-profile/my-profile.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import { Router } from '@angular/router';
66
import { UserSelectors } from '@osf/core/store/user';
77
import { ProfileInformationComponent } from '@osf/features/profile/components';
88
import { SetUserProfile } from '@osf/features/profile/store';
9-
import { OsfSearchComponent } from '@shared/components';
9+
import { GlobalSearchComponent } from '@shared/components';
1010
import { SEARCH_TAB_OPTIONS } from '@shared/constants';
1111
import { ResourceType } from '@shared/enums';
1212
import { SetDefaultFilterValue, UpdateFilterValue } from '@shared/stores/osf-search';
1313

1414
@Component({
1515
selector: 'osf-my-profile',
16-
imports: [ProfileInformationComponent, OsfSearchComponent],
16+
imports: [ProfileInformationComponent, GlobalSearchComponent],
1717
templateUrl: './my-profile.component.html',
1818
styleUrl: './my-profile.component.scss',
1919
changeDetection: ChangeDetectionStrategy.OnPush,
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
@if (isUserLoading()) {
2+
<osf-loading-spinner />
23
} @else {
3-
<osf-profile-information [currentUser]="currentUser()" />
4-
54
@if (currentUser()) {
5+
<osf-profile-information [currentUser]="currentUser()" />
6+
67
<div class="m-t-48">
7-
<osf-search [resourceTabOptions]="resourceTabOptions" />
8+
<osf-global-search [resourceTabOptions]="resourceTabOptions" />
89
</div>
910
}
1011
}

src/app/features/profile/pages/user-profile/user-profile.component.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
import { createDispatchMap, select } from '@ngxs/store';
22

3-
import { ChangeDetectionStrategy, Component, inject, OnInit } from '@angular/core';
3+
import { ChangeDetectionStrategy, Component, HostBinding, inject, OnInit } from '@angular/core';
44
import { ActivatedRoute } from '@angular/router';
55

66
import { ProfileInformationComponent } from '@osf/features/profile/components';
77
import { FetchUserProfile, ProfileSelectors } from '@osf/features/profile/store';
8-
import { OsfSearchComponent } from '@shared/components';
8+
import { GlobalSearchComponent, LoadingSpinnerComponent } from '@shared/components';
99
import { SEARCH_TAB_OPTIONS } from '@shared/constants';
1010
import { ResourceType } from '@shared/enums';
1111
import { SetDefaultFilterValue } from '@shared/stores/osf-search';
1212

1313
@Component({
1414
selector: 'osf-user-profile',
15-
imports: [ProfileInformationComponent, OsfSearchComponent],
15+
imports: [ProfileInformationComponent, GlobalSearchComponent, LoadingSpinnerComponent],
1616
templateUrl: './user-profile.component.html',
1717
styleUrl: './user-profile.component.scss',
1818
changeDetection: ChangeDetectionStrategy.OnPush,
1919
})
2020
export class UserProfileComponent implements OnInit {
21+
@HostBinding('class') classes = 'flex-1';
22+
2123
private route = inject(ActivatedRoute);
2224
private actions = createDispatchMap({
2325
fetchUserProfile: FetchUserProfile,

src/app/features/registries/components/registry-provider-hero/registry-provider-hero.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@use "assets/styles/mixins" as mix;
1+
@use "styles/mixins" as mix;
22

33
.registries-hero-container {
44
background-image: var(--branding-hero-background-image-url);

src/app/features/registries/components/registry-provider-hero/registry-provider-hero.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export class RegistryProviderHeroComponent implements OnDestroy {
2828
private readonly translateService = inject(TranslateService);
2929
private readonly dialogService = inject(DialogService);
3030

31+
private readonly WHITE = '#ffffff';
3132
searchControl = input<FormControl>(new FormControl());
3233
provider = input.required<RegistryProviderDetails | null>();
3334
isProviderLoading = input.required<boolean>();
@@ -44,7 +45,7 @@ export class RegistryProviderHeroComponent implements OnDestroy {
4445
if (provider) {
4546
BrandService.applyBranding(provider.brand);
4647
HeaderStyleHelper.applyHeaderStyles(
47-
'#ffffff',
48+
this.WHITE,
4849
provider.brand.primaryColor,
4950
provider.brand.heroBackgroundImageUrl
5051
);

0 commit comments

Comments
 (0)