DSpace Developer Meet-Up and Q&A
1
Priorities for DSpace 8
IIIF Support and/or Basic Image/Video viewer
DSpace 8.0 had a shortened development cycle and DSpace Steering established four priorities
Include major features which just missed the 7.x series of releases
FEATURES INCLUDE
1
New features which empower users (focus on the Admin User Interface)
2
Any other features which existed in 6.x but missed the 7.x series of releases
3
Necessary bug fixes, accessibility fixes, performance improvements & dependency upgrades
4
FEATURES INCLUDE
FEATURES INCLUDE
FEATURES INCLUDE
2
8.0 Statistics
IIIF Support and/or Basic Image/Video viewer
>6,000 lines of code refactored for the dependency upgrades
Testathon revealed a number of bugs which were the result of these upgrades.
Community developers are still resolving them.
DSpace 8.0 release: Approx. June 17-24
3
DSpace 8.0 Feature Preview (Part 1)
OpenAIRE Data Correction & Publication Claim,
COAR Notify, and more…
4
4
A new researcher joins the institution and logins for the first time in the repository.
The publication claim service found most of their publications and prompts for import.
The researcher reviews the list, confirms the authorship and imports
the publication saving a significant amount of time….
5
DSpace 8 Features - Publication Claim
5
6
DSpace 8 Features - OpenAIRE Publication Claim
6
7
DSpace 8 Features - OpenAIRE Publication Claim
7
8
DSpace 8 Features - OpenAIRE Publication Claim
8
9
DSpace 8 Features - OpenAIRE Publication Claim
9
Configurable entities
Researcher Profile
Requires:
10
DSpace 8 Features - OpenAIRE Publication Claim
free icons from https://fontawesome.com/
10
11
DSpace 8 Features - OpenAIRE Publication Claim
11
A repository manager of a repository indexed in OpenAIRE
login in the repository and see the list of improvements and
corrections identified, among others one publication that has a PMID that
was unknown to the repository and a link to a project.
They click on the “accept the suggestion” button and the new information
is stored in the local record.
12
DSpace 8 Features - OpenAIRE Data Correction
12
13
DSpace 8 Features - OpenAIRE Data Correction
13
14
DSpace 8 Features - OpenAIRE Data Correction
14
15
DSpace 8 Features - OpenAIRE Data Correction
15
Your repository must be registered as an OpenAIRE provider
Configurable entities
Researcher Profile
Quality Assurance
Requires:
16
DSpace 8 Features - OpenAIRE Data Correction
free icons from https://fontawesome.com/
16
17
DSpace 8 Features - OpenAIRE Data Correction
17
18
DSpace 8 Features - DSpaceUsers Data Correction
18
19
DSpace 8 Features - DSpaceUsers Data Correction
19
20
DSpace 8 Features - DSpaceUsers Data Correction
20
21
DSpace 8 Features - COAR Notify
I have a publication that uses your dataset
Link to a dataset is in the metadata
check if automatic
notification should
be triggered
LDNMessageConsumer
Link the dataset back to DSpace
21
22
DSpace 8 Features - COAR Notify
22
23
DSpace 8 Features - COAR Notify
23
24
DSpace 8 Features - COAR Notify
24
25
DSpace 8 Features - COAR Notify
25
26
DSpace 8 Features - COAR Notify
26
27
DSpace 8 Features - COAR Notify
27
28
DSpace 8 Features - COAR Notify
28
29
DSpace 8 Features - ROR Integration
29
30
DSpace 8 Features - ROR Integration
30
DSpace 8.0 Feature Preview (Part 2)
Improvements to Processes, embedded Search, Duplicate Detection, Administrative Reports, and more…
31
31
Processes page redesigned
32
32
Processes page redesigned
33
33
Processes page redesigned
34
34
Processes page redesigned
35
35
Basic Duplicate detection
Basic detection mechanism to prevent duplicate items in the repository.
Duplicates can be found:
36
36
Basic Duplicate detection
37
37
Basic Duplicate detection
38
38
Search tab on Community/Collection pages
39
39
Search tab on Community/Collection pages
40
40
Search Facets on Homepage
41
41
Advanced Search filters
42
42
Advanced Search filters
43
43
Add relationships via external sources
44
44
Administrator Reports (beta)
DSpace 8 will introduce basic administrator reports. There are two reports available:
45
45
Administrator Reports (beta)
46
46
Bug fixes
47
47
Overview of Upgrade process from v7 to v8
overview of backend major changes
48
48
Upgrading underlying DSpace 8 dependencies
java -jar [dspace]/webapps/server-boot.jar
in bold the version currently used by the CI and dockerfile
49
49
How to update the server.xml with the embedded Tomcat?
DSpace installation requires you to configure the URIEncoding=”UTF-8” attribute over the Connector in the server.xml luckily this is not required with the embedded tomcat as it is configured by default
Good default are provided also for the X-Forwared-For Header and to trust internal proxies making available out-of-box a production ready configuration.
If you need to customize other aspect of the server.xml (port, extra connector, etc.) you can do that using env properties and/or modifying the spring boot application.properties file
50
50
Update your code base
db.dialect = org.dspace.util.DSpacePostgreSQLDialect
51
51
Major changes in the backend code
52
52
Major changes in SOLR
53
53
Overview of Upgrade process from v7 to v8
overview of frontend major changes
54
54
Upgrading the UI from 7 to 8 - Overview
55
Checkout the DSpace 8 tag from the community github
Merge in your DSpace 7 branch
1. Merge & fix conflicts
$ git checkout -b dspace-8-upgrade dspace-8.0.0
$ git merge prod
56
Why in that order?
1. Merge & fix conflicts
57
1. Merge & fix conflicts
58
Upgrading the UI from 7 to 8 - Overview
59
Switch to node 18 or 20 if you haven’t already
Install the dependencies
2. Upgrade node & install dependencies
$ nvm install 20�$ nvm use 20
$ yarn run clean
$ yarn install
60
Upgrading the UI from 7 to 8 - Overview
61
PR #2750 converted the UI to use standalone components:
3. Upgrade to standalone components
62
Differences to the component decorator:
3. Upgrade to standalone components
@Component({
selector: 'ds-base-login-page',
styleUrls: ['./login-page.component.scss'],
templateUrl: './login-page.component.html',
standalone: true,
imports: [ThemedLogInComponent, TranslateModule],
})
export class LoginPageComponent implements OnDestroy, OnInit {
63
More info on the wiki: https://wiki.lyrasis.org/display/DSPACE/Migration+to+Standalone+Components
3. Upgrade to standalone components
64
Convert your custom components to standalone. Path is optional
Choose the option: “Convert all components, directives and pipes to standalone”
3. Upgrade to standalone components
? Choose the type of migration: (Use arrow keys)
❯ Convert all components, directives and pipes to standalone
Remove unnecessary NgModule classes
Bootstrap the application using standalone APIs
$ ng generate @angular/core:standalone --path src/themes/your-theme-name
65
The script will sometimes not add all required imports to the component decorator
Compare the list of imports in your themed components with the custom theme.
E.g. after the tool
3. Standalone components - Fix imports
@Component({
selector: 'ds-footer',
styleUrls: ['footer.component.scss'],
templateUrl: 'footer.component.html',
standalone: true,
imports: [NgIf, RouterLink]
})
66
The custom theme version:
So copy those imports to your version
3. Standalone components - Fix imports
@Component({
selector: 'ds-footer',
styleUrls: ['footer.component.scss'],
templateUrl: 'footer.component.html',
standalone: true,
imports: [NgIf, RouterLink, AsyncPipe, DatePipe, TranslateModule]
})
67
If you’ve added additional components to your templates and they haven’t been detected by the script you’ll get errors like this, when you build:
The solution is then to add the corresponding component class to the imports:
3. Standalone components - Fix imports
Error: src/themes/workshop/app/shared/object-list/community-list-element/community-list-element.component.html:3:5 - error NG8001: 'ds-thumbnail' is not a known element:
1. If 'ds-thumbnail' is an Angular component, then verify that it is included in the '@Component.imports' of this component.
2. If 'ds-thumbnail' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@Component.schemas' of this component to suppress this message.
3 <ds-thumbnail [thumbnail]="(object.logo | async)?.payload">
imports: [NgIf, RouterLink, ThemedThumbnailComponent]
68
Then the next error is about the async pipe:
So add that as well
3. Standalone components - Fix imports
Error: src/themes/workshop/app/shared/object-list/community-list-element/community-list-element.component.html:3:47 - error NG8004: No pipe found with name 'async'.
3 <ds-thumbnail [thumbnail]="(object.logo | async)?.payload">
imports: [NgIf, RouterLink, ThemedThumbnailComponent, AsyncPipe]
69
Find the correct component class by ctrl/cmd clicking the HTML in your IDE
If that doesn’t work, search for “selector: 'ds-name-of-selector'“
3. Standalone components - Fix imports
@Component({
selector: 'ds-thumbnail,
styleUrls: [],
templateUrl: '../shared/theme-support/themed.component.html',
standalone: true,
imports: [ThumbnailComponent]
})
export class ThemedThumbnailComponent extends ThemedComponent<ThumbnailComponent>
70
Upgrading the UI from 7 to 8 - Overview
71
PR #2343 added stricter ESlint rules
Goals:
4. ESLint - New rules
72
Goals:
4. ESLint - New rules
73
Goals:
4. ESLint - New rules
import { of as observableOf } from 'rxjs/internal/observable/of';
import { of as observableOf } from 'rxjs';
74
Goals:
4. ESLint - New rules
obs$.pipe(
switchMap((v1) => this.someService.someMethod(v1)),
).subscribe((v2) => console.log(v2));
obs$.subscribe((v1) =>
this.someService.someMethod(v1).subscribe((v2) => console.log(v2))
);
75
Run lint-fix to automatically fix most issues
You may get a few errors that can’t be fixed automatically:
4. ESLint - Running ESLint
$ yarn run lint-fix --quiet
src/themes/workshop/app/shared/object-list/community-list-element/community-list-element.component.html�6:24 error Async pipe results should not be negated. @angular-eslint/template/no-negated-async
7:15 error Expected `!==` but received `!=` @angular-eslint/template/eqeqeq
7:54 error Expected `===` but received `==` @angular-eslint/template/eqeqeq
76
“Async pipe results should not be negated”
�Reason: isLoading$ could be undefined, null or 0 too
�Fix it by explicitly checking if it’s false
4. ESLint - Fix issues
<div *ngIf="!(isLoading$ | async)">
<div *ngIf="(isLoading$ | async) === false">
77
“Expected `!==` but received `!=`” or “Expected `===` but received `==`”
�Reason: != and == follow complicated rules. ��E.g. 100 == ‘100’ would be true �true == ‘true’ would be false
Fix it by using !== and ===
4. ESLint - Fix issues
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? ...
<a *ngIf="linkType !== linkTypes.None" [target]="(linkType === linkTypes.ExternalLink) ? ...
78
In DSpace 7, to make MyComponent themeable:
4. ESLint - New themed component rules
79
In DSpace 8:
4. ESLint - New themed component rules
80
becomes:
4. ESLint - New themed component rules
<ds-themed-thumbnail [thumbnail]="(object.logo | async)?.payload">
<ds-thumbnail [thumbnail]="(object.logo | async)?.payload">
81
becomes:
4. ESLint - New themed component rules
@Component({
selector: 'ds-themed-thumbnail,
...
})
export class ThemedThumbnailComponent extends ThemedComponent<ThumbnailComponent>
@Component({
selector: 'ds-thumbnail,
...
})
export class ThemedThumbnailComponent extends ThemedComponent<ThumbnailComponent>
82
becomes:
4. ESLint - New themed component rules
@Component({
selector: 'ds-thumbnail,
...
})
export class ThumbnailComponent implements OnChanges {
@Component({
selector: 'ds-base-thumbnail,
...
})
export class ThumbnailComponent implements OnChanges {
83
Q&A
and
Open Discussion
84