Skip to content

Add standard footer#27

Merged
bklaing2 merged 1 commit intomainfrom
footer
Mar 30, 2026
Merged

Add standard footer#27
bklaing2 merged 1 commit intomainfrom
footer

Conversation

@bklaing2
Copy link
Copy Markdown
Member

@bklaing2 bklaing2 commented Mar 30, 2026

Purpose

closes: Add github issue that originated this PR

Approach

Open Questions and Pre-Merge TODOs

  • Need to add a LinkedIn logo

Learning

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

  • New feature (non-breaking change which adds functionality)

  • Breaking change (fix or feature that would cause existing functionality to change)

Reviewer, please remember our guidelines:

  • Be humble in the language and feedback you give, ask don't tell.
  • Consider using positive language as opposed to neutral when offering feedback. This is to avoid the negative bias that can occur with neutral language appearing negative.
  • Offer suggestions on how to improve code e.g. simplification or expanding clarity.
  • Ensure you give reasons for the changes you are proposing.

Summary by CodeRabbit

  • New Features

    • Added a footer section displaying links to key resources, social profiles, and contact information.
    • Added a real-time service status indicator showing system availability and health.
  • Style

    • Updated page layout and styling for improved visual hierarchy and responsive design.

@bklaing2 bklaing2 self-assigned this Mar 30, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

📝 Walkthrough

Walkthrough

The PR introduces a footer feature with service status integration by adding a new icon dependency, creating Footer and StatusIndicator components, updating the root layout structure with grid-based styling, adjusting page margins, and defining URL constants for footer navigation links and status endpoints.

Changes

Cohort / File(s) Summary
Dependencies
package.json
Added runtime dependency @icons-pack/react-simple-icons at version ^13.13.0 for icon rendering support.
URL Configuration
src/constants.ts
Added three exported constants: FOOTER_URLS (footer section link groups), BRAND_URLS (social/contact profiles), and STATUS_URLS (service status endpoints).
Footer Feature
src/app/Footer.tsx
New Footer component with responsive layout and four internal subcomponents (Section, Column, Links, Brands) rendering footer content, social links, and a hard-coded European Commission grant reference.
Status Indicator
src/app/StatusIndicator.tsx
New client-side component using React Query to fetch and display service status from a remote endpoint, with error/loading state handling and severity-based color indicators.
Layout Updates
src/app/layout.tsx, src/app/page.tsx
Updated root layout to render Footer component and restructure body as a grid-based full-viewport layout with bg-datacite-gray background; removed mb-50 margin from main page element.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add standard footer' directly matches the main objective and accurately summarizes the primary change: adding a footer component with supporting URL constants.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch footer

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
src/app/StatusIndicator.tsx (1)

17-18: Propagate React Query's abort signal into fetch.

The queryFn on line 17 ignores cancellation. Passing the provided signal to fetch avoids unnecessary in-flight requests during unmount or refetch cancellation.

