Skip to content

fix: improve hero section alignment and responsiveness#476

Merged
mehul-m-prajapati merged 2 commits into
GitMetricsLab:mainfrom
shreyasingh260:main
May 26, 2026
Merged

fix: improve hero section alignment and responsiveness#476
mehul-m-prajapati merged 2 commits into
GitMetricsLab:mainfrom
shreyasingh260:main

Conversation

@shreyasingh260
Copy link
Copy Markdown
Contributor

@shreyasingh260 shreyasingh260 commented May 24, 2026

Related Issue - Closes: #455


Description

This PR fixes the alignment inconsistency in the Hero section on normal/laptop screen sizes. While the layout appears correct in full-screen mode, in normal view the hero content was pushed too far downward, causing excessive empty space at the top. This update corrects the vertical alignment and ensures a consistent and balanced layout across different screen sizes.


How Has This Been Tested?

  • Tested on normal/laptop screen sizes
  • Verified full-screen mode for regression issues
  • Used browser dev tools to check responsiveness at different breakpoints
  • Compared UI before and after using screenshots

Screenshots

Before and after screenshots attached showing the alignment fix.

Before

git tracker

After

Screenshot 2026-05-24 122516

Type of Change

  • Bug fix
  • New feature
  • Code style update
  • Breaking change
  • Documentation update

Summary by CodeRabbit

Release Notes

  • Style
    • Refined hero section layout and background visual styling
    • Updated dashboard card appearance with enhanced shadow and hover effects
    • Enhanced contribution matrix cell styling
    • Improved animated progress bar appearance
    • Adjusted floating GitHub icon animations and positioning

Review Change Stack

@netlify
Copy link
Copy Markdown

netlify Bot commented May 24, 2026

Deploy Preview for github-spy failed.

Name Link
🔨 Latest commit 9761ec0
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a15e37f7c6d3f00085d487b

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

Warning

Review limit reached

@mehul-m-prajapati, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 50 minutes and 16 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 43872bfc-f3de-48e8-9bd1-c8e543140b29

📥 Commits

Reviewing files that changed from the base of the PR and between 13211f7 and 9761ec0.

📒 Files selected for processing (1)
  • src/components/Hero.tsx
📝 Walkthrough

Walkthrough

The Hero component receives a comprehensive UI refresh: the hero section layout, padding, and background grid gradient are adjusted; dashboard card styling is updated with revised background opacity, borders, and hover effects; the Weekly Commits progress bar animation is refined; and the Contribution Matrix cell color logic is simplified to use a single intensities array. Floating GitHub icon nodes are repositioned and their animation staggering is refactored to use inline styles.

Changes

Hero Component Redesign

Layer / File(s) Summary
Hero section and dashboard card presentation
src/components/Hero.tsx
Hero section layout/padding/min-height/grid-mask-gradient and glow elements revised; dashboard card styling (background opacity, borders, spacing, shadow/hover) updated; Weekly Commits progress bar animation adjusted; Contribution Matrix cell color logic simplified from separate light/dark class arrays to single intensities array containing both light and dark Tailwind classes, selected via modulo indexing.
Floating icon nodes and animation staggering
src/components/Hero.tsx
Floating GitHub icon nodes (branch/commit/pull-request) repositioned with updated absolute positioning and styling; animation stagger approach adjusted to use inline animationDelay styles in JSX.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

  • GitMetricsLab/github_tracker#316: Both PRs heavily modify src/components/Hero.tsx for the cyber-style dashboard hero, including the contribution matrix cell class/intensity rendering and the floating Git icon nodes/animation-delay behavior.

Suggested labels

level:intermediate, quality:clean

Poem

🐰 A hero redesigned with Tailwind grace,
Dashboard cards now float in the right place,
Grid cells simplified, animations set to sway,
The cyber hero brightens your day!
✨💫

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Changes are focused on Hero component styling and layout. However, modifications to the contribution matrix cell color logic and floating GitHub icon animations extend beyond the stated hero alignment fix scope. Clarify whether contribution matrix cell class simplification and icon animation adjustments are necessary for the alignment fix, or separate them into a follow-up PR for better scope clarity.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: improving hero section alignment and responsiveness across different screen sizes, which is the primary focus of the changeset.
Description check ✅ Passed The description includes all required template sections: Related Issue (#455), comprehensive Description, testing methodology, before/after Screenshots, and Type of Change (Bug fix) properly marked.
Linked Issues check ✅ Passed The PR changes directly address issue #455's objectives by adjusting hero container styling, padding/margin values, and improving responsive layout across screen sizes to fix vertical alignment inconsistencies.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/Hero.tsx`:
- Around line 125-141: These decorative icon wrappers (the divs wrapping
GitBranch, GitCommit, GitPullRequest in Hero.tsx) should be non-interactive and
respect reduced-motion: replace the plain "animate-bounce" class with
motion-safe:animate-bounce and motion-reduce:animate-none, add
"pointer-events-none" to prevent accidental hits, and mark them for AT as
decorative by adding aria-hidden="true" and role="presentation" (or
tabIndex={-1} if needed); apply the same changes to the three divs containing
GitBranch, GitCommit and GitPullRequest.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: d7522145-243c-4c3d-852d-8ac63b2c7f32

📥 Commits

Reviewing files that changed from the base of the PR and between 6c6bc3e and 13211f7.

📒 Files selected for processing (1)
  • src/components/Hero.tsx

Comment thread src/components/Hero.tsx
@shreyasingh260
Copy link
Copy Markdown
Contributor Author

Implemented alignment and responsiveness improvements for the Hero section while preserving the original UI, animations, and overall design consistency.

@mehul-m-prajapati mehul-m-prajapati merged commit 3b5bcf0 into GitMetricsLab:main May 26, 2026
1 of 6 checks passed
@github-actions
Copy link
Copy Markdown

🎉🎉 Thank you for your contribution! Your PR #476 has been merged! 🎉🎉

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

Projects

None yet

2 participants