Skip to content

Commit 6467b60

Browse files
authored
Merge branch 'main' into fix-10053-b
2 parents 8402aeb + 4b921a6 commit 6467b60

File tree

1,222 files changed

+34225
-22409
lines changed

Some content is hidden

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

1,222 files changed

+34225
-22409
lines changed

.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,9 @@
293293
],
294294
"rules": {
295295
// Custom DSpace Angular rules
296-
"dspace-angular-html/themed-component-usages": "error"
296+
"dspace-angular-html/themed-component-usages": "error",
297+
"dspace-angular-html/no-disabled-attribute-on-button": "error",
298+
"@angular-eslint/template/prefer-control-flow": "error"
297299
}
298300
},
299301
{

.github/workflows/build.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ name: Build
77
on: [push, pull_request]
88

99
permissions:
10-
contents: read # to fetch code (actions/checkout)
10+
contents: read # to fetch code (actions/checkout)
11+
packages: read # to fetch private images from GitHub Container Registry (GHCR)
1112

1213
jobs:
1314
tests:
@@ -35,6 +36,9 @@ jobs:
3536
NODE_OPTIONS: '--max-old-space-size=4096'
3637
# Project name to use when running "docker compose" prior to e2e tests
3738
COMPOSE_PROJECT_NAME: 'ci'
39+
# Docker Registry to use for Docker compose scripts below.
40+
# We use GitHub's Container Registry to avoid aggressive rate limits at DockerHub.
41+
DOCKER_REGISTRY: ghcr.io
3842
strategy:
3943
# Create a matrix of Node versions to test against (in parallel)
4044
matrix:
@@ -114,6 +118,14 @@ jobs:
114118
path: 'coverage/dspace-angular/lcov.info'
115119
retention-days: 14
116120

121+
# Login to our Docker registry, so that we can access private Docker images using "docker compose" below.
122+
- name: Login to ${{ env.DOCKER_REGISTRY }}
123+
uses: docker/login-action@v3
124+
with:
125+
registry: ${{ env.DOCKER_REGISTRY }}
126+
username: ${{ github.repository_owner }}
127+
password: ${{ secrets.GITHUB_TOKEN }}
128+
117129
# Using "docker compose" start backend using CI configuration
118130
# and load assetstore from a cached copy
119131
- name: Start DSpace REST Backend via Docker (for e2e tests)

.github/workflows/docker.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ on:
1616
pull_request:
1717

1818
permissions:
19-
contents: read # to fetch code (actions/checkout)
19+
contents: read # to fetch code (actions/checkout)
20+
packages: write # to write images to GitHub Container Registry (GHCR)
2021

2122
jobs:
2223
#############################################################

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This image will be published as dspace/dspace-angular
22
# See https://github.com/DSpace/dspace-angular/tree/main/docker for usage details
33

4-
FROM node:18-alpine
4+
FROM docker.io/node:18-alpine
55

66
# Ensure Python and other build tools are available
77
# These are needed to install some node modules, especially on linux/arm64
@@ -22,5 +22,5 @@ ENV NODE_OPTIONS="--max_old_space_size=4096"
2222
# Listen / accept connections from all IP addresses.
2323
# NOTE: At this time it is only possible to run Docker container in Production mode
2424
# if you have a public URL. See https://github.com/DSpace/dspace-angular/issues/1485
25-
ENV NODE_ENV development
25+
ENV NODE_ENV=development
2626
CMD npm run serve -- --host 0.0.0.0

Dockerfile.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Test build:
55
# docker build -f Dockerfile.dist -t dspace/dspace-angular:latest-dist .
66

7-
FROM node:18-alpine AS build
7+
FROM docker.io/node:18-alpine AS build
88

99
# Ensure Python and other build tools are available
1010
# These are needed to install some node modules, especially on linux/arm64
@@ -26,6 +26,6 @@ COPY --chown=node:node docker/dspace-ui.json /app/dspace-ui.json
2626

2727
WORKDIR /app
2828
USER node
29-
ENV NODE_ENV production
29+
ENV NODE_ENV=production
3030
EXPOSE 4000
3131
CMD pm2-runtime start dspace-ui.json --json

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace
3535
Quick start
3636
-----------
3737

38-
**Ensure you're running [Node](https://nodejs.org) `v16.x` or `v18.x`, [npm](https://www.npmjs.com/) >= `v5.x`**
38+
**Ensure you're running [Node](https://nodejs.org) `v18.x` or `v20.x`, [npm](https://www.npmjs.com/) >= `v10.x`**
3939

4040
```bash
4141
# clone the repo
@@ -90,7 +90,7 @@ Requirements
9090
------------
9191

9292
- [Node.js](https://nodejs.org)
93-
- Ensure you're running node `v16.x` or `v18.x`
93+
- Ensure you're running node `v18.x` or `v20.x`
9494

9595
If you have [`nvm`](https://github.com/creationix/nvm#install-script) or [`nvm-windows`](https://github.com/coreybutler/nvm-windows) installed, which is highly recommended, you can run `nvm install --lts && nvm use` to install and start using the latest Node LTS.
9696

config/config.example.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,31 @@ ssr:
2323
# Determining which styles are critical is a relatively expensive operation; this option is
2424
# disabled (false) by default to boost server performance at the expense of loading smoothness.
2525
inlineCriticalCss: false
26+
# Path prefixes to enable SSR for. By default these are limited to paths of primary DSpace objects.
27+
# NOTE: The "/handle/" path ensures Handle redirects work via SSR. The "/reload/" path ensures
28+
# hard refreshes (e.g. after login) trigger SSR while fully reloading the page.
29+
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/', '/reload/' ]
30+
# Whether to enable rendering of Search component on SSR.
31+
# If set to true the component will be included in the HTML returned from the server side rendering.
32+
# If set to false the component will not be included in the HTML returned from the server side rendering.
33+
enableSearchComponent: false
34+
# Whether to enable rendering of Browse component on SSR.
35+
# If set to true the component will be included in the HTML returned from the server side rendering.
36+
# If set to false the component will not be included in the HTML returned from the server side rendering.
37+
enableBrowseComponent: false
38+
# Enable state transfer from the server-side application to the client-side application.
39+
# Defaults to true.
40+
# Note: When using an external application cache layer, it's recommended not to transfer the state to avoid caching it.
41+
# Disabling it ensures that dynamic state information is not inadvertently cached, which can improve security and
42+
# ensure that users always use the most up-to-date state.
43+
transferState: true
44+
# When a different REST base URL is used for the server-side application, the generated state contains references to
45+
# REST resources with the internal URL configured. By default, these internal URLs are replaced with public URLs.
46+
# Disable this setting to avoid URL replacement during SSR. In this the state is not transferred to avoid security issues.
47+
replaceRestUrl: true
48+
# Enable request performance profiling data collection and printing the results in the server console.
49+
# Defaults to false. Enabling in production is NOT recommended
50+
#enablePerformanceProfiler: false
2651

2752
# The REST API server settings
2853
# NOTE: these settings define which (publicly available) REST API to use. They are usually
@@ -33,6 +58,9 @@ rest:
3358
port: 443
3459
# NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
3560
nameSpace: /server
61+
# Provide a different REST url to be used during SSR execution. It must contain the whole url including protocol, server port and
62+
# server namespace (uncomment to use it).
63+
#ssrBaseUrl: http://localhost:8080/server
3664

3765
# Caching settings
3866
cache:
@@ -448,6 +476,12 @@ search:
448476
enabled: false
449477
# List of filters to enable in "Advanced Search" dropdown
450478
filter: [ 'title', 'author', 'subject', 'entityType' ]
479+
#
480+
# Number used to render n UI elements called loading skeletons that act as placeholders.
481+
# These elements indicate that some content will be loaded in their stead.
482+
# Since we don't know how many filters will be loaded before we receive a response from the server we use this parameter for the skeletons count.
483+
# e.g. If we set 5 then 5 loading skeletons will be visualized before the actual filters are retrieved.
484+
defaultFiltersCount: 5
451485

452486

453487
# Notify metrics

cypress/e2e/admin-add-new-modals.cy.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ describe('Admin Add New Modals', () => {
99

1010
it('Add new Community modal should pass accessibility tests', () => {
1111
// Pin the sidebar open
12+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
1213
cy.get('[data-test="sidebar-collapse-toggle"]').click();
1314

1415
// Click on entry of menu
16+
cy.get('[data-test="admin-menu-section-new-title"]').should('be.visible');
1517
cy.get('[data-test="admin-menu-section-new-title"]').click();
1618

1719
cy.get('a[data-test="menu.section.new_community"]').click();
@@ -22,9 +24,11 @@ describe('Admin Add New Modals', () => {
2224

2325
it('Add new Collection modal should pass accessibility tests', () => {
2426
// Pin the sidebar open
27+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
2528
cy.get('[data-test="sidebar-collapse-toggle"]').click();
2629

2730
// Click on entry of menu
31+
cy.get('[data-test="admin-menu-section-new-title"]').should('be.visible');
2832
cy.get('[data-test="admin-menu-section-new-title"]').click();
2933

3034
cy.get('a[data-test="menu.section.new_collection"]').click();
@@ -35,9 +39,11 @@ describe('Admin Add New Modals', () => {
3539

3640
it('Add new Item modal should pass accessibility tests', () => {
3741
// Pin the sidebar open
42+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
3843
cy.get('[data-test="sidebar-collapse-toggle"]').click();
3944

4045
// Click on entry of menu
46+
cy.get('[data-test="admin-menu-section-new-title"]').should('be.visible');
4147
cy.get('[data-test="admin-menu-section-new-title"]').click();
4248

4349
cy.get('a[data-test="menu.section.new_item"]').click();

cypress/e2e/admin-edit-modals.cy.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ describe('Admin Edit Modals', () => {
99

1010
it('Edit Community modal should pass accessibility tests', () => {
1111
// Pin the sidebar open
12+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
1213
cy.get('[data-test="sidebar-collapse-toggle"]').click();
1314

1415
// Click on entry of menu
15-
cy.get('#admin-menu-section-edit-title').click();
16+
cy.get('[data-test="admin-menu-section-edit-title"]').should('be.visible');
17+
cy.get('[data-test="admin-menu-section-edit-title"]').click();
1618

1719
cy.get('a[data-test="menu.section.edit_community"]').click();
1820

@@ -22,10 +24,12 @@ describe('Admin Edit Modals', () => {
2224

2325
it('Edit Collection modal should pass accessibility tests', () => {
2426
// Pin the sidebar open
27+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
2528
cy.get('[data-test="sidebar-collapse-toggle"]').click();
2629

2730
// Click on entry of menu
28-
cy.get('#admin-menu-section-edit-title').click();
31+
cy.get('[data-test="admin-menu-section-edit-title"]').should('be.visible');
32+
cy.get('[data-test="admin-menu-section-edit-title"]').click();
2933

3034
cy.get('a[data-test="menu.section.edit_collection"]').click();
3135

@@ -35,10 +39,12 @@ describe('Admin Edit Modals', () => {
3539

3640
it('Edit Item modal should pass accessibility tests', () => {
3741
// Pin the sidebar open
42+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
3843
cy.get('[data-test="sidebar-collapse-toggle"]').click();
3944

4045
// Click on entry of menu
41-
cy.get('#admin-menu-section-edit-title').click();
46+
cy.get('[data-test="admin-menu-section-edit-title"]').should('be.visible');
47+
cy.get('[data-test="admin-menu-section-edit-title"]').click();
4248

4349
cy.get('a[data-test="menu.section.edit_item"]').click();
4450

cypress/e2e/admin-export-modals.cy.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ describe('Admin Export Modals', () => {
99

1010
it('Export metadata modal should pass accessibility tests', () => {
1111
// Pin the sidebar open
12+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
1213
cy.get('[data-test="sidebar-collapse-toggle"]').click();
1314

1415
// Click on entry of menu
15-
cy.get('#admin-menu-section-export-title').click();
16+
cy.get('[data-test="admin-menu-section-export-title"]').should('be.visible');
17+
cy.get('[data-test="admin-menu-section-export-title"]').click();
1618

1719
cy.get('a[data-test="menu.section.export_metadata"]').click();
1820

@@ -22,10 +24,12 @@ describe('Admin Export Modals', () => {
2224

2325
it('Export batch modal should pass accessibility tests', () => {
2426
// Pin the sidebar open
27+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
2528
cy.get('[data-test="sidebar-collapse-toggle"]').click();
2629

2730
// Click on entry of menu
28-
cy.get('#admin-menu-section-export-title').click();
31+
cy.get('[data-test="admin-menu-section-export-title"]').should('be.visible');
32+
cy.get('[data-test="admin-menu-section-export-title"]').click();
2933

3034
cy.get('a[data-test="menu.section.export_batch"]').click();
3135

0 commit comments

Comments
 (0)