Skip to content

Commit d45a69a

Browse files
committed
feat(ENG-9818): fix comments
1 parent 874450f commit d45a69a

4 files changed

Lines changed: 11 additions & 95 deletions

File tree

src/app/features/collections/components/collections-discover/collections-discover.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ <h1 class="collections-heading flex align-items-center">{{ collectionProvider()?
3737
</div>
3838

3939
<div class="content-container flex-1">
40-
@if (useShtrovSearch) {
40+
@if (useShareTroveSearch) {
4141
@if (defaultSearchFiltersInitialized()) {
4242
<osf-global-search [searchControlInput]="searchControl" />
4343
}

src/app/features/collections/components/collections-discover/collections-discover.component.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ describe('CollectionsDiscoverComponent', () => {
129129
expect(component).toBeTruthy();
130130
});
131131

132-
it('should set useShtrovSearch to false', () => {
133-
expect(component.useShtrovSearch).toBe(false);
132+
it('should set useShareTroveSearch to false', () => {
133+
expect(component.useShareTroveSearch).toBe(false);
134134
});
135135

136136
it('should initialize with default values', () => {
@@ -197,9 +197,9 @@ describe('CollectionsDiscoverComponent', () => {
197197
});
198198

199199
describe('shtrove mode (collectionSubmissionWithCedar = true)', () => {
200-
it('should set useShtrovSearch to true', () => {
200+
it('should set useShareTroveSearch to true', () => {
201201
const { component } = setup({ collectionSubmissionWithCedar: true });
202-
expect(component.useShtrovSearch).toBe(true);
202+
expect(component.useShareTroveSearch).toBe(true);
203203
});
204204

205205
it('should initialize default search filters', () => {

src/app/features/collections/components/collections-discover/collections-discover.component.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export class CollectionsDiscoverComponent {
7878
providerId = signal<string>('');
7979
defaultSearchFiltersInitialized = signal(false);
8080

81-
readonly useShtrovSearch: boolean = this.environment.collectionSubmissionWithCedar;
81+
readonly useShareTroveSearch = this.environment.collectionSubmissionWithCedar;
8282

8383
collectionProvider = select(CollectionsSelectors.getCollectionProvider);
8484
collectionDetails = select(CollectionsSelectors.getCollectionDetails);
@@ -107,8 +107,8 @@ export class CollectionsDiscoverComponent {
107107
this.initializeProvider();
108108
this.setupBrandingEffect();
109109

110-
if (this.useShtrovSearch) {
111-
this.setupShtrovSearchEffect();
110+
if (this.useShareTroveSearch) {
111+
this.setupShareTroveSearchEffect();
112112
} else {
113113
this.setupCollectionDetailsEffect();
114114
this.setupUrlSyncEffect();
@@ -119,7 +119,7 @@ export class CollectionsDiscoverComponent {
119119
this.destroyRef.onDestroy(() => {
120120
if (this.isBrowser) {
121121
this.actions.clearCollections();
122-
if (this.useShtrovSearch) {
122+
if (this.useShareTroveSearch) {
123123
this.actions.resetSearchState();
124124
}
125125
this.headerStyleHelper.resetToDefaults();
@@ -133,7 +133,7 @@ export class CollectionsDiscoverComponent {
133133
}
134134

135135
onSearchTriggered(searchValue: string): void {
136-
if (!this.useShtrovSearch) {
136+
if (!this.useShareTroveSearch) {
137137
this.actions.setSearchValue(searchValue);
138138
this.actions.setPageNumber('1');
139139
}
@@ -161,15 +161,14 @@ export class CollectionsDiscoverComponent {
161161
});
162162
}
163163

164-
private setupShtrovSearchEffect(): void {
164+
private setupShareTroveSearchEffect(): void {
165165
effect(() => {
166166
const provider = this.collectionProvider();
167167
const collectionId = this.primaryCollectionId();
168168

169169
if (!provider || !collectionId || this.defaultSearchFiltersInitialized()) return;
170170

171171
const collectionIri = `${this.environment.apiDomainUrl}/v2/collections/${collectionId}/`;
172-
// TODO(ENG-9818): verify 'isContainedBy' property path against shtrove API before shipping
173172
this.actions.setDefaultFilterValue('isContainedBy', collectionIri);
174173

175174
if (provider.requiredMetadataTemplate?.attributes?.template) {

src/app/shared/mappers/filters/cedar-template-filter.mapper.spec.ts

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)