-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moved MetadataValue methods to separate service #2875
Moved MetadataValue methods to separate service #2875
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 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
Documented in Release Notes: https://wiki.lyrasis.org/display/DSDOC8x/Release+Notes#ReleaseNotes-BreakingChanges |
References
MetadataValue
methods)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:
MetadataService
toHeadTagService
since 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 classMetadataService
that 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 lint
yarn check-circ-deps
)package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.