Skip to content

Feature: Responsive Footer using BackgroundTile for new-design#325

Open
reach2saksham wants to merge 8 commits intoAOSSIE-Org:new-designfrom
reach2saksham:feat/footer
Open

Feature: Responsive Footer using BackgroundTile for new-design#325
reach2saksham wants to merge 8 commits intoAOSSIE-Org:new-designfrom
reach2saksham:feat/footer

Conversation

@reach2saksham
Copy link

@reach2saksham reach2saksham commented Mar 8, 2026

Description

This PR introduces a responsive Footer component for the Resonate website and integrates it with the existing BackgroundTile design component. The footer follows the new design system and ensures a consistent UI across different screen sizes.

Fixes #296

Type of change

  • Added a new Footer component
  • Integrated BackgroundTile for consistent visual styling
  • Implemented responsive layout for mobile, tablet, and desktop
  • Added internationalization (i18n) support
  • Updated translation files for English and Hindi
  • Integrated the footer into the main page layout

Files Modified

  • src/components/ui/Footer.tsx
  • src/components/ui/BackgroundTile.tsx
  • src/app/[locale]/page.tsx
  • src/app/[locale]/globals.css
  • src/messages/en.json
  • src/messages/hi.json
  • Added 2 brand icon assets used in the footer for light and dark mode

Note: This PR depends on the feat/background-tile branch.
It should be reviewed and merged after the BackgroundTile implementation is merged into the base branch.

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • New release (version bump, release preparation)
  • UI/UX update (design changes, interface improvements)

How Has This Been Tested?

  • Checked for console and next errors after implementation
  • Verified layout across multiple screen sizes (Mobile, Tablet, Desktop)
  • Confirmed translations load correctly
  • Ensured compatibility with the BackgroundTile component
  • Checked styling consistency with the new design system

Please include screenshots below if applicable:

footer.mp4

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

Summary by CodeRabbit

Release Notes

  • New Features

    • Added a footer section with navigation links, branding, and social media connections.
    • Introduced dynamic wavy line animations to enhance visual design.
    • Extended internationalization support with footer translations in multiple languages.
  • Style

    • Refined color theming across light and dark modes.
    • Improved responsive layout spacing and container sizing.

@coderabbitai
Copy link

coderabbitai bot commented Mar 8, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b09349d2-f33d-49a7-b2e4-ed1588a751ba

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Introduces a new Footer component with an animated wavy background tile, new semantic CSS tokens for theming tiles and footer elements, and internationalized navigation content. Updates the main page layout to include the footer and adds localization strings for multiple languages.

Changes

Cohort / File(s) Summary
CSS & Theme Tokens
src/app/[locale]/globals.css
Added semantic color tokens for tile backgrounds, lines, and footer sections in light and dark modes. Fixed invalid CSS rgba shorthand syntax for nav backgrounds.
Page Layout Integration
src/app/[locale]/page.tsx
Integrated Footer component into page structure with responsive margin container and main element wrapper.
Animated Visual Components
src/components/ui/BackgroundTile.tsx, src/components/ui/Footer.tsx
Introduced BackgroundTile with canvas-based wavy line animation (RAF loop, ResponsiveObserver, theme color caching, scroll/wheel interaction). Introduced Footer with internationalization support, theme-aware branding, and navigation columns.
Internationalization
src/messages/en.json, src/messages/hi.json
Added Footer localization with Resources, AboutUs, and Social navigation sections, plus copyright and attribution text.

Sequence Diagram

sequenceDiagram
    participant Page as Page Component
    participant Footer as Footer Component
    participant BackgroundTile as BackgroundTile
    participant Canvas as HTML Canvas
    participant ThemeProvider as Theme Provider
    participant i18n as i18n Service
    participant DOM as DOM

    Page->>Footer: Render Footer
    Footer->>ThemeProvider: Query current theme
    ThemeProvider-->>Footer: Return dark/light state
    Footer->>BackgroundTile: Render with heightVh prop
    BackgroundTile->>DOM: Mount canvas element
    BackgroundTile->>BackgroundTile: Initialize RAF animation loop
    BackgroundTile->>DOM: Read --line-color CSS variable
    DOM-->>BackgroundTile: Return theme color
    BackgroundTile->>Canvas: Set up ResizeObserver
    Note over Canvas: User scrolls/uses wheel
    DOM-->>BackgroundTile: Emit scroll/wheel event
    BackgroundTile->>BackgroundTile: Update amplitude target
    BackgroundTile->>BackgroundTile: Advance animation frame
    BackgroundTile->>Canvas: Draw Bezier wavy path
    Canvas-->>DOM: Render animated wave
    Footer->>i18n: Fetch Footer translations
    i18n-->>Footer: Return localized links & titles
    Footer->>DOM: Render navigation columns
    Note over DOM: Animation continues smoothly until interaction stops
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested labels

