Skip to content

Commit 8fc0f08

Browse files
milanmajchraktdonohuesergius02hugo-escirealanorth
committed
internal/fe-upgrade-clarin-dspace-7.6 (#450)
* Fix accessibility of date sliders by adding aria-labels (cherry picked from commit 2a88179) * Minor fixes to cypress tests (cherry picked from commit 70a7bbe) * Fix heading order accessibility issue in search filters/facets (cherry picked from commit 276d808) * Spanish translation updated to 7.6 (cherry picked from commit 4cc4192) * Some lint errors fixed (cherry picked from commit 1885638) * 🐛 fix when navbar expands on firefox (cherry picked from commit 6070672) * 🐛 Fix Value of dropdown changes automatically on item submission page (cherry picked from commit 6513059) * ✅change test event, click by mousedown on dynamic-scrollable-dropdown.component.spec.ts (cherry picked from commit 25479e1) * config/config.example.yml: fix example syntax As of DSpace Angular 7.2 the syntax has changed from TypeScript to YAML. (cherry picked from commit 9e46b53) * Fix VocabularyTreeview not updating + i18n for nsi (cherry picked from commit b5a70e8) * 104189: Allow CSV export on related entity search (cherry picked from commit cac1407) * 104189: CSV export add fixedFilter (cherry picked from commit 45ad5f7) * Minor pt-PT translation fixes (cherry picked from commit a6c1120) * remove redundant cache default values from server.ts (cherry picked from commit e53abcb) * 🚸remove thumbnail from file-upload section and show bitstream format and checksum (cherry picked from commit 4c8ec8a) * 🎨revert unnecessary format (cherry picked from commit 13e4052) * Update workspaceitem-section-upload-file.model.ts Fix code comment (cherry picked from commit 01c8a4d) * ♻️ refactor chain of observables to avoid async issues (cherry picked from commit 2dc9fd4) * 🐛 fix bug of caching when add new schema (cherry picked from commit 9fb9e58) * 🎨 revert format (cherry picked from commit 3e5524d) * Fix innerText still being undefined in ssr mode * Correct text of help info on edit group page (cherry picked from commit 4924743) * Graceful shutdown on SIGINT (e.g. from 'pm2 stop'). (cherry picked from commit 6709c3b) * Properly await termination. (cherry picked from commit 4449737) * Document a modified method as required by PR guidelines. (cherry picked from commit bf9b2b8) * 106974: Angular SSR menu issues * src/app/shared/search: don't capitalize metadata values Don't capitalize metadata values for display purposes. * fix issue where more than one api call was made on every route change * fix issue where invalidateRootCache didn't happen when the page first loaded * remove obsolete label element in metadata-schema.component.html (cherry picked from commit 6847c30) * removed trailing whitespaces as suggested by reviewer (cherry picked from commit 43f19e7) * [Port dspace-7_x] Update fi.json5 (DSpace#2516) * Update fi.json5 Two last translations to the Finnish file. (cherry picked from commit c3a908b) * Fix routes not working with baseHref (cherry picked from commit 18febff) * [Port dspace-7_x] Serbian (Latin) translation (DSpace#2520) * Serbian (latin) translation added. --------- Co-authored-by: imilos <imilos@gmail.com> * [Port dspace-7_x] Fix missing or wrong Italian translations (DSpace#2522) [DURACOM-184] fix missing or wrong Italian translations --------- Co-authored-by: Andrea Barbasso <´andrea.barbasso@4science.com´> * fix dev mode issue where retrieving the login options fails * roll back unintended change to the responseMsToLive for RootDataservice * [DURACOM-185] Fix pointer on language dropdown menu (cherry picked from commit 6b5708c) * Move subscription button to DSO edit menu (cherry picked from commit c955816) * Update DSO edit menu resolver tests - Abstract away the different "subsections" ~ DSO type (the tests should not care about this) Instead, retrieve sections of interest by ID & assert whether they're there & how they should look - Test separately for Communities, Collections & Items - Test newly added menu section (cherry picked from commit 18b7a9c) * Issue#2535: Hide add more button in submission if no disabled sections * translate community as 'Bereich' in de.json5 (cherry picked from commit 0139670) * Fix browse by visual bug (cherry picked from commit d0b4e15) * Bump postcss from 8.4.23 to 8.4.31 Bumps [postcss](https://github.com/postcss/postcss) from 8.4.23 to 8.4.31. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](postcss/postcss@8.4.23...8.4.31) --- updated-dependencies: - dependency-name: postcss dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> (cherry picked from commit 3c5079e) * check cssRules existence before css variables are get from stylesheet (cherry picked from commit 367cda2) * checkstyle remove unused extra lines (cherry picked from commit 5f8a9de) * 107664: Normalized ePerson & group edit url and moved error message to translation file * Bump @babel/traverse from 7.21.4 to 7.23.2 Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.4 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> (cherry picked from commit 97f7a5e) * Revert "Check cssRules before css variables are read from stylesheet (DSpace#2454)" This reverts commit fa79c35. (cherry picked from commit 6f73b65) * Update email-request-copy.component.html Message is optional: remove req in [disabled] (cherry picked from commit 94c756d) * Fix RequestService test failing because of different lastUpdated time (cherry picked from commit fb31533) * Use gap instead of individual paddings for header icons (cherry picked from commit 9f2a1d0) * Themed LangSwitchComponent (cherry picked from commit f9b4460) * Applied same gap between header icons in the dspace theme and made the search field non-focusable when collapsed (cherry picked from commit 58d31dd) * Fixed invalid html structure the ExpandableNavbarSectionComponent had an ul tag containing non-li tags (cherry picked from commit fa56d5d) * Added Serbian cyrilic translation and corrected Serbian latin translation. (cherry picked from commit ad12e5a) * Added Serbian cyrilic translation and corrected Serbian latin translation. (cherry picked from commit aa9e12d) * Merge branch 'fix-display-order-authentication-methods_contribute-7.4' into fix-display-order-authentication-methods_contribute-7.6 * Added themed-user-menu component. * Corrected missing semicolon. * Replaced tags for ds-user-menu. * Included user-menu component in custom theme. * Removed default value from inExpandableNavbar. * [DURACOM-190] Fix i18n labels in vocabulary-treeview (cherry picked from commit b321d6f) * [DURACOM-190] Fix alignment in vocabulary-treeview (cherry picked from commit feb2b2b) * allow to insert multi-line scope notes in MD field registry (cherry picked from commit 5bc5dd8) * Added support for changing the color of the navbar (cherry picked from commit f6649e1) * Fixed header bg color not being set in default (no) theme (cherry picked from commit 14b1ce5) * Fixed breadcrumb padding using incorrect syntax (cherry picked from commit 6c48238) * Added new variables for the expandable navbar section (cherry picked from commit 2ca2a38) * New themed components & minor CSS fixes (DSpace#2442) * 100839: Created themeable BrowseByComponent * 100839: Added themed BrowseByComponent to custom theme * 100839: Added themed BrowseEntryListElementComponent to custom theme * Added PersonComponent to custom theme * Themed LogInComponent * Fix focus on navbar using different color * Fix ccLicense checkbox margin * Fix long search facets name not displaying correctly * Removed RecentItemListComponent's unnecessary float causing alignment issues when adding components underneath it * Themed RegisterEmailFormComponent * more error-prone check of cssRules existence before css variables are get from stylesheet check the existence off cssRules property before the variables are readed from this stylesheet DSpace#2450 (cherry picked from commit 4dd334f) * fix(pt-BR.json5): fix and update the language file Fix and update the pt-BR language file * fix(pt-BR.json5): fix and update the language file and previous errors Fix and update the pt-BR language file and the previous errors * Merged in DSC-106 (pull request #643) [DSC-106] Date input usable via keyboard using tab Approved-by: Vincenzo Mecca (cherry picked from commit 543b4ad) * [DURACOM-194] fixed year input value on input type date (cherry picked from commit c412c1f) * Ensure e2e tests run in production mode (cherry picked from commit 7dcaae8) * Specify user agent to avoid being detected as a "bot" by backend (cherry picked from commit 72cda41) * [DURACOM-177] gap-* classes (cherry picked from commit 930a381) * [DURACOM-177] Use gap-* classes on navbar buttons (cherry picked from commit a356295) * [DURACOM-197] Fix cache issue when depositing a submission (cherry picked from commit f992ff6) * Add UI nameSpace context path to Mirador viewer path (cherry picked from commit 3228c45) * 108055: fix issue 8686: unable to enter freetext values in the submission form for vocabulary (cherry picked from commit 0dcf6cb) * 108055: add user input to tag list (cherry picked from commit aac58e6) * Support type-bind of elements based on repeatable list type-bound element (CHECKBOX_GROUP) (cherry picked from commit 09aaa46) * [DURACOM-195] Simplify vertical spacing in header and breadcrumbs (cherry picked from commit a3e6d9b) * [DURACOM-180] Prevent header from covering media viewer controls (dspace theme) (cherry picked from commit 0208a78) * [DURACOM-180] Prevent header from covering media viewer controls (base theme) (cherry picked from commit c042cd8) * Update condition to render show more node `loadingNode` ends up being the current `node` after clicking it preventing it from rendering when more pages available. Update community list component spec Make the show more flat node id unique The nodes with same id are conflicting when added to the tree. Clicking on the second with same id places the show more button under the wrong branch and expands the wrong page. (cherry picked from commit 11d3771) * Filter expanded nodes by id Co-Authored-By: Art Lowel <1567693+artlowel@users.noreply.github.com> (cherry picked from commit dc2ef98) * Added skip to main content button * Limit getMembers() and getSubgroups() to only fetching one object. These lists are only used to find the size of each (cherry picked from commit 0da7c15) * Remove isSubgroupOfGroup() functionality as it loads every subgroup at once. Bad peformance for large groups (cherry picked from commit 97479a2) * Fix bug where linked Community/Collection info was sometimes listed many times in a row (cherry picked from commit 2292366) * Remove "isMemberOfGroup()" from members-list component. (cherry picked from commit 43d3719) * Remove unnecessary EpersonDtoModel. Rework code and tests to use EPerson instead. (cherry picked from commit bffae54) * Also remove unnecessary EpersonDtoModel from extending ReviewersListComponent. Remove "memberOfGroup" from EpersonDtoModel as it is no longer used (cherry picked from commit b598f1b) * Fix subgroups-list specs so they align with new members-list specs (cherry picked from commit 64f968b) * Refactor members-list and subgroups-list components to use new isNotMemberOf endpoints (via services) (cherry picked from commit 8a10888) * Refactor subgroups-list component's "search()" to act same as member-list component's "search()". Avoids reloading the page as frequently. (cherry picked from commit 2eb1a17) * Remove seemingly unnecessary page reload after new search. (cherry picked from commit d163db1) * Address feedback. Run empty search on init. Reorder sections to list current members before add members (for both eperson and groups) (cherry picked from commit 9117ac0) * Bump axios from 0.27.2 to 1.6.0 Bumps [axios](https://github.com/axios/axios) from 0.27.2 to 1.6.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v0.27.2...v1.6.0) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> (cherry picked from commit ef9f31d) * 108045: Fix for repeatable date field labels * Fixed test * Fix handle redirect not working with custom nameSpace (cherry picked from commit b894dce) * adding new access-status-list-element-badge css classes (cherry picked from commit e847e4e) * Create new access-status-badge.component.scss (cherry picked from commit 3bf2eb1) * new accessStatusClass atribute (cherry picked from commit 6378dbe) * remove replaceAll and use an object property (cherry picked from commit c7eae92) * adding ngOnDestroy for dealing with unsubscribe (cherry picked from commit 75b788d) * 107671: Fix handle theme not working with canonical prefix https://hdl.handle.net/ (cherry picked from commit a7faf7d) * 107671: Split Theme model & ThemeConfig classes in separate files to prevent circular dependencies (cherry picked from commit da8880e) * 107671: Fixed bug where config property would still sometimes be undefined whey calling the ngOnDestroy in the ThemedComponent (cherry picked from commit 4e54cca) * 107671: Fixed theme matching by handle not working in production mode (cherry picked from commit 7529ed8) * [DURACOM-202] feature: item edit pages are accessible by administrator (cherry picked from commit ccf1cc4) * [DURACOM-202] refactor: code (cherry picked from commit b6d515f) * [DURACOM-202] refactor: code (cherry picked from commit 6f64db1) * fix: random order of buttons in status tab (cherry picked from commit 35f8b55) * refactor: code (cherry picked from commit fbbbc18) * 107685: menu-component re-render section on store update * 107902: Created test case for 2f26e68 * Update version tag for release * Fixed lint errors * Fixed compilation errors which were created by mistakes from upgrade * Fixed wrong resolved conlicts for test files and copied yarn.lock from the dspace761 image * Update charts, toggle dependencies in the package.json * updated yarn.lock - from 7.6.1 and run yarn install * Revert "updated yarn.lock - from 7.6.1 and run yarn install" This reverts commit 2dabb71. * updated yarn.lock - from 7.6.1 and run yarn install * Fixed lint errors * Fixed semicolon lint error. * update clarin item statistics * After deleting `.browserlistrc` the errors are gone.. that file is totally empty, it isn't into Vanilla 7.6. and makes me so many problems.. ReactiveX/rxjs#5976 * Fixed clarin-zip-download-page.component.spec.ts tests - if payload was null it throws an error * Fixed section-form.component.spec.ts tests - delay was missing in tests and some duplicate of the code has occurred. * Checkout vocabulary-treeview.component.html file because it was removed during resolving conflicts. * Updated router.mock.ts - one method was missing from clarin routerstub * Fixed log-in-password.component.spec.ts - authService was used in the wrong way * Removed set timeout in tests `section-form.component.spec.ts` * Removed duplicate cypress config file * Updated complex input field test * spy on reinitializeForm method * Fixed warn in the `bypassSecurityTrustResourceUrl` when the url contains `undefined` * Removed `id` - it doesn't help in the failing tests. * Commented out failing tests. * Renamed integration test names following a new cypress version. * WorkspaceitemsEditPage resolver was missing. * Removed green line from the navbar. * Fixed crossing home page into nav and footer. * Fixed home page to the navbar and footer * Added missing messages into en.json * `my-cs` main content must be used, I updated margin of home page * Updated padding between language flags * Show license type in the default grey color in the item view box * Updated license selector padding and colors * Do not show empty item type box in the item view box * The sponsor values are showed in the Item View. * Added unit tests for testing showing of the Acknowledgement * Added messages for the acknowledgement component. * Fixed lint errors from the `cs.json5` * Added translate module into clarin-sponsor-item-field.component.spec.ts because it was missing * Updated IT database dump - a DB was updated by Vanilla * Fixed `collection-statistics.cy.ts` test, it wanted to see `menu` option which was removed in the CLARIN-DSpace update. * Call index-discovery in the docker-compose-ci.yml instead of `cli.assetstore.yml` because it is not run from the `cli.assetstore.yml` * Commented out the `login-modal.cy.ts` because the CLARIN-DSpace has different login * Commented out the accessibility violations in the `my-dspace.cy.ts` * Fixed calling indexing of the solr * Commented community statistics menu from the `community-statistics.cy` integration test * Commented out the search navbar tests * Login and language flags was covered by the menu navbar - I updated z-index * Commented out item-page accessibility tests * Updated submission.cy.ts process - license granting * Commented out the item statistics menu test * Commented out the accessibility tests * Added missing .env properties into `cypress` * Fixed failing IT --------- Co-authored-by: Tim Donohue <tim.donohue@lyrasis.org> Co-authored-by: Sergio Fernández Celorio <sfernandez@arvo.es> Co-authored-by: Hugo Dominguez <hugo@escire.lat> Co-authored-by: Alan Orth <alan.orth@gmail.com> Co-authored-by: Nona Luypaert <nona.luypaert@atmire.com> Co-authored-by: Kristof De Langhe <kristof.delanghe@atmire.com> Co-authored-by: José Carvalho <jnsc@ua.pt> Co-authored-by: Sascha Szott <szott@gmx.de> Co-authored-by: Alexandre Vryghem <alexandre@atmire.com> Co-authored-by: Mark H. Wood <mwood@iu.edu> Co-authored-by: Yana De Pauw <yana@atmire.com> Co-authored-by: Art Lowel <art.lowel@gmail.com> Co-authored-by: DSpace Bot <68393067+dspace-bot@users.noreply.github.com> Co-authored-by: Hrafn Malmquist <hrafn.malmquist@gmail.com> Co-authored-by: imilos <imilos@gmail.com> Co-authored-by: Andrea Barbasso <´andrea.barbasso@4science.com´> Co-authored-by: Davide Negretti <davide.negretti@4science.com> Co-authored-by: Yury Bondarenko <ybnd@tuta.io> Co-authored-by: Marie Verdonck <maria.verdonck@atmire.com> Co-authored-by: Janne Jensen <micrograph@posteo.de> Co-authored-by: Pascal-Nicolas Becker <pnbecker@users.noreply.github.com> Co-authored-by: Jens Vannerum <jens.vannerum@atmire.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gantner, Florian Klaus <florian.gantner@uni-bamberg.de> Co-authored-by: Agustina Martinez <am857@cam.ac.uk> Co-authored-by: Eike Martin Löhden <eike.loehden@ub.uni-marburg.de> Co-authored-by: Marco Aurelio Cardoso <marcoaurelio.cardoso@gmail.com> Co-authored-by: Alisa Ismailati <alisa.ismailati@atis.al> Co-authored-by: Alisa Ismailati <alisa.ismailati@4science.com> Co-authored-by: Giuseppe Digilio <giuseppe.digilio@4science.com> Co-authored-by: William Welling <wwelling@tamu.edu> Co-authored-by: Andreas Mahnke <andreas.mahnke@leuphana.de> Co-authored-by: lotte <lotte_hofstede@hotmail.com> Co-authored-by: Paulo Graça <paulo1978@gmail.com> Co-authored-by: Vlad Nouski <uladzislau.nouski@4science.com>
1 parent 8eb4334 commit 8fc0f08

File tree

538 files changed

+30195
-29607
lines changed

Some content is hidden

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

538 files changed

+30195
-29607
lines changed

.eslintrc.json

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"eslint-plugin-jsdoc",
88
"eslint-plugin-deprecation",
99
"unused-imports",
10-
"eslint-plugin-lodash"
10+
"eslint-plugin-lodash",
11+
"eslint-plugin-jsonc"
1112
],
1213
"overrides": [
1314
{
@@ -224,6 +225,42 @@
224225
"@angular-eslint/template/no-negated-async": "off",
225226
"@angular-eslint/template/eqeqeq": "off"
226227
}
228+
},
229+
{
230+
"files": [
231+
"*.json5"
232+
],
233+
"extends": [
234+
"plugin:jsonc/recommended-with-jsonc"
235+
],
236+
"rules": {
237+
"no-irregular-whitespace": "error",
238+
"no-trailing-spaces": "error",
239+
"jsonc/comma-dangle": [
240+
"error",
241+
"always-multiline"
242+
],
243+
"jsonc/indent": [
244+
"error",
245+
2
246+
],
247+
"jsonc/key-spacing": [
248+
"error",
249+
{
250+
"beforeColon": false,
251+
"afterColon": true,
252+
"mode": "strict"
253+
}
254+
],
255+
"jsonc/no-dupe-keys": "off",
256+
"jsonc/quotes": [
257+
"error",
258+
"double",
259+
{
260+
"avoidEscape": false
261+
}
262+
]
263+
}
227264
}
228265
]
229266
}

