Skip to content

Commit

Permalink
Autofix: remove unneeded base component imports
Browse files Browse the repository at this point in the history
This is part of the themed-component-usages rule; Themed* components already import the base component, we don't need to import both anymore.
You'll see that all of these changes are also reflected in the base component.

Double-checked and this doesn't compromise the fixes from DSpace#2984
  • Loading branch information
ybnd committed Apr 30, 2024
1 parent c9d9e12 commit a48d199
Showing 7 changed files with 5 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@ import { RouterLink } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core';

import { BrowseByTaxonomyComponent as BaseComponent } from '../../../../../app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component';
import { BrowseByComponent } from '../../../../../app/shared/browse-by/browse-by.component';
import { ThemedBrowseByComponent } from '../../../../../app/shared/browse-by/themed-browse-by.component';
import { ThemedComcolPageBrowseByComponent } from '../../../../../app/shared/comcol/comcol-page-browse-by/themed-comcol-page-browse-by.component';
import { ComcolPageContentComponent } from '../../../../../app/shared/comcol/comcol-page-content/comcol-page-content.component';
@@ -36,7 +35,6 @@ import { VarDirective } from '../../../../../app/shared/utils/var.directive';
ComcolPageContentComponent,
DsoEditMenuComponent,
ThemedComcolPageBrowseByComponent,
BrowseByComponent,
TranslateModule,
ThemedLoadingComponent,
ThemedBrowseByComponent,
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@ import { ThemedDsoEditMetadataComponent } from '../../../../../app/dso-shared/ds
import { AlertComponent } from '../../../../../app/shared/alert/alert.component';
import { ThemedLoadingComponent } from '../../../../../app/shared/loading/themed-loading.component';
import { VarDirective } from '../../../../../app/shared/utils/var.directive';
import { DsoEditMetadataComponent } from '../../dso-shared/dso-edit-metadata/dso-edit-metadata.component';

@Component({
selector: 'ds-themed-edit-item-template-page',
@@ -21,7 +20,6 @@ import { DsoEditMetadataComponent } from '../../dso-shared/dso-edit-metadata/dso
standalone: true,
imports: [
ThemedDsoEditMetadataComponent,
DsoEditMetadataComponent,
RouterLink,
AsyncPipe,
VarDirective,
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@ import { Component } from '@angular/core';
import { ThemedRegisterEmailFormComponent } from 'src/app/register-email-form/themed-registry-email-form.component';

import { ForgotEmailComponent as BaseComponent } from '../../../../../app/forgot-password/forgot-password-email/forgot-email.component';
import { RegisterEmailFormComponent } from '../../../../../app/register-email-form/register-email-form.component';

@Component({
selector: 'ds-themed-forgot-email',
@@ -12,7 +11,7 @@ import { RegisterEmailFormComponent } from '../../../../../app/register-email-fo
templateUrl: '../../../../../app/forgot-password/forgot-password-email/forgot-email.component.html',
standalone: true,
imports: [
RegisterEmailFormComponent, ThemedRegisterEmailFormComponent,
ThemedRegisterEmailFormComponent,
],
})
/**
3 changes: 1 addition & 2 deletions src/themes/custom/app/header/header.component.ts
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@ import { HeaderComponent as BaseComponent } from '../../../../app/header/header.
import { ThemedSearchNavbarComponent } from '../../../../app/search-navbar/themed-search-navbar.component';
import { ThemedAuthNavMenuComponent } from '../../../../app/shared/auth-nav-menu/themed-auth-nav-menu.component';
import { ImpersonateNavbarComponent } from '../../../../app/shared/impersonate-navbar/impersonate-navbar.component';
import { LangSwitchComponent } from '../../../../app/shared/lang-switch/lang-switch.component';

/**
* Represents the header with the logo and simple navigation
@@ -25,7 +24,7 @@ import { LangSwitchComponent } from '../../../../app/shared/lang-switch/lang-swi
// templateUrl: 'header.component.html',
templateUrl: '../../../../app/header/header.component.html',
standalone: true,
imports: [RouterLink, ThemedLangSwitchComponent, NgbDropdownModule, ThemedSearchNavbarComponent, LangSwitchComponent, ContextHelpToggleComponent, ThemedAuthNavMenuComponent, ImpersonateNavbarComponent, TranslateModule, AsyncPipe, NgIf],
imports: [RouterLink, ThemedLangSwitchComponent, NgbDropdownModule, ThemedSearchNavbarComponent, ContextHelpToggleComponent, ThemedAuthNavMenuComponent, ImpersonateNavbarComponent, TranslateModule, AsyncPipe, NgIf],
})
export class HeaderComponent extends BaseComponent {
}
3 changes: 1 addition & 2 deletions src/themes/custom/app/home-page/home-page.component.ts
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@ import { HomePageComponent as BaseComponent } from '../../../../app/home-page/ho
import { RecentItemListComponent } from '../../../../app/home-page/recent-item-list/recent-item-list.component';
import { ThemedTopLevelCommunityListComponent } from '../../../../app/home-page/top-level-community-list/themed-top-level-community-list.component';
import { SuggestionsPopupComponent } from '../../../../app/notifications/suggestions-popup/suggestions-popup.component';
import { ConfigurationSearchPageComponent } from '../../../../app/search-page/configuration-search-page.component';
import { ThemedConfigurationSearchPageComponent } from '../../../../app/search-page/themed-configuration-search-page.component';
import { ThemedSearchFormComponent } from '../../../../app/shared/search-form/themed-search-form.component';
import { PageWithSidebarComponent } from '../../../../app/shared/sidebar/page-with-sidebar.component';
@@ -26,7 +25,7 @@ import { ViewTrackerComponent } from '../../../../app/statistics/angulartics/dsp
// templateUrl: './home-page.component.html'
templateUrl: '../../../../app/home-page/home-page.component.html',
standalone: true,
imports: [ThemedHomeNewsComponent, NgTemplateOutlet, NgIf, ViewTrackerComponent, ThemedSearchFormComponent, ThemedTopLevelCommunityListComponent, RecentItemListComponent, AsyncPipe, TranslateModule, NgClass, ConfigurationSearchPageComponent, SuggestionsPopupComponent, ThemedConfigurationSearchPageComponent, PageWithSidebarComponent, HomeCoarComponent],
imports: [ThemedHomeNewsComponent, NgTemplateOutlet, NgIf, ViewTrackerComponent, ThemedSearchFormComponent, ThemedTopLevelCommunityListComponent, RecentItemListComponent, AsyncPipe, TranslateModule, NgClass, SuggestionsPopupComponent, ThemedConfigurationSearchPageComponent, PageWithSidebarComponent, HomeCoarComponent],
})
export class HomePageComponent extends BaseComponent {

3 changes: 1 addition & 2 deletions src/themes/custom/app/login-page/login-page.component.ts
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@ import { TranslateModule } from '@ngx-translate/core';
import { ThemedLogInComponent } from 'src/app/shared/log-in/themed-log-in.component';

import { LoginPageComponent as BaseComponent } from '../../../../app/login-page/login-page.component';
import { LogInComponent } from '../../../../app/shared/log-in/log-in.component';

/**
* This component represents the login page
@@ -15,7 +14,7 @@ import { LogInComponent } from '../../../../app/shared/log-in/log-in.component';
// templateUrl: './login-page.component.html'
templateUrl: '../../../../app/login-page/login-page.component.html',
standalone: true,
imports: [LogInComponent, ThemedLogInComponent ,TranslateModule],
imports: [ThemedLogInComponent ,TranslateModule],
})
export class LoginPageComponent extends BaseComponent {
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Component } from '@angular/core';
import { ThemedRegisterEmailFormComponent } from 'src/app/register-email-form/themed-registry-email-form.component';

import { RegisterEmailFormComponent } from '../../../../../app/register-email-form/register-email-form.component';
import { RegisterEmailComponent as BaseComponent } from '../../../../../app/register-page/register-email/register-email.component';

@Component({
@@ -12,7 +11,7 @@ import { RegisterEmailComponent as BaseComponent } from '../../../../../app/regi
templateUrl: '../../../../../app/register-page/register-email/register-email.component.html',
standalone: true,
imports: [
RegisterEmailFormComponent, ThemedRegisterEmailFormComponent,
ThemedRegisterEmailFormComponent,
],
})
/**

0 comments on commit a48d199

Please sign in to comment.