new-design, enhancement

Suggested reviewers

  • M4dhav

Poem

🐰 A footer hops onto the page with grace,
With wavy lines that dance through cyberspace,
Dark and light themes embrace the tile,
While i18n translations make it worthwhile,
Canvas whispers, observers listen near,
The footer's here, the design's crystal clear! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main feature: introducing a responsive Footer component using the BackgroundTile design component.
Linked Issues check ✅ Passed All coding requirements from issue #296 are met: Footer layout matches design, uses BackgroundTile component, supports responsive design across breakpoints, implements dark/light modes, and no console errors reported.
Out of Scope Changes check ✅ Passed All changes directly support the Footer implementation: CSS tokens for styling, BackgroundTile component creation, Footer component with i18n, page integration, and translation files for English and Hindi.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@reach2saksham
Copy link
Author

@CodeRabbit review

@coderabbitai
Copy link

coderabbitai bot commented Mar 8, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@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: 1

🧹 Nitpick comments (2)
src/app/[locale]/page.tsx (1)

24-26: Consider removing the redundant bottom-0 class.

The bottom-0 utility has no effect here since the parent uses flexbox layout with flex-col and the main content uses flex-1. The footer will naturally position at the bottom. The class would only apply if the element had position: absolute/fixed/sticky.

♻️ Suggested simplification
       {/* Footer*/}
-      <div className="bottom-0 pb-4">
+      <div className="pb-4">
         <Footer />
       </div>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/app/`[locale]/page.tsx around lines 24 - 26, Remove the redundant
bottom-0 Tailwind class on the wrapper around the Footer in page.tsx: locate the
div containing <Footer /> (currently className="bottom-0 pb-4") and change it to
only include the needed spacing (e.g., className="pb-4") or remove the wrapper
entirely if not needed, keeping the Footer component intact.
src/components/ui/BackgroundTile.tsx (1)

9-14: Unused heightVh prop.

The heightVh prop is defined in the interface and accepted as a parameter with a default value, but it's never used in the component. The container's height is determined by CSS (h-full class) rather than this prop.

♻️ Either remove the unused prop or apply it

Option 1: Remove the unused prop

-interface BackgroundTileProps {
-  /** Height of the tile in viewport height units. Defaults to 50. */
-  heightVh?: number;
-}
-
-const BackgroundTile = ({ heightVh = 50 }: BackgroundTileProps) => {
+const BackgroundTile = () => {

Option 2: Use the prop for height styling

 const BackgroundTile = ({ heightVh = 50 }: BackgroundTileProps) => {
   // ... existing code ...
   return (
     <div
       style={{
         background:   "var(--tile-bg, `#1a1a1a`)",
         border:       "0.8px solid var(--tile-stroke, rgba(255,255,255,0.08))",
         borderRadius: "24px",
         width:        "100%",
+        height:       `${heightVh}vh`,
         overflow:     "hidden",
         position:     "relative",
       }}
-      className="w-full h-full"
+      className="w-full"
     >
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/ui/BackgroundTile.tsx` around lines 9 - 14, The BackgroundTile
component currently declares BackgroundTileProps and accepts heightVh but never
uses it; either remove the prop/interface or apply it to the container
height—locate the BackgroundTile function and BackgroundTileProps and either
delete heightVh from the interface and parameter list (and any related default)
or set the container element's height using the prop (e.g., add a style or
computed class to the outer div using height: `${heightVh}vh`) so the prop
actually controls the tile height.
🤖 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/components/ui/Footer.tsx`:
- Around line 38-51: The branding image logic uses theme (from useTheme()) which
can be "system", causing wrong asset selection; update the logic to use
resolvedTheme (from useTheme) instead of theme when computing brandingSrc while
keeping the mounted check intact: call useTheme to get resolvedTheme, keep
mounted/setMounted and useEffect as-is, and replace uses of theme === "dark"
with resolvedTheme === "dark" so the dark/light branding picks the actual
resolved theme value.

