Skip to content

Commit 7606f47

Browse files
authored
Merge branch 'main' into making_user-menu-component_themeable
2 parents cfa70ec + 7c0fdcb commit 7606f47

203 files changed

Lines changed: 8705 additions & 2796 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.

.github/workflows/label_merge_conflicts.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
# See: https://github.com/prince-chrismc/label-merge-conflicts-action
2626
- name: Auto-label PRs with merge conflicts
2727
uses: prince-chrismc/label-merge-conflicts-action@v3
28+
# Ignore any failures -- may occur (randomly?) for older, outdated PRs.
29+
continue-on-error: true
2830
# Add "merge conflict" label if a merge conflict is detected. Remove it when resolved.
2931
# Note, the authentication token is created automatically
3032
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This workflow will attempt to port a merged pull request to
2+
# the branch specified in a "port to" label (if exists)
3+
name: Port merged Pull Request
4+
5+
# Only run for merged PRs against the "main" or maintenance branches
6+
# We allow this to run for `pull_request_target` so that github secrets are available
7+
# (This is required when the PR comes from a forked repo)
8+
on:
9+
pull_request_target:
10+
types: [ closed ]
11+
branches:
12+
- main
13+
- 'dspace-**'
14+
15+
permissions:
16+
contents: write # so action can add comments
17+
pull-requests: write # so action can create pull requests
18+
19+
jobs:
20+
port_pr:
21+
runs-on: ubuntu-latest
22+
# Don't run on closed *unmerged* pull requests
23+
if: github.event.pull_request.merged
24+
steps:
25+
# Checkout code
26+
- uses: actions/checkout@v3
27+
# Port PR to other branch (ONLY if labeled with "port to")
28+
# See https://github.com/korthout/backport-action
29+
- name: Create backport pull requests
30+
uses: korthout/backport-action@v1
31+
with:
32+
# Trigger based on a "port to [branch]" label on PR
33+
# (This label must specify the branch name to port to)
34+
label_pattern: '^port to ([^ ]+)$'
35+
# Title to add to the (newly created) port PR
36+
pull_title: '[Port ${target_branch}] ${pull_title}'
37+
# Description to add to the (newly created) port PR
38+
pull_description: 'Port of #${pull_number} by @${pull_author} to `${target_branch}`.'
39+
# Copy all labels from original PR to (newly created) port PR
40+
# NOTE: The labels matching 'label_pattern' are automatically excluded
41+
copy_labels_pattern: '.*'
42+
# Skip any merge commits in the ported PR. This means only non-merge commits are cherry-picked to the new PR
43+
merge_commits: 'skip'
44+
# Use a personal access token (PAT) to create PR as 'dspace-bot' user.
45+
# A PAT is required in order for the new PR to trigger its own actions (for CI checks)
46+
github_token: ${{ secrets.PR_PORT_TOKEN }}

Dockerfile.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://github.com/DSpace/dspace-angular/tree/main/docker for usage details
33

44
# Test build:
5-
# docker build -f Dockerfile.dist -t dspace/dspace-angular:dspace-7_x-dist .
5+
# docker build -f Dockerfile.dist -t dspace/dspace-angular:latest-dist .
66

77
FROM node:18-alpine as build
88

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ DSPACE_UI_SSL => DSPACE_SSL
157157

158158
The same settings can also be overwritten by setting system environment variables instead, E.g.:
159159
```bash
160-
export DSPACE_HOST=api7.dspace.org
161-
export DSPACE_UI_PORT=4200
160+
export DSPACE_HOST=demo.dspace.org
161+
export DSPACE_UI_PORT=4000
162162
```
163163

