Skip to content

Commit

Permalink
feat: remove changeDetection.onPush in every component
Browse files Browse the repository at this point in the history
  • Loading branch information
derschnee68 committed May 16, 2024
1 parent 381d4f2 commit 7611ba0
Show file tree
Hide file tree
Showing 37 changed files with 3 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ function existingUserNamesValidator(valArrayRegexp: [RegExp]): ValidatorFn {
}

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-add-user',
templateUrl: './add-user.component.html',
styleUrls: ['./add-user.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { ProjectBase } from '../project-base';
import { AddUserComponent } from './add-user/add-user.component';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-collaboration',
templateUrl: './collaboration.component.html',
styleUrls: ['./collaboration.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { map, takeUntil } from 'rxjs/operators';
import { AutocompleteItem } from '../../../workspace/search/operator';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-select-group',
templateUrl: './select-group.component.html',
styleUrls: ['./select-group.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import { map } from 'rxjs/operators';
import { ProjectBase } from '../project-base';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-data-models',
templateUrl: './data-models.component.html',
styleUrls: ['./data-models.component.scss'],
})
export class DataModelsComponent extends ProjectBase implements OnInit {
protected readonly RouteConstants = RouteConstants;

get ontologiesMetadata$(): Observable<OntologyMetadata[]> {
const uuid = this._route.parent.snapshot.params.uuid;
const iri = `${this._appInit.dspAppConfig.iriBase}/projects/${uuid}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { map, takeUntil, takeWhile } from 'rxjs/operators';
import { AppGlobal } from '../../app-global';

@Component({
// changeDetection: ChangeDetectionStrategy.OnPush,
//
selector: 'app-description',
templateUrl: './description.component.html',
styleUrls: ['./description.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export interface CreateListItemDialogProps {
}

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-create-list-item-dialog',
template: `
<app-dialog-header title="Insert new child node"></app-dialog-header>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { atLeastOneStringRequired } from '../../../main/form-validators/at-least
import { ListItemService } from '../list-item/list-item.service';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-list-item-form',
template: `
<form [formGroup]="form" style="display: flex" (ngSubmit)="createChildNode()">
Expand Down
1 change: 0 additions & 1 deletion apps/dsp-app/src/app/project/list/list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
} from './reusable-list-info-form/edit-list-info-dialog.component';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-list',
templateUrl: './list.component.html',
styleUrls: ['./list.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { SplitSize } from '../../../workspace/results/results.component';
import { ProjectBase } from '../../project-base';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-ontology-class-instance',
templateUrl: './ontology-class-instance.component.html',
styleUrls: ['./ontology-class-instance.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { combineLatest, Observable, Subject, Subscription } from 'rxjs';
import { map, takeUntil } from 'rxjs/operators';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-ontology-class-item',
templateUrl: './ontology-class-item.component.html',
styleUrls: ['./ontology-class-item.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ClassDefinition } from '@dasch-swiss/dsp-js';
import { OntologyClassService, SortingService } from '@dasch-swiss/vre/shared/app-helper-services';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-ontology-classes',
templateUrl: './ontology-classes.component.html',
styleUrls: ['./ontology-classes.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ import {
} from './edit-resource-class-dialog/edit-resource-class-dialog.component';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-ontology',
templateUrl: './ontology.component.html',
styleUrls: ['./ontology.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import { Observable, Subject } from 'rxjs';
import { map, take, takeUntil } from 'rxjs/operators';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-resource-class-info',
templateUrl: './resource-class-info.component.html',
styleUrls: ['./resource-class-info.component.scss'],
Expand Down
1 change: 0 additions & 1 deletion apps/dsp-app/src/app/project/project.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ type AvailableRoute =
| typeof RouteConstants.advancedSearch;

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-project',
templateUrl: './project.component.html',
styleUrls: ['./project.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { RouteConstants } from '@dasch-swiss/vre/shared/app-config';
import { MenuItem } from '../../main/declarations/menu-item';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-settings',
templateUrl: './settings.component.html',
styleUrls: ['./settings.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { SortProp } from '../../../main/action/sort-button/sort-button.component
import { DialogService } from '../../../main/services/dialog.service';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-projects-list',
templateUrl: './projects-list.component.html',
styleUrls: ['./projects-list.component.scss'],
Expand Down
1 change: 0 additions & 1 deletion apps/dsp-app/src/app/system/projects/projects.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { map, takeUntil } from 'rxjs/operators';
*
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-projects',
templateUrl: './projects.component.html',
styleUrls: ['./projects.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { CreateUserPageComponent } from '../../../user/create-user-page/create-u
import { EditUserPageComponent } from '../../../user/edit-user-page/edit-user-page.component';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-users-list',
templateUrl: './users-list.component.html',
styleUrls: ['./users-list.component.scss'],
Expand All @@ -38,6 +37,7 @@ export class UsersListComponent {
get list(): ReadUser[] {
return this._list;
}

@Input() set list(value: ReadUser[]) {
this._list = this._sortingService.keySortByAlphabetical(value, this.sortBy as keyof ReadUser);
}
Expand Down
1 change: 0 additions & 1 deletion apps/dsp-app/src/app/system/users/users.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { Select, Store } from '@ngxs/store';
import { Observable } from 'rxjs';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-users',
templateUrl: './users.component.html',
styleUrls: ['./users.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { map, takeUntil } from 'rxjs/operators';
import { AutocompleteItem } from '../../workspace/search/operator';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-membership',
template: `
<dasch-swiss-app-progress-indicator *ngIf="isMembershipLoading$ | async"></dasch-swiss-app-progress-indicator>
Expand Down
1 change: 0 additions & 1 deletion apps/dsp-app/src/app/user/overview/overview.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { filter, take } from 'rxjs/operators';
import { ReplaceAnimation } from '../../main/animations/replace-animation';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-overview',
templateUrl: './overview.component.html',
styleUrls: ['./overview.component.scss'],
Expand Down
1 change: 0 additions & 1 deletion apps/dsp-app/src/app/user/profile/profile.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { takeUntil, takeWhile } from 'rxjs/operators';
import { EditUserPageComponent } from '../edit-user-page/edit-user-page.component';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-profile',
templateUrl: './profile.component.html',
styleUrls: ['./profile.component.scss'],
Expand Down
1 change: 0 additions & 1 deletion apps/dsp-app/src/app/user/user.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { MenuItem } from '../main/declarations/menu-item';
selector: 'app-user',
templateUrl: './user.component.html',
styleUrls: ['./user.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class UserComponent implements OnDestroy {
isDestroyed = new Subject<void>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ShortResInfo } from '../results/list-view/list-view.component';
import { SplitSize } from '../results/results.component';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-comparison',
templateUrl: './comparison.component.html',
styleUrls: ['./comparison.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { DialogComponent } from '../../main/dialog/dialog.component';
import { FilteredResources } from '../results/list-view/list-view.component';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-intermediate',
templateUrl: './intermediate.component.html',
styleUrls: ['./intermediate.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { Store } from '@ngxs/store';
import { filter } from 'rxjs/operators';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-resource-toolbar',
templateUrl: './resource-toolbar.html',
styleUrls: ['./resource-toolbar.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ interface PolygonsForRegion {
}

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-still-image',
templateUrl: './still-image.component.html',
styleUrls: ['./still-image.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { map, takeUntil } from 'rxjs/operators';
import { FilteredResources, ShortResInfo } from '../../results/list-view/list-view.component';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-resource-link-form',
templateUrl: './resource-link-form.component.html',
styleUrls: ['./resource-link-form.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export interface CheckboxUpdate {
}

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-list-view',
templateUrl: './list-view.component.html',
styleUrls: ['./list-view.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export interface QueryObject {
providers: [AdvancedSearchStoreService],
templateUrl: './advanced-search.component.html',
styleUrls: ['./advanced-search.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AdvancedSearchComponent implements OnInit {
// either the uuid of the project or the shortcode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { MatIconModule } from '@angular/material/icon';
imports: [CommonModule, MatButtonModule, MatIconModule],
templateUrl: './form-actions.component.html',
styleUrls: ['./form-actions.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class FormActionsComponent {
@Input() addButtonDisabled: boolean | null = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { ApiData } from '../../data-access/advanced-search-service/advanced-sear
imports: [CommonModule, FormsModule, ReactiveFormsModule, MatSelectModule],
templateUrl: './ontology-resource-form.component.html',
styleUrls: ['./ontology-resource-form.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class OntologyResourceFormComponent {
@Input() ontologies: ApiData[] | null = []; // todo: handle null case in html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { OrderByItem } from '../../data-access/advanced-search-store/advanced-se
],
templateUrl: './order-by.component.html',
styleUrls: ['./order-by.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class OrderByComponent {
@Input() orderByList: OrderByItem[] | null = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import { PropertyFormValueComponent } from '../property-form-value/property-form
],
templateUrl: './property-form-link-match-property.component.html',
styleUrls: ['./property-form-link-match-property.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class PropertyFormLinkMatchPropertyComponent implements AfterViewInit {
@Input() values: PropertyFormItem[] | undefined = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { MatAutocompleteOptionsScrollDirective } from '../../directives/mat-auto
],
templateUrl: './property-form-link-value.component.html',
styleUrls: ['./property-form-link-value.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class PropertyFormLinkValueComponent implements OnInit, AfterViewInit {
@Input() value: string | PropertyFormItem[] | undefined = undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import { PropertyFormValueComponent } from './property-form-value/property-form-
providers: [MatSelect],
templateUrl: './property-form.component.html',
styleUrls: ['./property-form.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class PropertyFormComponent implements AfterViewInit {
@Input() propertyFormItem: PropertyFormItem = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { MatIconModule } from '@angular/material/icon';
imports: [NgIf, MatIconModule],
templateUrl: './app-progress-indicator.component.html',
styleUrls: ['./app-progress-indicator.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AppProgressIndicatorComponent implements OnInit {
/**
Expand Down

0 comments on commit 7611ba0

Please sign in to comment.