.github/disabled-workflows/issue_opened.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow runs whenever a new issue is created
22
name: Issue opened
33

4-
on:
4+
on:
55
issues:
66
types: [opened]
77

@@ -16,8 +16,8 @@ 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.3.0
20-
# Note, the authentication token below is an ORG level Secret.
19+
uses: actions/add-to-project@v0.5.0
20+
# 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
2323
# This is necessary because the "DSpace Backlog" project is an org level project (i.e. not repo specific)

.github/workflows/build.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,14 @@ jobs:
2525
DSPACE_REST_PORT: 8080
2626
DSPACE_REST_NAMESPACE: '/server'
2727
DSPACE_REST_SSL: false
28+
# Spin up UI on 127.0.0.1 to avoid host resolution issues in e2e tests with Node 18+
2829
DSPACE_UI_HOST: 127.0.0.1
2930
DSPACE_UI_PORT: 4000
31+
# Ensure all SSR caching is disabled in test environment
32+
DSPACE_CACHE_SERVERSIDE_BOTCACHE_MAX: 0
33+
DSPACE_CACHE_SERVERSIDE_ANONYMOUSCACHE_MAX: 0
34+
# Tell Cypress to run e2e tests using the same UI URL
35+
CYPRESS_BASE_URL: http://127.0.0.1:4000
3036
# When Chrome version is specified, we pin to a specific version of Chrome
3137
# Comment this out to use the latest release
3238
#CHROME_VERSION: "90.0.4430.212-1"
@@ -97,11 +103,13 @@ jobs:
97103
# Upload code coverage report to artifact (for one version of Node only),
98104
# so that it can be shared with the 'codecov' job (see below)
99105
# NOTE: Angular CLI only supports code coverage for specs. See https://github.com/angular/angular-cli/issues/6286
100-
# Upload coverage reports to Codecov (for one version of Node only)
101-
# https://github.com/codecov/codecov-action
102-
- name: Upload coverage to Codecov.io
103-
uses: codecov/codecov-action@v3
104-
if: matrix.node-version == '16.x'
106+
- name: Upload code coverage report to Artifact
107+
uses: actions/upload-artifact@v3
108+
if: matrix.node-version == '18.x'
109+
with:
110+
name: dspace-angular coverage report
111+
path: 'coverage/dspace-angular/lcov.info'
112+
retention-days: 14
105113

