Repository navigation
ufal/dspace-angular#184 Interpolate ${...} placeholders on the Terms of Service page - #185
Open
amadulhaxxani wants to merge 1 commit into
Open
amadulhaxxani wants to merge 1 commit into
amadulhaxxani wants to merge 1 commit into
Conversation
amadulhaxxani
requested review from
kosarko and
kuchtiak-ufal
and
a balanced review from Copilot
October 16, 2026 12:56
There was a problem hiding this comment.
🟢 Approval recommended
The focused interpolation change includes configuration propagation and relevant tests, with no unresolved review findings.
0 open findings
What changed in this PR
Fixes #184 by resolving configurable placeholders on static pages, including Terms of Service, during server-side and browser rendering.
Changes:
- Adds configurable placeholder values with LINDAT defaults and deployment overrides.
- HTML-escapes substitutions and preserves unresolved placeholders with a warning.
- Adds interpolation and configuration-merge tests.
| File | Description |
|---|---|
src/config/static-page-config.interface.ts |
Defines static-page variable configuration. |
src/config/default-app-config.ts |
Supplies default placeholder values. |
src/config/config.util.spec.ts |
Tests partial overrides preserving defaults. |
src/config/config.server.ts |
Exposes static-page configuration to browsers. |
src/config/app-config.interface.ts |
Adds optional static-page configuration. |
src/app/static-page/static-page.component.ts |
Implements escaped placeholder substitution. |
src/app/static-page/static-page.component.spec.ts |
Tests interpolation and edge cases. |
config/config.example.yml |
Documents configuration and overrides. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Problem description
The static Terms of Service page (
/static/terms-of-service) shows${dspace.name},${lr.description.institution},${lr.description.location},${lr.description.city}and${lr.description.country}literally instead of values. The old XMLUI substituted these at runtime; the 2023 move to Angular (commit216209b7f1) copied the HTML without the substitution. Fixes #184.Analysis
staticPage.variables(StaticPageConfig), with defaults indefault-app-config.ts. A deployment can override single keys inconfig.yml; the other defaults are kept.interpolateVariables()inStaticPageComponent, called right after the existing OAI link rewrite. It runs in SSR and in the browser.lodash/escape).${key}in place and logs one warning.staticPageto thepublicConfigwhitelist inconfig.server.ts. Without it,assets/config.jsonhad no values for the browser-only path (yarn start:dev, SSR-error fallback).terms-of-service.htmlis unchanged.yarn lint --quietpasses; 33 unit tests pass;yarn run build:prodexit 0.Problems
config.yml.dspace.name("LINDAT/CLARIAH-CZ Repository") is a display name for this page only. It is not synced with the backenddspace.namefrom REST.publicConfigwhitelist has no unit test. Karma cannot loadconfig.server.ts, because it importsfs. Verified at runtime: the generatedconfig.jsoncontainsstaticPage.variables.Copilot review