dspace-angular
dspace-angular copied to clipboard
Moved MetadataValue methods to separate service
References
- Fixes #2874 (currently only for the
MetadataValuemethods)
Description
This creates a MetadataService similar to the backend service that can be used for metadata manipulation. By moving these methods out of the model classes we can prevent issues that happen when these classes are cloned (for example from SSR cache to CSR cache). I also chose to put it in a service instead of in a util class, since this easier to use services in the html templates.
Instructions for Reviewers
List of changes in this PR:
- Renamed the current
MetadataServicetoHeadTagServicesince it was not responsible for the metadata operations but only responsible for adding head tags. I also made all it's methods protected to make it easier to extend that class - Created a new
MetadataServicethat can be used for metadata manipulation, this will be the equivalent of the backend metadata service
The best way to test this is by simply checking that everything that uses this new service still works
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 ESLint validation using
yarn lint - [x] My PR doesn't introduce circular dependencies (verified via
yarn check-circ-deps) - [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 libraries/dependencies (in
package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation. - [x] If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
- [x] If my PR fixes an issue ticket, I've linked them together.
Hi @alexandrevryghem, Conflicts have been detected against the base branch. Please resolve these conflicts as soon as you can. Thanks!
Documented in Release Notes: https://wiki.lyrasis.org/display/DSDOC8x/Release+Notes#ReleaseNotes-BreakingChanges