Skip to content

Commit 7840a5d

Browse files
authored
[ENG-9053] feat(banner): fix scheduled banner placement (#535)
* feat(banner): fix scheduled banner placement * feat(banner): remove component import from osf-banner test
1 parent 008dd77 commit 7840a5d

File tree

9 files changed

+10
-10
lines changed

9 files changed

+10
-10
lines changed
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<osf-scheduled-banner></osf-scheduled-banner>
21
<osf-maintenance-banner></osf-maintenance-banner>
32
<osf-cookie-consent-banner></osf-cookie-consent-banner>
43
<osf-tos-consent-banner></osf-tos-consent-banner>

src/app/core/components/osf-banners/osf-banner.component.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
44
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
55

66
import { CookieConsentBannerComponent } from './cookie-consent-banner/cookie-consent-banner.component';
7-
import { ScheduledBannerComponent } from './scheduled-banner/scheduled-banner.component';
87
import { TosConsentBannerComponent } from './tos-consent-banner/tos-consent-banner.component';
98
import { OSFBannerComponent } from './osf-banner.component';
109

@@ -22,7 +21,6 @@ describe('Component: OSF Banner', () => {
2221
OSFBannerComponent,
2322
NoopAnimationsModule,
2423
MockComponentWithSignal('osf-maintenance-banner'),
25-
MockComponent(ScheduledBannerComponent),
2624
MockComponent(CookieConsentBannerComponent),
2725
MockComponent(TosConsentBannerComponent),
2826
],

src/app/core/components/osf-banners/osf-banner.component.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
22

33
import { CookieConsentBannerComponent } from './cookie-consent-banner/cookie-consent-banner.component';
44
import { MaintenanceBannerComponent } from './maintenance-banner/maintenance-banner.component';
5-
import { ScheduledBannerComponent } from './scheduled-banner/scheduled-banner.component';
65
import { TosConsentBannerComponent } from './tos-consent-banner/tos-consent-banner.component';
76

87
/**
@@ -22,12 +21,7 @@ import { TosConsentBannerComponent } from './tos-consent-banner/tos-consent-bann
2221
*/
2322
@Component({
2423
selector: 'osf-banner-component',
25-
imports: [
26-
MaintenanceBannerComponent,
27-
ScheduledBannerComponent,
28-
CookieConsentBannerComponent,
29-
TosConsentBannerComponent,
30-
],
24+
imports: [MaintenanceBannerComponent, CookieConsentBannerComponent, TosConsentBannerComponent],
3125
templateUrl: './osf-banner.component.html',
3226
changeDetection: ChangeDetectionStrategy.OnPush,
3327
})

src/app/features/home/pages/dashboard/dashboard.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
[buttonLabel]="'home.loggedIn.dashboard.createProject' | translate"
1111
(buttonClick)="createProject()"
1212
/>
13+
<osf-scheduled-banner />
1314
<div>
1415
<div class="quick-search-container py-4 px-3 md:px-4">
1516
<p class="text-center mb-4 xl:mb-6">

src/app/features/home/pages/dashboard/dashboard.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
1313
import { FormControl } from '@angular/forms';
1414
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
1515

16+
import { ScheduledBannerComponent } from '@core/components/osf-banners/scheduled-banner/scheduled-banner.component';
1617
import { CreateProjectDialogComponent } from '@osf/features/my-projects/components';
1718
import {
1819
IconComponent,
@@ -37,6 +38,7 @@ import { ClearMyResources, GetMyProjects, MyResourcesSelectors } from '@osf/shar
3738
IconComponent,
3839
TranslatePipe,
3940
LoadingSpinnerComponent,
41+
ScheduledBannerComponent,
4042
],
4143
templateUrl: './dashboard.component.html',
4244
styleUrl: './dashboard.component.scss',

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
[title]="'institutions.title' | translate"
66
[icon]="'custom-icon-institutions-dark'"
77
/>
8+
<osf-scheduled-banner />
89
<div class="flex-column flex flex-1 w-full bg-white p-5">
910
<osf-search-input [control]="searchControl" [placeholder]="'institutions.searchInstitutions' | translate" />
1011

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
1010
import { FormControl } from '@angular/forms';
1111
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
1212

13+
import { ScheduledBannerComponent } from '@core/components/osf-banners/scheduled-banner/scheduled-banner.component';
1314
import { LoadingSpinnerComponent, SearchInputComponent, SubHeaderComponent } from '@osf/shared/components';
1415
import { FetchInstitutions, InstitutionsSelectors } from '@osf/shared/stores';
1516

@@ -21,6 +22,7 @@ import { FetchInstitutions, InstitutionsSelectors } from '@osf/shared/stores';
2122
SearchInputComponent,
2223
NgOptimizedImage,
2324
LoadingSpinnerComponent,
25+
ScheduledBannerComponent,
2426
RouterLink,
2527
],
2628
templateUrl: './institutions-list.component.html',

src/app/features/registries/pages/registries-landing/registries-landing.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
[buttonLabel]="'registries.addRegistration' | translate"
99
(buttonClick)="goToCreateRegistration()"
1010
/>
11+
<osf-scheduled-banner />
1112
<osf-search-input
1213
class="w-full py-4 px-4"
1314
[control]="searchControl"

src/app/features/registries/pages/registries-landing/registries-landing.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { ChangeDetectionStrategy, Component, inject, OnDestroy, OnInit } from '@
88
import { FormControl } from '@angular/forms';
99
import { Router } from '@angular/router';
1010

11+
import { ScheduledBannerComponent } from '@core/components/osf-banners/scheduled-banner/scheduled-banner.component';
1112
import { ENVIRONMENT } from '@core/provider/environment.provider';
1213
import { ClearCurrentProvider } from '@core/store/provider';
1314
import {
@@ -36,6 +37,7 @@ import { GetRegistries, RegistriesSelectors } from '../../store';
3637
ResourceCardComponent,
3738
LoadingSpinnerComponent,
3839
SubHeaderComponent,
40+
ScheduledBannerComponent,
3941
],
4042
templateUrl: './registries-landing.component.html',
4143
styleUrl: './registries-landing.component.scss',

0 commit comments

Comments
 (0)