106114
# Using docker-compose start backend using CI configuration
107115
# and load assetstore from a cached copy
@@ -115,7 +123,7 @@ jobs:
115123
# https://github.com/cypress-io/github-action
116124
# (NOTE: to run these e2e tests locally, just use 'ng e2e')
117125
- name: Run e2e tests (integration tests)
118-
uses: cypress-io/github-action@v4
126+
uses: cypress-io/github-action@v5
119127
with:
120128
# Run tests in Chrome, headless mode (default)
121129
browser: chrome

.github/workflows/codescan.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
# because CodeQL requires a fresh build with all tests *disabled*.
66
name: "Code Scanning"
77

8-
# Run this code scan for all pushes / PRs to main branch. Also run once a week.
8+
# Run this code scan for all pushes / PRs to main or maintenance branches. Also run once a week.
99
on:
1010
push:
11-
branches: [ main ]
11+
branches:
12+
- main
13+
- 'dspace-**'
1214
pull_request:
13-
branches: [ main ]
15+
branches:
16+
- main
17+
- 'dspace-**'
1418
# Don't run if PR is only updating static documentation
1519
paths-ignore:
1620
- '**/*.md'
@@ -46,4 +50,4 @@ jobs:
4650

4751
# Perform GitHub Code Scanning.
4852
- name: Perform CodeQL Analysis
49-
uses: github/codeql-action/analyze@v2
53+
uses: github/codeql-action/analyze@v2