---

Nitpick comments:
In `@src/app/`[locale]/page.tsx:
- Around line 24-26: Remove the redundant bottom-0 Tailwind class on the wrapper
around the Footer in page.tsx: locate the div containing <Footer /> (currently
className="bottom-0 pb-4") and change it to only include the needed spacing
(e.g., className="pb-4") or remove the wrapper entirely if not needed, keeping
the Footer component intact.

In `@src/components/ui/BackgroundTile.tsx`:
- Around line 9-14: The BackgroundTile component currently declares
BackgroundTileProps and accepts heightVh but never uses it; either remove the
prop/interface or apply it to the container height—locate the BackgroundTile
function and BackgroundTileProps and either delete heightVh from the interface
and parameter list (and any related default) or set the container element's
height using the prop (e.g., add a style or computed class to the outer div
using height: `${heightVh}vh`) so the prop actually controls the tile height.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 864245f0-c797-4966-aed3-2f32212f45a2

📥 Commits

Reviewing files that changed from the base of the PR and between f3df55f and a5f8748.

⛔ Files ignored due to path filters (2)
  • public/assets/icons/resonate_branding_dark.svg is excluded by !**/*.svg
  • public/assets/icons/resonate_branding_light.svg is excluded by !**/*.svg
📒 Files selected for processing (6)
  • src/app/[locale]/globals.css
  • src/app/[locale]/page.tsx
  • src/components/ui/BackgroundTile.tsx
  • src/components/ui/Footer.tsx
  • src/messages/en.json
  • src/messages/hi.json

Comment on lines +38 to +51
const { theme } = useTheme();
const [mounted, setMounted] = useState(false);
const t = useTranslations("Footer");

useEffect(() => {
setMounted(true);
}, []);

const brandingSrc =
!mounted
? "/assets/icons/resonate_branding_light.svg"
: theme === "dark"
? "/assets/icons/resonate_branding_dark.svg"
: "/assets/icons/resonate_branding_light.svg";
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use resolvedTheme instead of theme for accurate theme detection.

When the user has "system" theme selected, theme returns "system" rather than the actual resolved value ("dark" or "light"). This causes the branding image to always show the light variant when system theme is active, since "system" !== "dark".

🐛 Proposed fix
-  const { theme } = useTheme();
+  const { resolvedTheme } = useTheme();
   const [mounted, setMounted] = useState(false);
   const t = useTranslations("Footer");

   useEffect(() => {
     setMounted(true);
   }, []);

   const brandingSrc =
     !mounted
       ? "/assets/icons/resonate_branding_light.svg"
-      : theme === "dark"
+      : resolvedTheme === "dark"
       ? "/assets/icons/resonate_branding_dark.svg"
       : "/assets/icons/resonate_branding_light.svg";
📝 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
const { theme } = useTheme();
const [mounted, setMounted] = useState(false);
const t = useTranslations("Footer");
useEffect(() => {
setMounted(true);
}, []);
const brandingSrc =
!mounted
? "/assets/icons/resonate_branding_light.svg"
: theme === "dark"
? "/assets/icons/resonate_branding_dark.svg"
: "/assets/icons/resonate_branding_light.svg";
const { resolvedTheme } = useTheme();
const [mounted, setMounted] = useState(false);
const t = useTranslations("Footer");
useEffect(() => {
setMounted(true);
}, []);
const brandingSrc =
!mounted
? "/assets/icons/resonate_branding_light.svg"
: resolvedTheme === "dark"
? "/assets/icons/resonate_branding_dark.svg"
: "/assets/icons/resonate_branding_light.svg";
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/ui/Footer.tsx` around lines 38 - 51, The branding image logic
uses theme (from useTheme()) which can be "system", causing wrong asset
selection; update the logic to use resolvedTheme (from useTheme) instead of
theme when computing brandingSrc while keeping the mounted check intact: call
useTheme to get resolvedTheme, keep mounted/setMounted and useEffect as-is, and
replace uses of theme === "dark" with resolvedTheme === "dark" so the dark/light
branding picks the actual resolved theme value.

- add Footer component
- integrate i18n translations
- use BackgroundTile design system component
- add responsive layout
@reach2saksham
Copy link
Author

@M4dhav This PR is ready to be merged from my side.

@reach2saksham reach2saksham added enhancement New feature or request new-design labels Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request new-design

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant