Skip to content

prevent scroll-to-top button from shifting near footer#6101

Merged
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
JaivPatel07:main
Jun 20, 2026
Merged

prevent scroll-to-top button from shifting near footer#6101
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
JaivPatel07:main

Conversation

@JaivPatel07

Copy link
Copy Markdown
Contributor

Description

Fixes #6098

Changes Made

  • Removed footer-triggered position changes from the scroll-to-top button.
  • Kept the button in a consistent fixed position during scrolling.
  • Eliminated the sudden downward movement that occurred when the footer became visible.
  • Improved overall scrolling experience and UI stability.

Pillar

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🕐 Pillar 3 — Timezone Logic Optimization
  • 🛠️ Other (Bug fix, refactoring, docs)

Visual Preview

Before

The scroll-to-top button shifted downward when the footer entered the viewport, causing a noticeable UI jump.

After

image

The scroll-to-top button remains fixed in its intended position throughout scrolling, including when the footer is visible.

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally (localhost:3000/api/streak?user=YOUR_USERNAME).
  • I have run npm run format and npm run lint locally and resolved all errors (CI will fail otherwise).
  • My commits follow the Conventional Commits format (e.g., feat(themes): ..., fix(calculate): ...).
  • I have updated README.md if I added a new theme or URL parameter.
  • I have started the repo.
  • I have made sure that I have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts).
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

@JaivPatel07 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Size Report (Gzipped Sizes)

✨ No significant bundle size changes detected.

📊 Summary of Totals

Category PR Size Base Size Difference
Total JS 3676.97 KB 3676.96 KB +0.01 KB (+0.00%)
Total CSS 291.68 KB 291.68 KB 0 B

@Aamod-Dev Aamod-Dev added level:beginner Small changes Usually isolated fixes or simple UI/text updates. quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:bug Something isn't working as expected mentor:Aamod007 labels Jun 20, 2026

@Aamod-Dev Aamod-Dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review Summary

Labels applied:

  • level:beginner — Straightforward one-variable removal fix in components/ReturnToTop.tsx:31-45. Removes �tBottom state, the setAtBottom call, and the dynamic �ottom-6/�ottom-24 conditional class. Minimal cognitive complexity.
  • quality:clean — The core fix in ReturnToTop.tsx is cleanly scoped — removes exactly the code causing the footer-shift bug without touching anything else. The package-lock.json changes are noisy (from peer: true removals during the
    ext upgrade), but the source change is surgically precise.
  • type:bug — Fixes a UI jump where the scroll-to-top button shifted downward when the footer entered the viewport.

Mentor: Aamod007

Assessment: Clean bug fix. The root cause was straightforward — the button position was dynamically switching between �ottom-6 and �ottom-24 based on footer proximity, and removing the conditional always keeps it fixed at �ottom-24.

One minor note: the PR title doesn't follow the conventional commit format ( ix: ...), but the commit message itself may be fine. The package-lock.json noise is an unavoidable side effect of the
ext version bump, though ideally dependency bumps would be in a separate PR to keep diffs cleaner.

Approved! 🚀

@JhaSourav07 JhaSourav07 added the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jun 20, 2026
@JhaSourav07 JhaSourav07 merged commit 2b091a8 into JhaSourav07:main Jun 20, 2026
9 of 10 checks passed
@github-actions github-actions Bot added this to the GSSoC 2026 milestone Jun 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Congratulations @JaivPatel07! Your PR has been successfully merged. 🚀

Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.

⚠️ Important for GSSoC Contributors:
You are strictly advised to join our Discord Server as it is mandatory for all GSSoC participants. All important announcements, point claims, and community discussions happen there.

Keep building! 💻✨

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

Labels

gssoc:approved PR has been reviewed and accepted for valid contribution points level:beginner Small changes Usually isolated fixes or simple UI/text updates. mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Footer Scroll-to-Top Button Shifts Down Unexpectedly Near Bottom of Page

3 participants