.github/workflows/docker.yml

Lines changed: 60 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ permissions:
1515

1616
jobs:
1717
docker:
18-
# Ensure this job never runs on forked repos. It's only executed for our repo
19-
if: github.repository == 'dataquest-dev/dspace-angular'
18+
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
19+
if: github.repository == 'dspace/dspace-angular'
2020
runs-on: ubuntu-latest
2121
env:
2222
# Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action)
@@ -32,10 +32,6 @@ jobs:
3232
# We turn off 'latest' tag by default.
3333
TAGS_FLAVOR: |
3434
latest=false
35-
# Architectures / Platforms for which we will build Docker images
36-
# If this is a PR, we ONLY build for AMD64. For PRs we only do a sanity check test to ensure Docker builds work.
37-
# If this is NOT a PR (e.g. a tag or merge commit), also build for ARM64.
38-
PLATFORMS: linux/amd64${{ github.event_name != 'pull_request' && ', linux/arm64' || '' }}
3935
4036
steps:
4137
# https://github.com/actions/checkout
@@ -65,7 +61,7 @@ jobs:
6561
id: meta_build
6662
uses: docker/metadata-action@v4
6763
with:
68-
images: dataquest/dspace-angular
64+
images: dspace/dspace-angular
6965
tags: ${{ env.IMAGE_TAGS }}
7066
flavor: ${{ env.TAGS_FLAVOR }}
7167

