Skip to content

Commit 3ef0e33

Browse files
authored
Merge pull request #717 from nsemets/fix/performance-improvements
Performance improvements
2 parents 4b5ef87 + 2bf2fc3 commit 3ef0e33

File tree

139 files changed

+252
-300
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+252
-300
lines changed

angular.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"styles": [
4949
"src/styles/styles.scss",
5050
"node_modules/primeflex/primeflex.css",
51-
"node_modules/@fortawesome/fontawesome-free/css/all.min.css",
5251
"node_modules/ngx-markdown-editor/assets/highlight.js/agate.min.css"
5352
],
5453
"stylePreprocessorOptions": {
@@ -74,7 +73,8 @@
7473
"maximumError": "25kB"
7574
}
7675
],
77-
"outputHashing": "all"
76+
"outputHashing": "all",
77+
"optimization": true
7878
},
7979
"analyze-bundle": {
8080
"sourceMap": true,
@@ -147,15 +147,15 @@
147147
},
148148
"development": {
149149
"buildTarget": "osf:build:development",
150-
"hmr": false
150+
"hmr": true
151151
},
152152
"docker": {
153153
"buildTarget": "osf:build:docker",
154-
"hmr": false
154+
"hmr": true
155155
},
156156
"staging": {
157157
"buildTarget": "osf:build:staging",
158-
"hmr": false
158+
"hmr": true
159159
},
160160
"test": {
161161
"buildTarget": "osf:build:test",

package-lock.json

Lines changed: 0 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@
4747
"@newrelic/browser-agent": "^1.301.0",
4848
"@ngx-translate/core": "^16.0.4",
4949
"@ngx-translate/http-loader": "^16.0.1",
50-
"@ngxs/devtools-plugin": "^19.0.0",
51-
"@ngxs/logger-plugin": "^19.0.0",
5250
"@ngxs/store": "^19.0.0",
5351
"@primeng/themes": "^19.0.9",
5452
"@sentry/angular": "^10.10.0",

src/app/app.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { withNgxsReduxDevtoolsPlugin } from '@ngxs/devtools-plugin';
21
import { provideStore } from '@ngxs/store';
32

43
import { TranslateModule } from '@ngx-translate/core';
@@ -49,7 +48,7 @@ export const appConfig: ApplicationConfig = {
4948
}),
5049
provideHttpClient(withInterceptors([authInterceptor, viewOnlyInterceptor, errorInterceptor])),
5150
provideRouter(routes, withInMemoryScrolling({ scrollPositionRestoration: 'top', anchorScrolling: 'enabled' })),
52-
provideStore(STATES, withNgxsReduxDevtoolsPlugin({ disabled: true })),
51+
provideStore(STATES),
5352
provideZoneChangeDetection({ eventCoalescing: true }),
5453
SENTRY_PROVIDER,
5554
],

src/app/app.routes.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { provideStates } from '@ngxs/store';
33
import { Routes } from '@angular/router';
44

55
import { isFileGuard } from '@core/guards/is-file.guard';
6-
import { BookmarksState, ProjectsState } from '@shared/stores';
76

87
import { authGuard, redirectIfLoggedInGuard } from './core/guards';
98
import { isProjectGuard } from './core/guards/is-project.guard';
@@ -14,6 +13,8 @@ import { RegistriesState } from './features/registries/store';
1413
import { LicensesHandlers, ProjectsHandlers, ProvidersHandlers } from './features/registries/store/handlers';
1514
import { FilesHandlers } from './features/registries/store/handlers/files.handlers';
1615
import { LicensesService } from './shared/services';
16+
import { BookmarksState } from './shared/stores/bookmarks';
17+
import { ProjectsState } from './shared/stores/projects';
1718

1819
export const routes: Routes = [
1920
{

src/app/core/components/nav-menu/nav-menu.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { CustomMenuItem } from '@osf/core/models';
88
import { AuthService } from '@osf/core/services';
99
import { ProviderSelectors } from '@osf/core/store/provider/provider.selectors';
1010
import { UserSelectors } from '@osf/core/store/user/user.selectors';
11-
import { CurrentResourceSelectors } from '@osf/shared/stores';
11+
import { CurrentResourceSelectors } from '@osf/shared/stores/current-resource';
1212

1313
import { NavMenuComponent } from './nav-menu.component';
1414

src/app/core/components/nav-menu/nav-menu.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { IconComponent } from '@osf/shared/components';
2020
import { CurrentResourceType, ReviewPermissions } from '@osf/shared/enums';
2121
import { getViewOnlyParam } from '@osf/shared/helpers';
2222
import { WrapFnPipe } from '@osf/shared/pipes';
23-
import { CurrentResourceSelectors, GetResourceDetails } from '@osf/shared/stores';
23+
import { CurrentResourceSelectors, GetResourceDetails } from '@osf/shared/stores/current-resource';
2424

2525
@Component({
2626
selector: 'osf-nav-menu',

src/app/core/constants/ngxs-states.constant.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ import { FilesState } from '@osf/features/files/store';
66
import { MetadataState } from '@osf/features/metadata/store';
77
import { ProjectOverviewState } from '@osf/features/project/overview/store';
88
import { RegistrationsState } from '@osf/features/project/registrations/store';
9-
import { AddonsState, ContributorsState, CurrentResourceState, WikiState } from '@osf/shared/stores';
9+
import { AddonsState } from '@osf/shared/stores/addons';
1010
import { BannersState } from '@osf/shared/stores/banners';
11+
import { ContributorsState } from '@osf/shared/stores/contributors';
12+
import { CurrentResourceState } from '@osf/shared/stores/current-resource';
13+
import { WikiState } from '@osf/shared/stores/wiki';
1114
import { GlobalSearchState } from '@shared/stores/global-search';
1215
import { InstitutionsState } from '@shared/stores/institutions';
1316
import { InstitutionsSearchState } from '@shared/stores/institutions-search';

src/app/core/guards/is-file.guard.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import { map, switchMap } from 'rxjs/operators';
55
import { inject } from '@angular/core';
66
import { CanMatchFn, Route, Router, UrlSegment } from '@angular/router';
77

8+
import { CurrentResourceSelectors, GetResource } from '@osf/shared/stores/current-resource';
9+
810
import { CurrentResourceType } from '../../shared/enums';
9-
import { CurrentResourceSelectors, GetResource } from '../../shared/stores';
1011

1112
export const isFileGuard: CanMatchFn = (route: Route, segments: UrlSegment[]) => {
1213
const store = inject(Store);

src/app/core/guards/is-project.guard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { inject } from '@angular/core';
66
import { CanMatchFn, Route, Router, UrlSegment } from '@angular/router';
77

88
import { UserSelectors } from '@core/store/user';
9+
import { CurrentResourceSelectors, GetResource } from '@osf/shared/stores/current-resource';
910
import { CurrentResourceType } from '@shared/enums';
10-
import { CurrentResourceSelectors, GetResource } from '@shared/stores';
1111

1212
export const isProjectGuard: CanMatchFn = (route: Route, segments: UrlSegment[]) => {
1313
const store = inject(Store);

0 commit comments

Comments
 (0)