Skip to content

Conversation

belfhi
Copy link

@belfhi belfhi commented Sep 8, 2025

Description

Adds a footer with two new icons, for a link to the privacy statement and to the imprint.
These are a requirement by our data protection officers at DESY.

Changes:

Adds two new configuration options for the frontend:

  • imprintUrl
  • privacyUrl

Summary by Sourcery

Add a privacy and imprint footer to the application by introducing a new component, exposing configuration options for the links, and integrating its styles into the global theme

New Features:

  • Introduce a footer component with Imprint and Privacy links
  • Add imprintUrl and privacyUrl options to application configuration

Enhancements:

  • Include the footer in the main layout and integrate its SCSS theme into global styles

Tests:

  • Update AppConfigService spec with new URL properties and add spec stub for the AppFooterComponent

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and found some issues that need to be addressed.

Blocking issues:

  • Assignment operator used instead of colon in object literal. (link)

General comments:

  • You need to declare AppFooterComponent in your LayoutModule (or convert it to a standalone component) so that is recognized by Angular.
  • There’s a typo in app-config.service.spec.ts using ‘imprintUrl =’ and ‘privacyUrl =’ instead of ‘:’, which will cause a syntax error in the test object literal.
  • The SCSS duplicates background-color definitions and uses !important; consider consolidating styles (e.g. merge theme and component SCSS) and remove !important for cleaner styling.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- You need to declare AppFooterComponent in your LayoutModule (or convert it to a standalone component) so that <app-app-footer> is recognized by Angular.
- There’s a typo in app-config.service.spec.ts using ‘imprintUrl =’ and ‘privacyUrl =’ instead of ‘:’, which will cause a syntax error in the test object literal.
- The SCSS duplicates background-color definitions and uses !important; consider consolidating styles (e.g. merge theme and component SCSS) and remove !important for cleaner styling.

## Individual Comments

### Comment 1
<location> `src/app/app-config.service.spec.ts:58` </location>
<code_context>
   multipleDownloadAction: "http://localhost:3012/zip",
   multipleDownloadEnabled: true,
   multipleDownloadUseAuthToken: false,
+  imprintUrl = "https://example.com/imprint",
+  privacyUrl = "https://example.com/privacy",
   oAuth2Endpoints: [],
   policiesEnabled: true,
</code_context>

<issue_to_address>
Assignment operator used instead of colon in object literal.

Please replace the equals sign with a colon to avoid syntax errors in the object literal.
</issue_to_address>

### Comment 2
<location> `src/app/_layout/app-footer/app-footer.component.html:11` </location>
<code_context>
+          class="toplink"
+          href="{{ imprintUrl }}"
+          target="_blank"
+          rel="noopener"
+        >
+          <mat-icon>description</mat-icon>
</code_context>

<issue_to_address>
Consider adding 'noreferrer' to rel attribute for external links.

This helps prevent referrer information from being shared with external sites.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
          rel="noopener"
=======
          rel="noopener noreferrer"
>>>>>>> REPLACE

</suggested_fix>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +58 to +59
imprintUrl = "https://example.com/imprint",
privacyUrl = "https://example.com/privacy",
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (bug_risk): Assignment operator used instead of colon in object literal.

Please replace the equals sign with a colon to avoid syntax errors in the object literal.

class="toplink"
href="{{ imprintUrl }}"
target="_blank"
rel="noopener"
Copy link
Contributor

Choose a reason for hiding this comment

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

🚨 suggestion (security): Consider adding 'noreferrer' to rel attribute for external links.

This helps prevent referrer information from being shared with external sites.

Suggested change
rel="noopener"
rel="noopener noreferrer"

@Junjiequan
Copy link
Member

Could you include screentshots of the changes in the PR description?

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