Skip to content

Fix #4313 : Align footer content width with main page layout #4334

Open
Saurabh-2607 wants to merge 6 commits intoOWASP:mainfrom
Saurabh-2607:fix/footer-width
Open

Fix #4313 : Align footer content width with main page layout #4334
Saurabh-2607 wants to merge 6 commits intoOWASP:mainfrom
Saurabh-2607:fix/footer-width

Conversation

@Saurabh-2607
Copy link
Copy Markdown
Contributor

Proposed change

Resolves #4313

The footer content currently uses a smaller width compared to the main page sections, which causes the footer to appear visually misaligned with the rest of the page content.

This PR updates the footer container to use the same max-width and horizontal padding as the main layout components, ensuring consistent alignment across the page.

Changes made

  • Updated footer container styling to match the main layout width.
  • Applied consistent max-width and horizontal padding used in other sections.

Result

The footer content now aligns properly with the rest of the page components, improving visual consistency and layout balance.

Screenshots

Before

footer

After

Group 46

Checklist

  • Required: I followed the contributing workflow
  • Required: I verified that my code works as intended and resolves the issue as described
  • Required: I ran make check-test locally: all warnings addressed, tests passed
  • I used AI for code, documentation, tests, or communication related to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 93447888-9d11-43ef-b7bd-dd9e1645a480

📥 Commits

Reviewing files that changed from the base of the PR and between c2e9c76 and b2fac9b.

📒 Files selected for processing (1)
  • frontend/src/components/Footer.tsx
✅ Files skipped from review due to trivial changes (1)
  • frontend/src/components/Footer.tsx

Summary by CodeRabbit

  • Refactor

    • Reworked footer layout into a centered, responsive grid for improved alignment
    • Moved social links into footer sections and removed the separate icon-only row
    • Added a fallback "Socials" section when no social-labeled section exists
  • Style

    • Adjusted spacing and link styling for better visual grouping and icon+text alignment
    • Unified footer bottom content so copyright and optional version display align consistently
    • Social links include accessible labels for screen readers

Walkthrough

Refactors Footer layout to a single centered responsive grid, changes section rendering to use a normalized sections list (detecting social sections), renders social links with icons inline (removing previous icon-only block), and adds a fallback Socials section in constants; bottom copyright/version markup reorganized.

Changes

