Skip to content

Commit fb99347

Browse files
Merge branch 'main' into use-applied-filter-to-display-label-on-search_contribute-main
# Conflicts: # src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-option/search-facet-option.component.spec.ts # src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-option/search-facet-option.component.ts # src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-range-option/search-facet-range-option.component.ts # src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.spec.ts # src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.ts # src/app/shared/search/search-filters/search-filter/search-filter.component.ts # src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.ts # src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.ts # src/app/shared/search/search-filters/search-filters.component.ts # src/app/shared/search/search-labels/search-label/search-label.component.spec.ts # src/app/shared/search/search-labels/search-label/search-label.component.ts # src/app/shared/search/search-labels/search-labels.component.ts # src/app/shared/search/search-sidebar/search-sidebar.component.ts # src/app/shared/search/search.component.html # src/app/shared/search/search.component.ts # src/app/shared/search/search.module.ts
2 parents e18c22e + 288a918 commit fb99347

1,970 files changed

Lines changed: 28232 additions & 20951 deletions

File tree

Some content is hidden

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

.eslintrc.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@
152152
}
153153
],
154154
"@angular-eslint/no-attribute-decorator": "error",
155-
"@angular-eslint/no-forward-ref": "error",
156155
"@angular-eslint/no-output-native": "warn",
157156
"@angular-eslint/no-output-on-prefix": "warn",
158157
"@angular-eslint/no-conflicting-lifecycle": "warn",

.github/workflows/build.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ jobs:
3333
#CHROME_VERSION: "90.0.4430.212-1"
3434
# Bump Node heap size (OOM in CI after upgrading to Angular 15)
3535
NODE_OPTIONS: '--max-old-space-size=4096'
36-
# Project name to use when running docker-compose prior to e2e tests
36+
# Project name to use when running "docker compose" prior to e2e tests
3737
COMPOSE_PROJECT_NAME: 'ci'
3838
strategy:
3939
# Create a matrix of Node versions to test against (in parallel)
4040
matrix:
41-
node-version: [16.x, 18.x]
41+
node-version: [18.x, 20.x]
4242
# Do NOT exit immediately if one matrix job fails
4343
fail-fast: false
4444
# These are the actual CI steps to perform per job
@@ -74,7 +74,7 @@ jobs:
7474
id: yarn-cache-dir-path
7575
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
7676
- name: Cache Yarn dependencies
77-
uses: actions/cache@v3
77+
uses: actions/cache@v4
7878
with:
7979
# Cache entire Yarn cache directory (see previous step)
8080
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -101,19 +101,19 @@ jobs:
101101
# so that it can be shared with the 'codecov' job (see below)
102102
# NOTE: Angular CLI only supports code coverage for specs. See https://github.com/angular/angular-cli/issues/6286
103103
- name: Upload code coverage report to Artifact
104-
uses: actions/upload-artifact@v3
104+
uses: actions/upload-artifact@v4
105105
if: matrix.node-version == '18.x'
106106
with:
107-
name: dspace-angular coverage report
107+
name: coverage-report-${{ matrix.node-version }}
108108
path: 'coverage/dspace-angular/lcov.info'
109109
retention-days: 14
110110

111-
# Using docker-compose start backend using CI configuration
111+
# Using "docker compose" start backend using CI configuration
112112
# and load assetstore from a cached copy
113113
- name: Start DSpace REST Backend via Docker (for e2e tests)
114114
run: |
115-
docker-compose -f ./docker/docker-compose-ci.yml up -d
116-
docker-compose -f ./docker/cli.yml -f ./docker/cli.assetstore.yml run --rm dspace-cli
115+
docker compose -f ./docker/docker-compose-ci.yml up -d
116+
docker compose -f ./docker/cli.yml -f ./docker/cli.assetstore.yml run --rm dspace-cli
117117
docker container ls
118118
119119
# Run integration tests via Cypress.io
@@ -135,19 +135,19 @@ jobs:
135135
# Cypress always creates a video of all e2e tests (whether they succeeded or failed)
136136
# Save those in an Artifact
137137
- name: Upload e2e test videos to Artifacts
138-
uses: actions/upload-artifact@v3
138+
uses: actions/upload-artifact@v4
139139
if: always()
140140
with:
141-
name: e2e-test-videos
141+
name: e2e-test-videos-${{ matrix.node-version }}
142142
path: cypress/videos
143143

144144
# If e2e tests fail, Cypress creates a screenshot of what happened
145145
# Save those in an Artifact
146146
- name: Upload e2e test failure screenshots to Artifacts
147-
uses: actions/upload-artifact@v3
147+
uses: actions/upload-artifact@v4
148148
if: failure()
149149
with:
150-
name: e2e-test-screenshots
150+
name: e2e-test-screenshots-${{ matrix.node-version }}
151151
path: cypress/screenshots
152152

