-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Footer Alignment and Spacing #472
Footer Alignment and Spacing #472
Conversation
@AnushkaChouhan25 is attempting to deploy a commit to the bunty's projects Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe pull request includes modifications to several components within the frontend application. The Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊 |
There was a problem hiding this 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
🧹 Outside diff range and nitpick comments (1)
frontend/src/components/Shared/footer/Content.jsx (1)
170-171
: LGTM with a minor suggestion.The spacing adjustments look good and maintain responsiveness. However, consider using CSS Grid for better control over the layout.
Consider this enhancement:
- <div className="flex md:flex-row flex-col shrink-0 gap-4 sm:gap-20 mx-[40px] mb-10 md:ml-[50px] md:mr-0"> - <div className="flex justify-between md:gap-28 "> + <div className="grid grid-cols-1 md:grid-cols-3 gap-4 sm:gap-20 mx-[40px] mb-10 md:ml-[50px] md:mr-0"> + <div className="col-span-2 grid grid-cols-2 md:gap-28">This would provide:
- More predictable spacing
- Better alignment control
- Easier maintenance
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (4)
frontend/src/App.jsx
(1 hunks)frontend/src/components/Shared/footer/Content.jsx
(2 hunks)frontend/src/components/Shared/footer/Footer.jsx
(1 hunks)frontend/src/router/index.jsx
(2 hunks)
✅ Files skipped from review due to trivial changes (2)
- frontend/src/App.jsx
- frontend/src/router/index.jsx
<div className="relative h-[calc(100vh+800px)] -top-[100vh] bg-amber-100 dark:bg-black mb-4 pb-10 sm:pb-16"> | ||
<div className="h-[700px] md:h-[650px] sticky top-[calc(100vh-600px)]"> | ||
<div className="h-[60px] md:h-[1px] sticky top-[calc(130vh-600px)]"> | ||
<Content /> | ||
</div> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider simplifying the complex positioning logic.
The current implementation uses:
- Viewport-based calculations (130vh, 100vh)
- Magic numbers (600px)
- Different heights for mobile/desktop (60px/1px)
- Negative positioning (-top-[100vh])
This makes the component brittle and hard to maintain. Consider refactoring to use more standard layout approaches.
- <div className="relative h-[calc(100vh+800px)] -top-[100vh] bg-amber-100 dark:bg-black mb-4 pb-10 sm:pb-16">
- <div className="h-[60px] md:h-[1px] sticky top-[calc(130vh-600px)]">
+ <div className="bg-amber-100 dark:bg-black mb-4 pb-10 sm:pb-16">
+ <div className="sticky bottom-0">
<Content />
</div>
</div>
Consider using Flexbox or Grid for layout:
// Alternative approach using flex
<footer className="min-h-screen flex flex-col">
<div className="flex-grow bg-amber-100 dark:bg-black">
<div className="sticky bottom-0">
<Content />
</div>
</div>
</footer>
className="h-[800px]" | ||
style={{ clipPath: 'polygon(0% 0, 100% 0%, 100% 100%, 0 100%)' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Footer layout uses complex viewport calculations that may cause inconsistencies
The footer implementation relies on multiple viewport-dependent calculations and positioning that could lead to layout issues:
- Fixed footer height of 800px combined with
calc(100vh+800px)
for inner div - Sticky positioning with complex calculation
calc(130vh-600px)
- Height transitions from
60px
to1px
at md breakpoint - Negative top positioning
-top-[100vh]
These viewport-dependent calculations and magic numbers make the footer's behavior unpredictable across different screen sizes. Consider:
- Using simpler, more maintainable height values
- Replacing viewport-based calculations with fixed or relative units
- Implementing a more straightforward sticky footer pattern
- Testing thoroughly on various screen sizes if keeping current implementation
🔗 Analysis chain
Verify footer responsiveness across different screen sizes.
The footer uses a fixed height of 800px with clip-path styling. While this works, please ensure it behaves correctly across different viewport sizes and doesn't cause content overflow issues.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for any viewport-specific styles or media queries related to the footer
rg -l "h-\[(.*?)vh" frontend/src/components/Shared/footer/
rg -l "@media" frontend/src/components/Shared/footer/
Length of output: 163
Script:
#!/bin/bash
# Let's examine the actual content of Footer.jsx to see all height-related classes and responsive styles
rg -A 5 -B 5 "h-\[" frontend/src/components/Shared/footer/Footer.jsx
# Also check for any Tailwind responsive prefixes (sm:, md:, lg:, etc.)
rg "(sm:|md:|lg:|xl:)h-" frontend/src/components/Shared/footer/Footer.jsx
# Look for any sticky positioning or viewport-related calculations
rg "calc\(|sticky|fixed|absolute" frontend/src/components/Shared/footer/Footer.jsx
Length of output: 947
@@ -110,7 +110,7 @@ const Section2 = () => { | |||
> | |||
BoardGame Cafe{!isWide && <br />} | |||
</h1> | |||
<p className={`flex ${isWide ? `text-[center] mt-3 ml-[620px]` : `text-base mt-1`}`}> | |||
<p className={`flex ${isWide ? `text-[center] mt-3 ml-[620px]` : `text-base mt-1`}`}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Improve responsive design for copyright text.
The current implementation has several issues:
- Using a fixed
ml-[620px]
margin could cause layout issues on different screen sizes text-[center]
is incorrect (should betext-center
)
Consider this more responsive approach:
- <p className={`flex ${isWide ? `text-[center] mt-3 ml-[620px]` : `text-base mt-1`}`}>
+ <p className={`flex ${isWide ? `text-center mt-3 ml-auto` : `text-base mt-1`}`}>
📝 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.
<p className={`flex ${isWide ? `text-[center] mt-3 ml-[620px]` : `text-base mt-1`}`}> | |
<p className={`flex ${isWide ? `text-center mt-3 ml-auto` : `text-base mt-1`}`}> |
ca6cdb3
into
RamakrushnaBiswal:main
Fix Issue - #466
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Metadata
component in theApp
component.HelpAndSupport
component and its route in the routing configuration.Style
Documentation