🧩 Suggested fix
   const { data, error } = useQuery({
     queryKey: ["status"],
-    queryFn: async () => {
-      const res = await fetch(STATUS_URLS.status);
+    queryFn: async ({ signal }) => {
+      const res = await fetch(STATUS_URLS.status, { signal });
       if (!res.ok) throw new Error("Failed to load status");
       return res.json();
     },
     staleTime: 60 * 1000,
   });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/app/StatusIndicator.tsx` around lines 17 - 18, The queryFn for the status
query ignores React Query's cancellation signal; update the queryFn signature to
accept the provided context (e.g., async ({ signal }) => ...) and pass that
signal into fetch as an option (fetch(STATUS_URLS.status, { signal })) so
in-flight requests are aborted on unmount or cancellation; keep using
STATUS_URLS.status as the URL and propagate the fetch response handling
unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/app/Footer.tsx`:
- Line 106: Footer contains a plain-text LinkedIn link (<a
href={BRAND_URLS.linkedin}>) while other social links use icons; replace the
text link with the SiLinkedin icon component used by the other items, ensuring
you import SiLinkedin and use the same wrapper/link component (the marquee
social link element in Footer) and add the same accessible props
(aria-label="LinkedIn" and appropriate title/role if used elsewhere) so the
LinkedIn entry matches the other icon links.
- Around line 91-109: Add accessible names to icon-only social links by giving
each anchor an aria-label or visible screen-reader-only text: update the <a>
elements that use BRAND_URLS.email, BRAND_URLS.blog, BRAND_URLS.github,
BRAND_URLS.x, BRAND_URLS.mastodon, and BRAND_URLS.youtube (the anchors wrapping
Mail, Newspaper, SiGithub, SiX, SiMastodon, SiYoutube) to include descriptive
aria-labels (e.g., aria-label="Email", "Blog", "GitHub", "X/Twitter",
"Mastodon", "YouTube") or add a visually hidden <span> with that text inside the
anchor so assistive tech can identify each link.

In `@src/constants.ts`:
- Around line 60-63: The datacite URL in the STATUS_URLS constant is using HTTP;
update the STATUS_URLS object so the datacite entry uses
"https://status.datacite.org" instead of "http://status.datacite.org" (the
symbol to change is STATUS_URLS and its datacite key) so any consumers like
StatusIndicator (e.g., StatusIndicator.tsx reading STATUS_URLS.datacite) will
receive the secure HTTPS URL.

---

Nitpick comments:
In `@src/app/StatusIndicator.tsx`:
- Around line 17-18: The queryFn for the status query ignores React Query's
cancellation signal; update the queryFn signature to accept the provided context
(e.g., async ({ signal }) => ...) and pass that signal into fetch as an option
(fetch(STATUS_URLS.status, { signal })) so in-flight requests are aborted on
unmount or cancellation; keep using STATUS_URLS.status as the URL and propagate
the fetch response handling unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3a4092f6-8eae-4cb8-aee5-373c87072ae2

📥 Commits

Reviewing files that changed from the base of the PR and between fe0150f and 0b7ac4c.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (6)
  • package.json
  • src/app/Footer.tsx
  • src/app/StatusIndicator.tsx
  • src/app/layout.tsx
  • src/app/page.tsx
  • src/constants.ts

Comment thread src/app/Footer.tsx
Comment on lines +91 to +109
<a href={BRAND_URLS.email}>
<Mail size={24} />
</a>
<a href={BRAND_URLS.blog}>
<Newspaper size={24} />
</a>
<a href={BRAND_URLS.github}>
<SiGithub size={24} />
</a>
<a href={BRAND_URLS.x}>
<SiX size={24} />
</a>
<a href={BRAND_URLS.mastodon}>
<SiMastodon size={24} />
</a>
<a href={BRAND_URLS.linkedin}>LinkedIn</a>
<a href={BRAND_URLS.youtube}>
<SiYoutube size={24} />
</a>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add accessible names for icon-only social links.

Line 91, Line 94, Line 97, Line 100, Line 103, and Line 107 use icon-only anchors without accessible names, so assistive tech gets unlabeled links.

♿ Suggested fix
 function Brands() {
   return (
     <div className="flex gap-3 my-3">
-      <a href={BRAND_URLS.email}>
-        <Mail size={24} />
+      <a href={BRAND_URLS.email} aria-label="Email DataCite support">
+        <Mail size={24} aria-hidden="true" />
       </a>
-      <a href={BRAND_URLS.blog}>
-        <Newspaper size={24} />
+      <a href={BRAND_URLS.blog} aria-label="DataCite blog">
+        <Newspaper size={24} aria-hidden="true" />
       </a>
-      <a href={BRAND_URLS.github}>
-        <SiGithub size={24} />
+      <a href={BRAND_URLS.github} aria-label="DataCite on GitHub">
+        <SiGithub size={24} aria-hidden="true" />
       </a>
-      <a href={BRAND_URLS.x}>
-        <SiX size={24} />
+      <a href={BRAND_URLS.x} aria-label="DataCite on X">
+        <SiX size={24} aria-hidden="true" />
       </a>
-      <a href={BRAND_URLS.mastodon}>
-        <SiMastodon size={24} />
+      <a href={BRAND_URLS.mastodon} aria-label="DataCite on Mastodon">
+        <SiMastodon size={24} aria-hidden="true" />
       </a>
       <a href={BRAND_URLS.linkedin}>LinkedIn</a>
-      <a href={BRAND_URLS.youtube}>
-        <SiYoutube size={24} />
+      <a href={BRAND_URLS.youtube} aria-label="DataCite on YouTube">
+        <SiYoutube size={24} aria-hidden="true" />
       </a>
     </div>
   );
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<a href={BRAND_URLS.email}>
<Mail size={24} />
</a>
<a href={BRAND_URLS.blog}>
<Newspaper size={24} />
</a>
<a href={BRAND_URLS.github}>
<SiGithub size={24} />
</a>
<a href={BRAND_URLS.x}>
<SiX size={24} />
</a>
<a href={BRAND_URLS.mastodon}>
<SiMastodon size={24} />
</a>
<a href={BRAND_URLS.linkedin}>LinkedIn</a>
<a href={BRAND_URLS.youtube}>
<SiYoutube size={24} />
</a>
<a href={BRAND_URLS.email} aria-label="Email DataCite support">
<Mail size={24} aria-hidden="true" />
</a>
<a href={BRAND_URLS.blog} aria-label="DataCite blog">
<Newspaper size={24} aria-hidden="true" />
</a>
<a href={BRAND_URLS.github} aria-label="DataCite on GitHub">
<SiGithub size={24} aria-hidden="true" />
</a>
<a href={BRAND_URLS.x} aria-label="DataCite on X">
<SiX size={24} aria-hidden="true" />
</a>
<a href={BRAND_URLS.mastodon} aria-label="DataCite on Mastodon">
<SiMastodon size={24} aria-hidden="true" />
</a>
<a href={BRAND_URLS.linkedin}>LinkedIn</a>
<a href={BRAND_URLS.youtube} aria-label="DataCite on YouTube">
<SiYoutube size={24} aria-hidden="true" />
</a>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/app/Footer.tsx` around lines 91 - 109, Add accessible names to icon-only
social links by giving each anchor an aria-label or visible screen-reader-only
text: update the <a> elements that use BRAND_URLS.email, BRAND_URLS.blog,
BRAND_URLS.github, BRAND_URLS.x, BRAND_URLS.mastodon, and BRAND_URLS.youtube
(the anchors wrapping Mail, Newspaper, SiGithub, SiX, SiMastodon, SiYoutube) to
include descriptive aria-labels (e.g., aria-label="Email", "Blog", "GitHub",
"X/Twitter", "Mastodon", "YouTube") or add a visually hidden <span> with that
text inside the anchor so assistive tech can identify each link.

Comment thread src/app/Footer.tsx
<a href={BRAND_URLS.mastodon}>
<SiMastodon size={24} />
</a>
<a href={BRAND_URLS.linkedin}>LinkedIn</a>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

LinkedIn icon is still pending.

Line 106 is plain text while the rest are icon links, so the pre-merge TODO (“add a LinkedIn logo”) appears unresolved.

If helpful, I can generate a patch to swap this to SiLinkedin with matching accessibility labels.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/app/Footer.tsx` at line 106, Footer contains a plain-text LinkedIn link
(<a href={BRAND_URLS.linkedin}>) while other social links use icons; replace the
text link with the SiLinkedin icon component used by the other items, ensuring
you import SiLinkedin and use the same wrapper/link component (the marquee
social link element in Footer) and add the same accessible props
(aria-label="LinkedIn" and appropriate title/role if used elsewhere) so the
LinkedIn entry matches the other icon links.

Comment thread src/constants.ts
Comment on lines +60 to +63
export const STATUS_URLS = {
status: "https://nmtzsv0smzk5.statuspage.io/api/v2/status.json",
datacite: "http://status.datacite.org",
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Use HTTPS for the status page URL.

Line 62 uses http://status.datacite.org; this should be HTTPS to avoid insecure downgrade behavior from a secure app context (and it propagates to src/app/StatusIndicator.tsx Line 43).

🔐 Suggested fix
 export const STATUS_URLS = {
   status: "https://nmtzsv0smzk5.statuspage.io/api/v2/status.json",
-  datacite: "http://status.datacite.org",
+  datacite: "https://status.datacite.org",
 };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export const STATUS_URLS = {
status: "https://nmtzsv0smzk5.statuspage.io/api/v2/status.json",
datacite: "http://status.datacite.org",
};
export const STATUS_URLS = {
status: "https://nmtzsv0smzk5.statuspage.io/api/v2/status.json",
datacite: "https://status.datacite.org",
};
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/constants.ts` around lines 60 - 63, The datacite URL in the STATUS_URLS
constant is using HTTP; update the STATUS_URLS object so the datacite entry uses
"https://status.datacite.org" instead of "http://status.datacite.org" (the
symbol to change is STATUS_URLS and its datacite key) so any consumers like
StatusIndicator (e.g., StatusIndicator.tsx reading STATUS_URLS.datacite) will
receive the secure HTTPS URL.

@bklaing2 bklaing2 merged commit b8d07e1 into main Mar 30, 2026
2 checks passed
@bklaing2 bklaing2 deleted the footer branch March 30, 2026 22:18
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.

1 participant