164164
The priority works as follows: **environment variable** overrides **variable in `.env` file** overrides external config set by `DSPACE_APP_CONFIG_PATH` overrides **`config.(prod or dev).yml`**
@@ -288,7 +288,7 @@ E2E tests (aka integration tests) use [Cypress.io](https://www.cypress.io/). Con
288288
The test files can be found in the `./cypress/integration/` folder.
289289

290290
Before you can run e2e tests, two things are REQUIRED:
291-
1. You MUST be running the DSpace backend (i.e. REST API) locally. The e2e tests will *NOT* succeed if run against our demo REST API (https://api7.dspace.org/server/), as that server is uncontrolled and may have content added/removed at any time.
291+
1. You MUST be running the DSpace backend (i.e. REST API) locally. The e2e tests will *NOT* succeed if run against our demo/sandbox REST API (https://demo.dspace.org/server/ or https://sandbox.dspace.org/server/), as those sites may have content added/removed at any time.
292292
* After starting up your backend on localhost, make sure either your `config.prod.yml` or `config.dev.yml` has its `rest` settings defined to use that localhost backend.
293293
* If you'd prefer, you may instead use environment variables as described at [Configuring](#configuring). For example:
294294
```

config/config.example.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ui:
2222
# 'synced' with the 'dspace.server.url' setting in your backend's local.cfg.
2323
rest:
2424
ssl: true
25-
host: api7.dspace.org
25+
host: sandbox.dspace.org
2626
port: 443
2727
# NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
2828
nameSpace: /server
@@ -208,6 +208,9 @@ languages:
208208
- code: pt-BR
209209
label: Português do Brasil
210210
active: true
211+
- code: sr-lat
212+
label: Srpski (lat)
213+
active: true
211214
- code: fi
212215
label: Suomi
213216
active: true
@@ -292,33 +295,33 @@ themes:
292295
#
293296
# # A theme with a handle property will match the community, collection or item with the given
294297
# # handle, and all collections and/or items within it
295-
# - name: 'custom',
296-
# handle: '10673/1233'
298+
# - name: custom
299+
# handle: 10673/1233
297300
#
298301
# # A theme with a regex property will match the route using a regular expression. If it
299302
# # matches the route for a community or collection it will also apply to all collections
300303
# # and/or items within it
301-
# - name: 'custom',
302-
# regex: 'collections\/e8043bc2.*'
304+
# - name: custom
305+
# regex: collections\/e8043bc2.*
303306
#
304307
# # A theme with a uuid property will match the community, collection or item with the given
305308
# # ID, and all collections and/or items within it
306-
# - name: 'custom',
307-
# uuid: '0958c910-2037-42a9-81c7-dca80e3892b4'
309+
# - name: custom
310+
# uuid: 0958c910-2037-42a9-81c7-dca80e3892b4
308311
#
309312
# # The extends property specifies an ancestor theme (by name). Whenever a themed component is not found
310313
# # in the current theme, its ancestor theme(s) will be checked recursively before falling back to default.
311-
# - name: 'custom-A',
312-
# extends: 'custom-B',
314+
# - name: custom-A
315+
# extends: custom-B
313316
# # Any of the matching properties above can be used
314-
# handle: '10673/34'
317+
# handle: 10673/34
315318
#
316-
# - name: 'custom-B',
317-
# extends: 'custom',
318-
# handle: '10673/12'
319+
# - name: custom-B
320+
# extends: custom
321+
# handle: 10673/12
319322
#
320323
# # A theme with only a name will match every route
321-
# name: 'custom'
324+
# name: custom
322325
#
323326
# # This theme will use the default bootstrap styling for DSpace components
324327
# - name: BASE_THEME_NAME
@@ -379,4 +382,4 @@ vocabularies:
379382
# Default collection/community sorting order at Advanced search, Create/update community and collection when there are not a query.
380383
comcolSelectionSort:
381384
sortField: 'dc.title'
382-
sortDirection: 'ASC'
385+
sortDirection: 'ASC'

config/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
rest:
22
ssl: true
3-
host: api7.dspace.org
3+
host: sandbox.dspace.org
44
port: 443
55
nameSpace: /server

cypress/e2e/community-list.cy.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Options } from 'cypress-axe';
21
import { testA11y } from 'cypress/support/utils';
32

43
describe('Community List Page', () => {
@@ -13,13 +12,6 @@ describe('Community List Page', () => {
1312
cy.get('[data-test="expand-button"]').click({ multiple: true });
1413

1514
// Analyze <ds-community-list-page> for accessibility issues
16-
// Disable heading-order checks until it is fixed
17-
testA11y('ds-community-list-page',
18-
{
19-
rules: {
20-
'heading-order': { enabled: false }
21-
}
22-
} as Options
23-
);
15+
testA11y('ds-community-list-page');
2416
});
2517
});

cypress/e2e/header.cy.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ describe('Header', () => {
1111
testA11y({
1212
include: ['ds-header'],
1313
exclude: [
14-
['#search-navbar-container'], // search in navbar has duplicative ID. Will be fixed in #1174
15-
['.dropdownLogin'] // "Log in" link has color contrast issues. Will be fixed in #1149
14+
['#search-navbar-container'] // search in navbar has duplicative ID. Will be fixed in #1174
1615
],
1716
});
1817
});

cypress/e2e/item-page.cy.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Options } from 'cypress-axe';
21
import { TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e';
32
import { testA11y } from 'cypress/support/utils';
43

@@ -19,13 +18,16 @@ describe('Item Page', () => {
1918
cy.get('ds-item-page').should('be.visible');
2019

2120
// Analyze <ds-item-page> for accessibility issues
22-
// Disable heading-order checks until it is fixed
23-
testA11y('ds-item-page',
24-
{
25-
rules: {
26-
'heading-order': { enabled: false }
27-
}
28-
} as Options
29-
);
21+
testA11y('ds-item-page');
22+
});
23+
24+
it('should pass accessibility tests on full item page', () => {
25+
cy.visit(ENTITYPAGE + '/full');
26+
27+
// <ds-full-item-page> tag must be loaded
28+
cy.get('ds-full-item-page').should('be.visible');
29+
30+
// Analyze <ds-full-item-page> for accessibility issues
31+
testA11y('ds-full-item-page');
3032
});
3133
});

cypress/e2e/login-modal.cy.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { TEST_ADMIN_PASSWORD, TEST_ADMIN_USER, TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e';
2+
import { testA11y } from 'cypress/support/utils';
23

34
const page = {
45
openLoginMenu() {
@@ -123,4 +124,15 @@ describe('Login Modal', () => {
123124
cy.location('pathname').should('eq', '/forgot');
124125
cy.get('ds-forgot-email').should('exist');
125126
});
127+
128+
it('should pass accessibility tests', () => {
129+
cy.visit('/');
130+
131+
page.openLoginMenu();
132+
133+
cy.get('ds-log-in').should('exist');
134+
135+
// Analyze <ds-log-in> for accessibility issues
136+
testA11y('ds-log-in');
137+
});
126138
});

0 commit comments

Comments
 (0)