feat: make "About" and "Help" sections configurable
Description
This pull request introduces configurable Help and About texts to the SciCat Frontend, which addresses the problem described in Issue #1745. Users can now provide the desired texts in the frontend.config as a json item, for instance:
"aboutText": "This catalog allows users to access publicly available data and metadata from experiments and simulations provided by members of the scientific community. All data available has been curated to the best effort and knowledge but is provided without warranty. If you need support or have general questions, please contact us via [email protected]",
The main changes include: Added configurable attributes in AboutComponent class: aboutText accessText termsText termsTextContinued and in the HelpComponent class: docText gettingStartedExtraText whereIsMyDataText howToPublishDataText ingestManualExtraText whereAreMyProposalsExtraText whereAreMySamplesExtraText The attributes were also added to the AppConfigService to manage the configurable values. Added linky module to the HelpComponent to automatically render URLs from text. Unit tests were added for the new configurable attributes in AppConfigService, AboutComponent, and HelpComponent.
Motivation
This update will enable users to easily add or modify institution-specific information such as license details, privacy policies, and help content without requiring code changes.
Fixes:
Please provide a list of the fixes implemented in this PR
- Items added The following attributes to AppConfigService class (app-config-service.ts), and unit tests (app-config-service-spec.ts) aboutText accessText termsText termsTextContinued docText gettingStartedExtraText whereIsMyDataText howToPublishDataText ingestManualExtraText whereAreMyProposalsExtraText whereAreMySamplesExtraText
The following attributes to the AboutComponentClass (about.component.ts), and there reference in the about.component.html using the linky module aboutText accessText termsText termsTextContinued
The following attributes to the HelpComponentClass (about.component.ts), and there reference in the help.component.html using the linky module docText gettingStartedExtraText whereIsMyDataText howToPublishDataText ingestManualExtraText whereAreMyProposalsExtraText whereAreMySamplesExtraText For the HelpComponentClass the linky module was added as an import in help.module.ts.
Changes:
Please provide a list of the changes implemented by this PR
- changes made
Removed hardcoded institution-specific text from about.component.html and help.component.html, making the text configurable from the frontend config file.
Tests included
- [ ] Included for each change/fix? Yes, tests have been added for the new components and bug fixes.
- [ ] Passing? (Merge will not be approved unless this is checked) Yes, all tests are passing.
Documentation
- [ ] swagger documentation updated [required] No, this change does not require updates to the Swagger documentation.
- [ ] official documentation updated [nice-to-have] No
official documentation info
If you have updated the official documentation, please provide PR # and URL of the pages where the updates are included
Backend version
- [ ] Does it require a specific version of the backend No specific backend version required. This change only impacts the frontend.
- which version of the backend is required:
Summary by Sourcery
This pull request introduces configurable Help and About texts to the SciCat Frontend. It removes hardcoded institution-specific text from the about.component.html and help.component.html, making the text configurable from the frontend config file.
New Features:
- Makes the About and Help sections configurable via the frontend config file, allowing users to modify institution-specific information without code changes.
Enhancements:
- Adds the linky module to the HelpComponent to automatically render URLs from text.
Tests:
- Adds unit tests for the new configurable attributes in AppConfigService, AboutComponent, and HelpComponent.
@armandobermudezmartinez any updates on this?
I agree that this PR needs to be refactored to only include the help/about changes.
Even then, this adds only the most basic level of configuration. For #1745 we might want some additional configuration, for instance to change which sections are present.
This Pr contains a really nice feature, but for lack of activity, we are going to close it. We can re-open it if it is still relevant, although we should implement it in two separate ones and needs to be rebased using the latest FE code.