Cohort / File(s) Summary
Footer Layout & Rendering
frontend/src/components/Footer.tsx
Replaced wrapper with mx-auto max-w-6xl responsive grid; compute hasSocialSection and normalizedFooterSections; render social links inline by matching link.text to footerIcons (icon + label, inline-flex styling, aria-label), remove separate icon-only block, and adjust bottom copyright/version markup.
Footer Sections Constants
frontend/src/utils/constants.ts
Added Socials section to exported footerSections, mapping footerIcons into { href, text } links as a fallback socials column.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • arkid15r
  • kasya
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning While the PR adds a new "Socials" column in the footer (visible in the after screenshot), this change is not mentioned in the PR description or objectives from #4313, representing out-of-scope modifications beyond the stated width alignment goal. Clarify whether the "Socials" column addition was intentional or should be removed; if intentional, document it in the PR description as a related structural improvement.
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 (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and clearly identifies the main objective: aligning footer content width with the main page layout to fix issue #4313, matching the primary change described in the PR summary.
Description check ✅ Passed The description directly addresses the linked issue #4313 by explaining the footer width misalignment problem and how the changes fix it with consistent max-width and horizontal padding.
Linked Issues check ✅ Passed The PR successfully addresses issue #4313 by applying consistent max-width (max-w-6xl) and horizontal padding (mx-auto) to the footer container, aligning it with main layout components as required.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

cubic-dev-ai[bot]
cubic-dev-ai bot previously approved these changes Mar 22, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Copy link
Copy Markdown
Contributor

@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.

🧹 Nitpick comments (2)
frontend/src/utils/constants.ts (1)

105-108: Keep socials fully data-driven.

This map drops the icon identity and is why frontend/src/components/Footer.tsx has to recover it by matching link.text back against footerIcons. That works today, but a copy change will silently remove the icon. Prefer carrying a stable social key or the icon itself on each generated link.

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

In `@frontend/src/utils/constants.ts` around lines 105 - 108, The footer mapping
drops icon identity by mapping footerIcons to { href, text }, causing Footer.tsx
to re-infer icons from link.text; change the mapping in the footer data (where
footerIcons is transformed into the links array) to carry a stable identifier or
the icon itself (e.g., include a key like social.key or an icon reference) so
Footer.tsx can use that explicit field instead of matching on link.text; update
any consumers (Footer.tsx) to read the new property (e.g., link.key or
link.icon) and remove the brittle text-based lookup.
frontend/src/components/Footer.tsx (1)

33-33: Avoid hardcoding the current section count into the grid template.

footerSections is data-driven now, but this class is pinned to five tracks. The next add/remove will need a matching class edit here, which is easy to miss. An auto-fit template would keep the layout aligned with the data.

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

In `@frontend/src/components/Footer.tsx` at line 33, The grid template is
hardcoded to five columns; update the div in Footer.tsx (the element with class
"grid w-full ... md:grid-cols-[repeat(5,max-content)]") to use an auto-fitting
template so columns follow the footerSections data. Replace
md:grid-cols-[repeat(5,max-content)] with an auto-fit/minmax variant such as
md:grid-cols-[repeat(auto-fit,minmax(0,max-content))] (or
md:grid-cols-[repeat(auto-fit,max-content)]), so the grid automatically creates
columns to match footerSections without manual edits.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@frontend/src/components/Footer.tsx`:
- Line 33: The grid template is hardcoded to five columns; update the div in
Footer.tsx (the element with class "grid w-full ...
md:grid-cols-[repeat(5,max-content)]") to use an auto-fitting template so
columns follow the footerSections data. Replace
md:grid-cols-[repeat(5,max-content)] with an auto-fit/minmax variant such as
md:grid-cols-[repeat(auto-fit,minmax(0,max-content))] (or
md:grid-cols-[repeat(auto-fit,max-content)]), so the grid automatically creates
columns to match footerSections without manual edits.

In `@frontend/src/utils/constants.ts`:
- Around line 105-108: The footer mapping drops icon identity by mapping
footerIcons to { href, text }, causing Footer.tsx to re-infer icons from
link.text; change the mapping in the footer data (where footerIcons is
transformed into the links array) to carry a stable identifier or the icon
itself (e.g., include a key like social.key or an icon reference) so Footer.tsx
can use that explicit field instead of matching on link.text; update any
consumers (Footer.tsx) to read the new property (e.g., link.key or link.icon)
and remove the brittle text-based lookup.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4b7cc780-6aa2-4153-bb9a-471f88c085da

📥 Commits

Reviewing files that changed from the base of the PR and between 3d7af7a and 640dc33.

📒 Files selected for processing (2)
  • frontend/src/components/Footer.tsx
  • frontend/src/utils/constants.ts

coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 22, 2026
cubic-dev-ai[bot]
cubic-dev-ai bot previously approved these changes Mar 22, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-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.

0 issues found across 1 file (changes from recent commits).

coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 22, 2026
@Saurabh-2607 Saurabh-2607 marked this pull request as ready for review March 22, 2026 04:59
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 82.75862% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.33%. Comparing base (3d7af7a) to head (4b88fbf).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
frontend/src/components/Footer.tsx 82.75% 1 Missing and 4 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4334      +/-   ##
==========================================
- Coverage   99.36%   99.33%   -0.03%     
==========================================
  Files         520      520              
  Lines       16453    16465      +12     
  Branches     2247     2304      +57     
==========================================
+ Hits        16348    16355       +7     
- Misses         62       63       +1     
- Partials       43       47       +4     
Flag Coverage Δ
backend 99.83% <ø> (ø)
frontend 97.93% <82.75%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
frontend/src/components/Footer.tsx 86.95% <82.75%> (-10.11%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d7af7a...4b88fbf. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Collaborator

@kasya kasya left a comment

Choose a reason for hiding this comment

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

Hi @Saurabh-2607 !

Thanks for working on this! I like the width update idea 👍🏼
Left a comment bellow ⬇️

And could you also resolve conflicts that show up right now? Thanks!

coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 30, 2026
@sonarqubecloud
Copy link
Copy Markdown

@Saurabh-2607
Copy link
Copy Markdown
Contributor Author

@kasya Fixed

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Footer Content Width Misalignment

2 participants