dspace-angular
dspace-angular copied to clipboard
Flexible additional metadata for MyDSpace items
References
- Fixes #1591
Description
Added a configuration section to insert one or multiple metadata at the end of an item description shown in the MyDSpace section.
Instructions for Reviewers
List of changes in this PR:
- Added the
myDSpaceconfiguration section to list all additional metadata. - Added a new section in both
item-detail-preview.component.spec.tsanditem-list-preview.component.htmlto display every metadata present in the configuration. - Updated existing unit tests to ensure the new information is displayed properly.
To display additional values, you can set the configuration to something like:
myDSpace:
additionalMetadataFields:
- dc.identifier.uri
- dc.description.provenance
It is only an example, you can set any value(s) you want at this point. By default, no additional metadata will be displayed.
Note that private metadata (dc.description.provenance) will only be displayed for the administrators, as intended.
Checklist
- [X] 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.
- [X] My PR passes TSLint validation using
yarn run lint - [X] My PR doesn't introduce circular dependencies
- [X] My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
- [X] My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
- [X] If my PR includes new, third-party dependencies (in
package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
@nibou230 : When you have a chance, could you rebase this on the latest main code? It looks like this PR hasn't been updated in a long time, so it's trying to run old Node 12 test (which we no longer require on main) that result in the red x (❌ ) on this PR. Rebasing should fix all that.
Hi @tdonohue, do any weird behaviours are still happening for the cypress integration tests between 14.x and 16.x?
@nibou230 : Yes, unfortunately, we still sometimes get random failures with cypress integration tests. I've just restarted your Node 14 build in this PR as it looks like one of those random failures
@nibou230 : After merging #1791 (which is a larger, but important refactor), this now has some small merge conflicts. I'd appreciate it if you could rebase this again when you get the chance.
@nibou230 : This now has merge conflicts again. I also wanted to add that I'm not sure whether we'll be able to get this into 7.4 (deadline is late this week) as I haven't been able to find reviewers with time to help on this one. If it misses 7.4, I'll move it to the 7.5 board later this week.
@tdonohue this PR is not compatible with https://github.com/DSpace/dspace-angular/pull/1825, which will no longer use the components that have been changed here. It should be discussed on the next meeting which is the best approach.
@nibou230 : Moving this to 7.5, as it has conflicts with the bug fix work in #1825. I think this will require more thinking, especially to better support Entities. Not against the idea of making this metadata more flexible, but it doesn't currently align well with allowing Entities to display different metadata fields in this list of MyDSpace items.
Closing this PR as the developers have let me know this won't be possible to move forward. The code remains here if anyone should wish to pick it back up again in the future.