@@ -84,6 +80,63 @@ jobs:
8480
tags: ${{ steps.meta_build.outputs.tags }}
8581
labels: ${{ steps.meta_build.outputs.labels }}
8682

83+
#############################################################
84+
# Build/Push the 'dspace/dspace-angular' image ('-dist' tag)
85+
#############################################################
86+
dspace-angular-dist:
87+
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
88+
if: github.repository == 'dspace/dspace-angular'
89+
runs-on: ubuntu-latest
90+
91+
steps:
92+
# https://github.com/actions/checkout
93+
- name: Checkout codebase
94+
uses: actions/checkout@v3
95+
96+
# https://github.com/docker/setup-buildx-action
97+
- name: Setup Docker Buildx
98+
uses: docker/setup-buildx-action@v2
99+
100+
# https://github.com/docker/setup-qemu-action
101+
- name: Set up QEMU emulation to build for multiple architectures
102+
uses: docker/setup-qemu-action@v2
103+
104+
# https://github.com/docker/login-action
105+
- name: Login to DockerHub
106+
# Only login if not a PR, as PRs only trigger a Docker build and not a push
107+
if: github.event_name != 'pull_request'
108+
uses: docker/login-action@v2
109+
with:
110+
username: ${{ secrets.DOCKER_USERNAME }}
111+
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
112+
113+
# https://github.com/docker/metadata-action
114+
# Get Metadata for docker_build_dist step below
115+
- name: Sync metadata (tags, labels) from GitHub to Docker for 'dspace-angular-dist' image
116+
id: meta_build_dist
117+
uses: docker/metadata-action@v4
118+
with:
119+
images: dspace/dspace-angular
120+
tags: ${{ env.IMAGE_TAGS }}
121+
# As this is a "dist" image, its tags are all suffixed with "-dist". Otherwise, it uses the same
122+
# tagging logic as the primary 'dspace/dspace-angular' image above.
123+
flavor: ${{ env.TAGS_FLAVOR }}
124+
suffix=-dist
125+
126+
- name: Build and push 'dspace-angular-dist' image
127+
id: docker_build_dist
128+
uses: docker/build-push-action@v4
129+
with:
130+
context: .
131+
file: ./Dockerfile.dist
132+
platforms: ${{ env.PLATFORMS }}
133+
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
134+
# but we ONLY do an image push to DockerHub if it's NOT a PR
135+
push: ${{ github.event_name != 'pull_request' }}
136+
# Use tags / labels provided by 'docker/metadata-action' above
137+
tags: ${{ steps.meta_build_dist.outputs.tags }}
138+
labels: ${{ steps.meta_build_dist.outputs.labels }}
139+
87140
deploy:
88141
needs: docker
89142
uses: dataquest-dev/dspace-angular/.github/workflows/deploy.yml@dtq-dev
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow checks open PRs for merge conflicts and labels them when conflicts are found
2+
name: Check for merge conflicts
3+
4+
# Run this for all pushes (i.e. merges) to 'main' or maintenance branches
5+
on:
6+
push:
7+
branches:
8+
- main
9+
- 'dspace-**'
10+
# So that the `conflict_label_name` is removed if conflicts are resolved,
11+
# we allow this to run for `pull_request_target` so that github secrets are available.
12+
pull_request_target:
13+
types: [ synchronize ]
14+
15+
permissions: {}
16+
17+
jobs:
18+
triage:
19+
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
20+
if: github.repository == 'dspace/dspace-angular'
21+
runs-on: ubuntu-latest
22+
permissions:
23+
pull-requests: write
24+
steps:
25+
# See: https://github.com/prince-chrismc/label-merge-conflicts-action
26+
- name: Auto-label PRs with merge conflicts
27+
uses: prince-chrismc/label-merge-conflicts-action@v3
28+
# Ignore any failures -- may occur (randomly?) for older, outdated PRs.
29+
continue-on-error: true
30+
# Add "merge conflict" label if a merge conflict is detected. Remove it when resolved.
31+
# Note, the authentication token is created automatically
32+
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token
33+
with:
34+
conflict_label_name: 'merge conflict'
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
conflict_comment: |
37+
Hi @${author},
38+
Conflicts have been detected against the base branch.
39+
Please [resolve these conflicts](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/about-merge-conflicts) as soon as you can. Thanks!

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ package-lock.json
3838
.env
3939
/nbproject/
4040

41+
junit.xml
42+
43+
/src/mirador-viewer/config.local.js
44+
4145
# import data python module
4246
python_data_import/debug.log.txt
4347
python_data_import/logs.txt
4448
python_data_import/date.txt
4549
*/__pycache__/
46-
47-
junit.xml

Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,20 @@ EXPOSE 4000
1313

1414
# We run yarn install with an increased network timeout (5min) to avoid "ESOCKETTIMEDOUT" errors from hub.docker.com
1515
# See, for example https://github.com/yarnpkg/yarn/issues/5540
16-
RUN yarn install --network-timeout 2000000
16+
RUN yarn install --network-timeout 300000
17+
18+
# When running in dev mode, 4GB of memory is required to build & launch the app.
19+
# This default setting can be overridden as needed in your shell, via an env file or in docker-compose.
20+
# See Docker environment var precedence: https://docs.docker.com/compose/environment-variables/envvars-precedence/
21+
ENV NODE_OPTIONS="--max_old_space_size=4096"
1722

1823
# On startup, run in DEVELOPMENT mode (this defaults to live reloading enabled, etc).
1924
# Listen / accept connections from all IP addresses.
2025
# NOTE: At this time it is only possible to run Docker container in Production mode
21-
# if you have a public IP. See https://github.com/DSpace/dspace-angular/issues/1485
26+
# if you have a public URL. See https://github.com/DSpace/dspace-angular/issues/1485
27+
ENV NODE_ENV development
2228
RUN apk add tzdata
2329
RUN yarn build:prod
2430
RUN npm install pm2 -g
2531
CMD /bin/sh -c "pm2-runtime start dspace-ui.json > /dev/null 2> /dev/null"
32+

README.md

Lines changed: 4 additions & 5 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
```
@@ -413,8 +413,7 @@ dspace-angular
413413
│ ├── merge-i18n-files.ts *
414414
│ ├── serve.ts *
415415
│ ├── sync-i18n-files.ts *
416-
│ ├── test-rest.ts *
417-
│ └── webpack.js *
416+
│ └── test-rest.ts *
418417
├── src * The source of the application
419418
│ ├── app * The source code of the application, subdivided by module/page.
420419
│ ├── assets * Folder for static resources

angular.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,8 @@
272272
"options": {
273273
"lintFilePatterns": [
274274
"src/**/*.ts",
275-
"src/**/*.html"
275+
"src/**/*.html",
276+
"src/**/*.json5"
276277
]
277278
}
278279
}
@@ -281,6 +282,16 @@
281282
},
282283
"cli": {
283284
"analytics": false,
284-
"defaultCollection": "@angular-eslint/schematics"
285+
"schematicCollections": [
286+
"@angular-eslint/schematics"
287+
]
288+
},
289+
"schematics": {
290+
"@angular-eslint/schematics:application": {
291+
"setParserOptionsProject": true
292+
},
293+
"@angular-eslint/schematics:library": {
294+
"setParserOptionsProject": true
295+
}
285296
}
286297
}

0 commit comments

Comments
 (0)