Skip to content

Commit 278ecfb

Browse files
Merge remote-tracking branch 'gitHub/main' into task/main/DURACOM-508
2 parents b79a1b2 + cbc3d71 commit 278ecfb

308 files changed

Lines changed: 3580 additions & 2543 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/dependabot.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,14 @@ updates:
115115
- "actions/*"
116116
- "github/*"
117117
ignore:
118-
# For official GitHub actions, ignore minor & patch releases because we reference these actions
118+
# For official GitHub & Docker actions, ignore minor & patch releases because we reference these actions
119119
# via a major version tag which automatically uses the latest minor/patch version (e.g. "actions/checkout@v6")
120120
- dependency-name: "actions/*"
121121
update-types: [ "version-update:semver-minor", "version-update:semver-patch"]
122122
- dependency-name: "github/*"
123123
update-types: [ "version-update:semver-minor", "version-update:semver-patch"]
124+
- dependency-name: "docker/*"
125+
update-types: [ "version-update:semver-minor", "version-update:semver-patch" ]
124126
#####################
125127
## dspace-10_x branch
126128
#####################
@@ -232,12 +234,14 @@ updates:
232234
- "actions/*"
233235
- "github/*"
234236
ignore:
235-
# For official GitHub actions, ignore minor & patch releases because we reference these actions
237+
# For official GitHub & Docker actions, ignore minor & patch releases because we reference these actions
236238
# via a major version tag which automatically uses the latest minor/patch version (e.g. "actions/checkout@v6")
237239
- dependency-name: "actions/*"
238240
update-types: [ "version-update:semver-minor", "version-update:semver-patch"]
239241
- dependency-name: "github/*"
240242
update-types: [ "version-update:semver-minor", "version-update:semver-patch"]
243+
- dependency-name: "docker/*"
244+
update-types: [ "version-update:semver-minor", "version-update:semver-patch" ]
241245
#####################
242246
## dspace-9_x branch
243247
#####################
@@ -349,12 +353,14 @@ updates:
349353
- "actions/*"
350354
- "github/*"
351355
ignore:
352-
# For official GitHub actions, ignore minor & patch releases because we reference these actions
356+
# For official GitHub & Docker actions, ignore minor & patch releases because we reference these actions
353357
# via a major version tag which automatically uses the latest minor/patch version (e.g. "actions/checkout@v6")
354358
- dependency-name: "actions/*"
355359
update-types: [ "version-update:semver-minor", "version-update:semver-patch"]
356360
- dependency-name: "github/*"
357361
update-types: [ "version-update:semver-minor", "version-update:semver-patch"]
362+
- dependency-name: "docker/*"
363+
update-types: [ "version-update:semver-minor", "version-update:semver-patch" ]
358364
#####################
359365
## dspace-8_x branch
360366
#####################
@@ -468,9 +474,11 @@ updates:
468474
- "actions/*"
469475
- "github/*"
470476
ignore:
471-
# For official GitHub actions, ignore minor & patch releases because we reference these actions
477+
# For official GitHub & Docker actions, ignore minor & patch releases because we reference these actions
472478
# via a major version tag which automatically uses the latest minor/patch version (e.g. "actions/checkout@v6")
473479
- dependency-name: "actions/*"
474480
update-types: [ "version-update:semver-minor", "version-update:semver-patch"]
475481
- dependency-name: "github/*"
476482
update-types: [ "version-update:semver-minor", "version-update:semver-patch"]
483+
- dependency-name: "docker/*"
484+
update-types: [ "version-update:semver-minor", "version-update:semver-patch" ]

.github/pull_request_template.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ However, reviewers may request that you complete any actions in this list if you
2121

2222
- [ ] My PR is **created against the `main` branch** of code (unless it is a backport or is fixing an issue specific to an older branch).
2323
- [ ] My PR is **small in size** (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
24+
- [ ] My PR **follows all coding best practices** based on the [Code Conventions Guide](../CODE_CONVENTIONS.md)
2425
- [ ] My PR **passes [ESLint](https://eslint.org/)** validation using `npm run lint`
2526
- [ ] My PR **doesn't introduce circular dependencies** (verified via `npm run check-circ-deps`)
2627
- [ ] My PR **includes [TypeDoc](https://typedoc.org/) comments** for _all new (or modified) public methods and classes_. It also includes TypeDoc for large or complex private methods.
2728
- [ ] My PR **passes all specs/tests and includes new/updated specs or tests** based on the [Code Testing Guide](https://wiki.lyrasis.org/display/DSPACE/Code+Testing+Guide).
28-
- [ ] My PR **aligns with [Accessibility guidelines](https://wiki.lyrasis.org/display/DSDOC9x/Accessibility)** if it makes changes to the user interface.
29+
- [ ] My PR **aligns with [Accessibility guidelines](https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408944958/Accessibility)** if it makes changes to the user interface.
2930
- [ ] My PR **uses i18n (internationalization) keys** instead of hardcoded English text, to allow for translations.
3031
- [ ] My PR **includes details on how to test it**. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
3132
- [ ] If my PR includes new libraries/dependencies (in `package.json`), I've made sure their licenses align with the [DSpace BSD License](https://github.com/DSpace/DSpace/blob/main/LICENSE) based on the [Licensing of Contributions](https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines#CodeContributionGuidelines-LicensingofContributions) documentation.

.github/workflows/build.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,29 @@
44
name: Build
55

66
# Run this Build for all pushes / PRs to current branch
7-
on: [push, pull_request]
7+
on:
8+
push:
9+
# Don't run if PR is only updating static documentation or IDE/editor rules
10+
paths-ignore:
11+
- '.editorconfig'
12+
- '.gitignore'
13+
- '.vscode/*'
14+
- 'docs/*'
15+
- 'LICENSE'
16+
- 'LICENSES_THIRD_PARTY'
17+
- 'NOTICE'
18+
- '**/*.md'
19+
pull_request:
20+
# Don't run if PR is only updating static documentation or IDE/editor rules
21+
paths-ignore:
22+
- '.editorconfig'
23+
- '.gitignore'
24+
- '.vscode/*'
25+
- 'docs/*'
26+
- 'LICENSE'
27+
- 'LICENSES_THIRD_PARTY'
28+
- 'NOTICE'
29+
- '**/*.md'
830

931
permissions:
1032
contents: read # to fetch code (actions/checkout)
@@ -59,7 +81,7 @@ jobs:
5981

6082
# https://github.com/actions/setup-node
6183
- name: Install Node.js ${{ matrix.node-version }}
62-
uses: actions/setup-node@v6
84+
uses: actions/setup-node@v7
6385
with:
6486
node-version: ${{ matrix.node-version }}
6587

@@ -149,7 +171,7 @@ jobs:
149171
# https://github.com/cypress-io/github-action
150172
# (NOTE: to run these e2e tests locally, just use 'ng e2e')
151173
- name: Run e2e tests (integration tests)
152-
uses: cypress-io/github-action@v7.4.0
174+
uses: cypress-io/github-action@v7.4.3
153175
with:
154176
# Run tests in Chrome, headless mode (default)
155177
browser: chrome

.github/workflows/codescan.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@ on:
1515
branches:
1616
- main
1717
- 'dspace-**'
18-
# Don't run if PR is only updating static documentation
18+
# Don't run if PR is only updating static documentation or IDE/editor rules
1919
paths-ignore:
20+
- '.editorconfig'
21+
- '.gitignore'
22+
- '.vscode/*'
23+
- 'docs/*'
24+
- 'LICENSE'
25+
- 'LICENSES_THIRD_PARTY'
26+
- 'NOTICE'
2027
- '**/*.md'
21-
- '**/*.txt'
2228
schedule:
2329
- cron: "37 0 * * 1"
2430

@@ -42,11 +48,8 @@ jobs:
4248
- name: Initialize CodeQL
4349
uses: github/codeql-action/init@v4
4450
with:
45-
languages: javascript
46-
47-
# Autobuild attempts to build any compiled languages
48-
- name: Autobuild
49-
uses: github/codeql-action/autobuild@v4
51+
# Codescan Javascript/Typescript code and GitHub actions/workflows
52+
languages: javascript, actions
5053

5154
# Perform GitHub Code Scanning.
5255
- name: Perform CodeQL Analysis

.github/workflows/docker.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,27 @@ on:
1313
- 'dspace-**'
1414
tags:
1515
- 'dspace-**'
16+
# Don't run if PR is only updating static documentation or IDE/editor rules
17+
paths-ignore:
18+
- '.editorconfig'
19+
- '.gitignore'
20+
- '.vscode/*'
21+
- 'docs/*'
22+
- 'LICENSE'
23+
- 'LICENSES_THIRD_PARTY'
24+
- 'NOTICE'
25+
- '**/*.md'
1626
pull_request:
27+
# Don't run if PR is only updating static documentation or IDE/editor rules
28+
paths-ignore:
29+
- '.editorconfig'
30+
- '.gitignore'
31+
- '.vscode/*'
32+
- 'docs/*'
33+
- 'LICENSE'
34+
- 'LICENSES_THIRD_PARTY'
35+
- 'NOTICE'
36+
- '**/*.md'
1737

1838
permissions:
1939
contents: read # to fetch code (actions/checkout)

.github/workflows/port_merged_pull_request.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,25 @@ permissions:
1919
jobs:
2020
port_pr:
2121
runs-on: ubuntu-slim
22-
# Don't run on closed *unmerged* pull requests
23-
if: github.event.pull_request.merged
22+
# Only run on MERGED pull requests,
23+
# and only run if the merged PR has a label that starts with "port to"
24+
if: >
25+
github.event.pull_request.merged &&
26+
contains(toJSON(github.event.pull_request.labels.*.name), '"port to ')
2427
steps:
2528
# Checkout code
2629
- uses: actions/checkout@v7
30+
with:
31+
# When using 'pull_request_target' (see above), this 'checkout' step will always fail because it
32+
# may make the codebase vulnerable to "pwn requests" via the user-created PR.
33+
# See https://docs.github.com/en/actions/reference/security/securely-using-pull_request_target
34+
# However, we are allowing this unsafe checkout because (1) it's required to backport the PR, and
35+
# (2) this job only runs when a PR is MERGED, and merger only happens after a thorough review of the PR.
36+
allow-unsafe-pr-checkout: true
2737
# Port PR to other branch (ONLY if labeled with "port to")
2838
# See https://github.com/korthout/backport-action
2939
- name: Create backport pull requests
30-
uses: korthout/backport-action@v4.5.2
40+
uses: korthout/backport-action@v4.6.0
3141
with:
3242
# Trigger based on a "port to [branch]" label on PR
3343
# (This label must specify the branch name to port to)

.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@v3.0.3
24+
uses: toshimaru/auto-author-assign@v3.1.0

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
stale:
1717
runs-on: ubuntu-slim
1818
steps:
19-
- uses: actions/stale@v10
19+
- uses: actions/stale@v11
2020
with:
2121
# Number of GitHub API calls to allow in a single run (to avoid hitting GitHub's rate limit)
2222
# Default is 30. But, we've found that only results in processing ~7 issues or PRs. So, we've increased it.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ yarn-error.log
4242
junit.xml
4343

4444
/src/mirador-viewer/config.local.js
45+
46+
## ignore the auto-generated decorator registries
47+
decorator-registries/

CODE_CONVENTIONS.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# DSpace Angular Code Conventions
2+
3+
DSpace has established coding conventions or best practices that all contributions must follow in order
4+
to be accepted.
5+
6+
These code conventions describe the best practices for design and implementation of DSpace code, helping ensure that all DSpace components have a consistent layout and follow the essential Web Content Accessibility Guidelines ([WCAG](https://www.w3.org/WAI/standards-guidelines/wcag/)).
7+
The best practices for formatting your code are defined in our separate [Code Style Guidelines](CODE_STYLE.md).
8+
9+
For additional guidelines, see the wiki documentation for [User Interface Design Principles & Accessibility](https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945765/User+Interface+Design+Principles+Accessibility).
10+
11+
1. [Enforcement of Guidelines](#enforcement-of-guidelines)
12+
2. [Angular Guidelines](#angular-guidelines)
13+
1. [Templates in Base Theme should only use default Bootstrap styling](#templates-in-base-theme-should-only-use-default-Bootstrap-styling)
14+
2. [Required Bootstrap Components must use `ng-bootstrap` library](#required-bootstrap-components-must-use-ng-bootstrap-library)
15+
3. [Document methods and classes using TypeDoc](#document-methods-and-classes-using-typedoc)
16+
4. [Align with DSpace's User Interface Design Guidelines](#align-with-dspaces-user-interface-design-guidelines)
17+
3. [Accessibility Guidelines](#accessibility-guidelines)
18+
1. [Align with WCAG (Web Content Accessibility Guidelines) AA criteria](#align-with-wcag-web-content-accessibility-guidelines-aa-criteria)
19+
2. [Align with DSpace's User Interface Accessibility Guidelines](#align-with-dspaces-user-interface-accessibility-guidelines)
20+
21+
22+
## Enforcement of Guidelines
23+
24+
Enforcement of these code conventions is handled in two ways:
25+
* Some guidelines are enforced strictly via static code tools such as ESLint. Where possible, we prefer to automate enforcement.
26+
* All guidelines are enforced during code review by the assigned reviewers.
27+
28+
## Angular Guidelines
29+
30+
### Templates in Base Theme should only use default Bootstrap styling
31+
32+
All templates in the Base Theme ([/src/app](/src/app) directories) should only use default Bootstrap styling. Documentation at: https://getbootstrap.com/docs/4.6/getting-started/introduction/
33+
* Exceptions may be made for accessibility purposes. For example, Bootstrap notes their [default color scheme does not always have sufficient color contrast](https://getbootstrap.com/docs/4.0/getting-started/accessibility/#color-contrast).
34+
35+
### Required Bootstrap Components must use `ng-bootstrap` library
36+
37+
When Bootstrap Components (accordion, dropdown, etc …) are required you MUST use the included `ng-bootstrap` library. Documentation at: https://ng-bootstrap.github.io/#/components/accordion/examples
38+
39+
### Document methods and classes using TypeDoc
40+
41+
Write [TypeDoc](https://typedoc.org/) comments for all new (or modified) public methods and classes, as well as for large or complex private methods.
42+
43+
### Align with DSpace's User Interface Design Guidelines
44+
45+
In order to ensure consistent layout and behavior on all pages, please refer to the [User Interface Design Guidelines](https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945765/User+Interface+Design+Principles+Accessibility#UserInterfaceDesignPrinciples%26Accessibility-UserInterfaceDesignGuidelines). This documentation provides more details regarding User Interface layout/design and the elements (or components) used by the DSpace User Interface.
46+
47+
## Accessibility Guidelines
48+
49+
### Align with WCAG (Web Content Accessibility Guidelines) AA criteria
50+
51+
The DSpace User Interface strives to align with [WCAG](https://www.w3.org/WAI/standards-guidelines/wcag/) AA criteria. Some AAA criteria may also be supported. For more information see [Accessibility documentation](https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408944958/Accessibility).
52+
53+
The use of the Bootstrap framework can help in achieving some WCAG goals such as ‘Visual Presentation’ (AAA), 'Parsing' (A), ‘Orientation’ (AA), ‘Reflow’ (AA) and ‘Text Spacing’ (AA). See the Bootstrap chapter ["Accessibility"](https://getbootstrap.com/docs/4.0/getting-started/accessibility/) for an explanation of WCAG and where to find additional information.
54+
55+
### Align with DSpace's User Interface Accessibility Guidelines
56+
57+
Refer to the [User Interface Accessibility Guidelines](https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945765/User+Interface+Design+Principles+Accessibility#UserInterfaceDesignPrinciples%26Accessibility-UserInterfaceAccessibilityGuidelines) for more detailed recommendations regarding HTML structure, ARIA labelling and more.

0 commit comments

Comments
 (0)