Skip to content

MENDELU/Reduce the footer vendor credit to the company name - #1464

Merged
milanmajchrak merged 3 commits into
customer/mendelufrom
mendelu/fe-footer-dataquest-only
Aug 19, 2026
Merged

MENDELU/Reduce the footer vendor credit to the company name#1464
milanmajchrak merged 3 commits into
customer/mendelufrom
mendelu/fe-footer-dataquest-only

Conversation

@MatusBeke

Copy link
Copy Markdown
Collaborator

Drops the Theme by wording from the footer's vendor credit and leaves the company name on its own.

Part of dataquest-dev/dspace-customers#592. Supersedes #1457, which used a copyright sign — the team voted for the plain name instead. MENDELU first; once this is approved the same change goes out to the remaining seven customers.

Before / after

before Theme by on its own line, + dataquest stacked underneath
after + dataquest, single line, nothing else

Screenshot below.

What changed

footer.component.html — the credit was a block-level <p> plus an <a>, which is what forced the two halves onto separate lines in the narrow col-md-2 cell. It is now one line, guarded on the company name:

@if ((themedByCompanyName$ | async)?.payload?.values?.[0]; as companyName) {
  <p class="footer-sign"><a class="dtq-sign" […]>{{ companyName }}</a></p>
}

The guard matters: without it the anchor renders as <a href=""></a> on any stack that does not expose themed.by.company.name — including CI — which is an empty link with no discernible text and fails the footer a11y e2e test on the link-name rule.

footer.component.scss — new .footer-sign block. .footer-sign, .theme-by and .dtq-sign had no rules of their own before; the layout came from Bootstrap utilities alone.

footer.component.tsVarDirective removed from imports. *ngVar was only used for this one credit and the @if replaces it.

en.json5 / cs.json5footer.theme.by.message removed, now unused. Both files still parse (3698 / 3695 keys).

Verification

Run locally against the live dev-6 backend (real MENDELU theme and data), on the compiled build, in both languages:

rendered <a rel="noopener" class="dtq-sign" href="https://www.dataquest.sk/dspace">+ dataquest</a>
text + dataquest (EN and CS identical)
style 17px, weight 600, #fff, white-space: nowrap
footer height 83px — unchanged

Also checked the empty case by making the proxy return 404 for themed.by.company.name: the credit does not render at all, and no empty anchor is left behind.

Notes for the reviewer

  • The leading + in + dataquest comes from the backend property themed.by.company.name and is untouched. Removing it would be a backend change, not a frontend one.
  • The credit stays white to match the nav links beside it. Worth knowing: #fff on this green measures 2.29:1, below the WCAG AA threshold of 4.5:1 — but the nav links next to it already have the same problem, so this PR neither introduces nor fixes it. Better as a separate ticket than as a visual change smuggled in here.
  • Merging this triggers the deploy of instance 8573 on dev-6.

🤖 Generated with Claude Code

The footer credit read "Theme by" stacked above "+ dataquest". Drop the
wording entirely and leave the company name on its own.

The i18n key footer.theme.by.message is now unused and removed from
en.json5 and cs.json5. Nothing in the credit is translated any more, so
English and Czech render identically.

Layout notes:
- The stacking came from a block-level <p> inside the narrow col-md-2 cell.
  The credit is now a single line of text with white-space: nowrap.
- The whole credit is guarded by @if on the company name, the same way the
  base footer component does. Without it the anchor renders as <a href="">
  on stacks that do not expose themed.by.company.name — an empty link with
  no discernible text, which fails the footer a11y e2e test (link-name).
- *ngVar is no longer needed, so VarDirective drops out of the component's
  imports; it had no other use in this template.
- The redundant [title] tooltip is dropped; the link text already supplies
  the accessible name.
- Footer height is unchanged at 83px.

Refs dataquest-dev/dspace-customers#592

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
MatusBeke added a commit that referenced this pull request Aug 18, 2026
@MatusBeke

Copy link
Copy Markdown
Collaborator Author

Footer as it renders with this branch — MENDELU theme, run against the live dev-6 backend:

MENDELU footer with the plain company name

The credit is now just + dataquest on one line. Czech renders identically — only the nav links beside it change language.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the custom theme footer vendor credit to render only the backend-provided company name (single line), removing the translated “Theme by” label and simplifying the template/layout accordingly.

Changes:

  • Replaced *ngVar usage with Angular control flow (@if) and removed VarDirective from the themed footer component.
  • Added dedicated .footer-sign / .dtq-sign styling for the vendor credit.
  • Removed the now-unused footer.theme.by.message translation key from EN/CS dictionaries.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/themes/custom/app/footer/footer.component.ts Drops VarDirective from standalone imports after moving to @if.
src/themes/custom/app/footer/footer.component.html Renders vendor credit as a single guarded line using @if.
src/themes/custom/app/footer/footer.component.scss Introduces .footer-sign styles and link focus/hover behavior.
src/assets/i18n/en.json5 Removes unused footer.theme.by.message key.
src/assets/i18n/cs.json5 Removes unused footer.theme.by.message key (and related commented line).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/themes/custom/app/footer/footer.component.html
Comment thread src/themes/custom/app/footer/footer.component.scss
Addresses review feedback on the footer credit.

When themed.by.company.name resolves but themed.by.url does not, the
anchor rendered as <a href="">, a link that goes nowhere and reloads the
current page on click. Render the name as plain text in that case and keep
the anchor for when the URL is actually available. Verified by returning
404 for themed.by.url alone: the credit stays visible, no anchor is
emitted.

Also set an explicit margin: 0 on .footer-sign. The theme's own
`footer p { margin: 0 }` already neutralises Bootstrap Reboot's
`p { margin-bottom: 1rem }`, so nothing was broken, but pinning it locally
keeps the bar height independent of a rule declared far away.

Refs dataquest-dev/dspace-customers#592

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@MatusBeke

Copy link
Copy Markdown
Collaborator Author

Both review comments addressed in 5d4fef8. I reproduced each one against a real build rather than reasoning about it, by making the local proxy return 404 for individual config properties.

1. [href] when themed.by.url is missing — valid concern, but not for the stated reason.

Angular does not stringify undefined into /undefined here. What it actually renders is an empty attribute:

<a rel="noopener" class="dtq-sign" href="">+ dataquest</a>

The DOM href property then resolves to the current page URL, so there is no unsafe navigation — but it is a link that goes nowhere and reloads the page on click, which is worth fixing.

Fixed by linking only when the URL exists, and falling back to plain text otherwise:

@if ((themedByUrl$ | async)?.payload?.values?.[0]; as companyUrl) {
  <a class="dtq-sign" [href]="companyUrl" rel="noopener">{{ companyName }}</a>
} @else {
  {{ companyName }}
}

Dropping the credit entirely would have been the simpler guard, but the attribution is the point of the element — it still reads fine unlinked. (For reference, the base DSpace footer handles this with || '#', which is also a dead link, just less visibly.)

Verified with themed.by.url 404ing and the company name still resolving: text + dataquest, anchorPresent: false, no empty anchor left behind.

2. <p> and Bootstrap's margin-bottom: 1rem — already neutralised, but pinned anyway.

The theme's own stylesheet declares footer { p { margin: 0; } } (footer.component.scss, lines 9–11), which is more specific than Reboot and already wins. Measured on the compiled build: margin-top: 0px, margin-bottom: 0px, footer height 83px — identical to before the change. Nothing was broken.

That rule lives outside this diff, though, so the concern was fair from the diff alone. I added an explicit margin: 0 to .footer-sign with a comment, so the credit no longer depends on a rule declared 70 lines away.

Verification matrix (compiled build, live dev-6 backend):

scenario result
both properties set <a href="https://www.dataquest.sk/dspace">+ dataquest</a>
themed.by.url missing + dataquest as plain text, no anchor
themed.by.company.name missing credit not rendered at all

Footer height stays 83px in all three.

@milanmajchrak milanmajchrak left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dataquest is not bold on the https://repozitar.mendelu.cz/

Review feedback: the credit came out bold, which production does not do.

The .footer-sign block was carrying font-size: 1.0625rem, font-weight: 600
and letter-spacing from an earlier iteration of this change, when the credit
was being redesigned around a copyright sign. That design was dropped in
favour of the plain company name, but the type overrides stayed behind and
silently restyled the credit.

Measured on https://repozitar.mendelu.cz/ the credit renders at 16px,
weight 400, letter-spacing normal. With those three declarations removed it
inherits exactly that again, verified on the compiled build.

What remains in the block is layout only, not looks: margin: 0 against
Bootstrap Reboot, white-space: nowrap, the colour that replaces the removed
text-white class, and the hover/focus states.

Refs dataquest-dev/dspace-customers#592

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@MatusBeke

Copy link
Copy Markdown
Collaborator Author

@milanmajchrak good catch — fixed in bac855f.

You were right, and the cause was a leftover. The .footer-sign block was still carrying font-size: 1.0625rem, font-weight: 600 and letter-spacing from an earlier iteration of this change, back when the credit was being redesigned around a copyright sign. That design was dropped in favour of the plain company name, but the type overrides stayed behind and silently restyled the credit. Nobody asked for that, and this issue is about removing the wording, not changing the look.

Measured on https://repozitar.mendelu.cz/ today:

production this PR before this PR now
font-size 16px 17px 16px
font-weight 400 600 400
letter-spacing normal 0.012em normal

MENDELU footer, credit no longer bold

What is left in .footer-sign is layout only, not looks:

  • margin: 0 — pins the credit against Bootstrap Reboot's p { margin-bottom: 1rem }
  • white-space: nowrap — stops the name breaking in the narrow col-md-2 cell
  • color: #fff — replaces the text-white class removed from the anchor
  • hover / :focus-visible states

Footer height stays 83px, same as before the change.

Worth noting for the rest of the rollout: this only affected MENDELU. On TUL (#1466), ZCU (#1467, #1468) and the remaining branches the change is a plain deletion of the Theme by line with no CSS added at all, so the credit keeps its existing styling there by construction.

@milanmajchrak
milanmajchrak merged commit 514bd66 into customer/mendelu Aug 19, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants