Moved MetadataValue methods to separate service#2875
Merged
tdonohue merged 4 commits intoDSpace:mainfrom May 8, 2024
Merged
Conversation
… you HTML to HeadTagService & made its methods protected to make it easier to override them
…e to the new MetadataService
…rvice-for-metadata-operations_contribute-main
8e3d8ce to
548cc2d
Compare
|
Hi @alexandrevryghem, |
…ions_contribute-main # Conflicts: # src/app/core/metadata/metadata.service.spec.ts # src/modules/app/browser-init.service.ts
tdonohue
approved these changes
May 8, 2024
Member
tdonohue
left a comment
There was a problem hiding this comment.
👍 Thanks @alexandrevryghem ! This looks good/correct. I tested it locally and the various <head> tags all still work and not noticing issues with metadata values either.
I am going to flag this as needs documentation as we may need to mention this change in the Release Notes, in case anyone has customized their <head> tags in the older metadata.service.ts, those changes need to move to the new head-tag.service.ts
Member
|
Documented in Release Notes: https://wiki.lyrasis.org/display/DSDOC8x/Release+Notes#ReleaseNotes-BreakingChanges |
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
MetadataValuemethods)Description
This creates a
MetadataServicesimilar 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:
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 classMetadataServicethat can be used for metadata manipulation, this will be the equivalent of the backend metadata serviceThe best way to test this is by simply checking that everything that uses this new service still works
Checklist
yarn lintyarn check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.