153153
- name: Stop app (in case it stays up after e2e tests)
@@ -182,7 +182,7 @@ jobs:
182182
run: kill -9 $(lsof -t -i:4000)
183183

184184
- name: Shutdown Docker containers
185-
run: docker-compose -f ./docker/docker-compose-ci.yml down
185+
run: docker compose -f ./docker/docker-compose-ci.yml down
186186

187187
# Codecov upload is a separate job in order to allow us to restart this separate from the entire build/test
188188
# job above. This is necessary because Codecov uploads seem to randomly fail at times.
@@ -197,7 +197,7 @@ jobs:
197197

198198
# Download artifacts from previous 'tests' job
199199
- name: Download coverage artifacts
200-
uses: actions/download-artifact@v3
200+
uses: actions/download-artifact@v4
201201

202202
# Now attempt upload to Codecov using its action.
203203
# NOTE: We use a retry action to retry the Codecov upload if it fails the first time.
@@ -207,11 +207,12 @@ jobs:
207207
- name: Upload coverage to Codecov.io
208208
uses: Wandalen/wretry.action@v1.3.0
209209
with:
210-
action: codecov/codecov-action@v3
210+
action: codecov/codecov-action@v4
211211
# Ensure codecov-action throws an error when it fails to upload
212212
# This allows us to auto-restart the action if an error is thrown
213213
with: |
214214
fail_ci_if_error: true
215+
token: ${{ secrets.CODECOV_TOKEN }}
215216
# Try re-running action 5 times max
216217
attempt_limit: 5
217218
# Run again in 30 seconds

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
# Use the reusable-docker-build.yml script from DSpace/DSpace repo to build our Docker image
2929
uses: DSpace/DSpace/.github/workflows/reusable-docker-build.yml@main
3030
with:
31-
build_id: dspace-angular
31+
build_id: dspace-angular-dev
3232
image_name: dspace/dspace-angular
3333
dockerfile_path: ./Dockerfile
3434
secrets:

.github/workflows/issue_opened.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
# Only add to project board if issue is flagged as "needs triage" or has no labels
1717
# NOTE: By default we flag new issues as "needs triage" in our issue template
1818
if: (contains(github.event.issue.labels.*.name, 'needs triage') || join(github.event.issue.labels.*.name) == '')
19-
uses: actions/add-to-project@v0.5.0
19+
uses: actions/add-to-project@v1.0.0
2020
# Note, the authentication token below is an ORG level Secret.
2121
# It must be created/recreated manually via a personal access token with admin:org, project, public_repo permissions
2222
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token

.github/workflows/pull_request_opened.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ jobs:
2121
# Assign the PR to whomever created it. This is useful for visualizing assignments on project boards
2222
# See https://github.com/toshimaru/auto-author-assign
2323
- name: Assign PR to creator
24-
uses: toshimaru/auto-author-assign@v2.0.1
24+
uses: toshimaru/auto-author-assign@v2.1.0

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/.angular/cache
2+
/.nx
23
/__build__
34
/__server_build__
45
/node_modules

angular.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,22 +109,22 @@
109109
"serve": {
110110
"builder": "@angular-builders/custom-webpack:dev-server",
111111
"options": {
112-
"browserTarget": "dspace-angular:build",
112+
"buildTarget": "dspace-angular:build",
113113
"port": 4000
114114
},
115115
"configurations": {
116116
"development": {
117-
"browserTarget": "dspace-angular:build:development"
117+
"buildTarget": "dspace-angular:build:development"
118118
},
119119
"production": {
120-
"browserTarget": "dspace-angular:build:production"
120+
"buildTarget": "dspace-angular:build:production"
121121
}
122122
}
123123
},
124124
"extract-i18n": {
125125
"builder": "@angular-devkit/build-angular:extract-i18n",
126126
"options": {
127-
"browserTarget": "dspace-angular:build"
127+
"buildTarget": "dspace-angular:build"
128128
}
129129
},
130130
"test": {
@@ -217,23 +217,23 @@
217217
}
218218
},
219219
"serve-ssr": {
220-
"builder": "@nguniversal/builders:ssr-dev-server",
220+
"builder": "@angular-devkit/build-angular:ssr-dev-server",
221221
"options": {
222-
"browserTarget": "dspace-angular:build",
222+
"buildTarget": "dspace-angular:build",
223223
"serverTarget": "dspace-angular:server",
224224
"port": 4000
225225
},
226226
"configurations": {
227227
"production": {
228-
"browserTarget": "dspace-angular:build:production",
228+
"buildTarget": "dspace-angular:build:production",
229229
"serverTarget": "dspace-angular:server:production"
230230
}
231231
}
232232
},
233233
"prerender": {
234-
"builder": "@nguniversal/builders:prerender",
234+
"builder": "@angular-devkit/build-angular:prerender",
235235
"options": {
236-
"browserTarget": "dspace-angular:build:production",
236+
"buildTarget": "dspace-angular:build:production",
237237
"serverTarget": "dspace-angular:server:production",
238238
"routes": [
239239
"/"

config/config.example.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ ui:
1717
# Trust X-FORWARDED-* headers from proxies (default = true)
1818
useProxies: true
1919

20+
universal:
21+
# Whether to inline "critical" styles into the server-side rendered HTML.
22+
# Determining which styles are critical is a relatively expensive operation;
23+
# this option can be disabled to boost server performance at the expense of
24+
# loading smoothness.
25+
inlineCriticalCss: true
26+
2027
# The REST API server settings
2128
# NOTE: these settings define which (publicly available) REST API to use. They are usually
2229
# 'synced' with the 'dspace.server.url' setting in your backend's local.cfg.
@@ -400,10 +407,11 @@ mediaViewer:
400407

401408
# Whether the end user agreement is required before users use the repository.
402409
# If enabled, the user will be required to accept the agreement before they can use the repository.
403-
# And whether the privacy statement should exist or not.
410+
# And whether the privacy statement/COAR notify support page should exist or not.
404411
info:
405412
enableEndUserAgreement: true
406413
enablePrivacyStatement: true
414+
enableCOARNotifySupport: true
407415

408416
# Whether to enable Markdown (https://commonmark.org/) and MathJax (https://www.mathjax.org/)
409417
# display in supported metadata fields. By default, only dc.description.abstract is supported.

cypress/e2e/admin-sidebar.cy.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
import { Options } from 'cypress-axe';
21
import { testA11y } from 'cypress/support/utils';
2+
import { Options } from 'cypress-axe';
33

44
describe('Admin Sidebar', () => {
5-
beforeEach(() => {
6-
// Must login as an Admin for sidebar to appear
7-
cy.visit('/login');
8-
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
9-
});
5+
beforeEach(() => {
6+
// Must login as an Admin for sidebar to appear
7+
cy.visit('/login');
8+
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
9+
});
1010

11-
it('should be pinnable and pass accessibility tests', () => {
12-
// Pin the sidebar open
13-
cy.get('#sidebar-collapse-toggle').click();
11+
it('should be pinnable and pass accessibility tests', () => {
12+
// Pin the sidebar open
13+
cy.get('#sidebar-collapse-toggle').click();
1414

15-
// Click on every expandable section to open all menus
16-
cy.get('ds-expandable-admin-sidebar-section').click({multiple: true});
15+
// Click on every expandable section to open all menus
16+
cy.get('ds-expandable-admin-sidebar-section').click({ multiple: true });
1717

18-
// Analyze <ds-admin-sidebar> for accessibility
19-
testA11y('ds-admin-sidebar',
18+
// Analyze <ds-admin-sidebar> for accessibility
19+
testA11y('ds-admin-sidebar',
2020
{
21-
rules: {
22-
// Currently all expandable sections have nested interactive elements
23-
// See https://github.com/DSpace/dspace-angular/issues/2178
24-
'nested-interactive': { enabled: false },
25-
}
21+
rules: {
22+
// Currently all expandable sections have nested interactive elements
23+
// See https://github.com/DSpace/dspace-angular/issues/2178
24+
'nested-interactive': { enabled: false },
25+
},
2626
} as Options);
27-
});
27+
});
2828
});

cypress/e2e/breadcrumbs.cy.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { testA11y } from 'cypress/support/utils';
22

33
describe('Breadcrumbs', () => {
4-
it('should pass accessibility tests', () => {
5-
// Visit an Item, as those have more breadcrumbs
6-
cy.visit('/entities/publication/'.concat(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION')));
4+
it('should pass accessibility tests', () => {
5+
// Visit an Item, as those have more breadcrumbs
6+
cy.visit('/entities/publication/'.concat(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION')));
77

8-
// Wait for breadcrumbs to be visible
9-
cy.get('ds-breadcrumbs').should('be.visible');
8+
// Wait for breadcrumbs to be visible
9+
cy.get('ds-breadcrumbs').should('be.visible');
1010

11-
// Analyze <ds-breadcrumbs> for accessibility
12-
testA11y('ds-breadcrumbs');
13-
});
11+
// Analyze <ds-breadcrumbs> for accessibility
12+
testA11y('ds-breadcrumbs');
13+
});
1414
});

0 commit comments

Comments
 (0)