Add dashboard back-to-top button with scroll threshold and theme supp…#2512
Open
Honey-pg wants to merge 1 commit into
Open
Add dashboard back-to-top button with scroll threshold and theme supp…#2512Honey-pg wants to merge 1 commit into
Honey-pg wants to merge 1 commit into
Conversation
GSSoC Label Checklist 🏷️@Umbrella-io — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
02f5fa9 to
13fc7e1
Compare
Add a dashboard-scoped floating back-to-top control after 400px scroll, and repair upstream type-check failures in dashboard page, middleware, auth route, issues API, and leaderboard skeleton path.
8ca2d8f to
6812460
Compare
Member
|
This PR has merge conflicts with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Scope the floating button to dashboard routes, show it after 400px scroll with smooth return-to-top, and fix React style shorthand warnings in CustomCursor and LandingPage.
Adds a floating back-to-top button on dashboard routes that appears after scrolling 400px and smoothly returns the user to the top. Also fixes React console warnings from mixing CSS shorthand and longhand style properties in
CustomCursorandLandingPage.Closes #2509
Type of Change
What Changed
BackToTopButton.tsx— simplified floating button with 400px scroll threshold,ArrowUpicon, smooth scroll, theme-awarebg-accentstyling, andbottom-6 right-6positioningdashboard/layout.tsx— rendersBackToTopButtonon all dashboard routesproviders.tsx— removed global back-to-top button so it only appears on the dashboardCustomCursor.tsx— replacedbordershorthand with longhand (borderWidth,borderStyle,borderColor) to fix React style warningLandingPage.tsx— mergedtransitionDelayintotransitionshorthand inFeatureCardto fix React style warningtest/components/BackToTopButton.test.tsx— tests for 400px threshold, smooth scroll, and keyboard activationHow to Test
npm run devand open/dashboardwhile signed in.border/borderColorortransition/transitionDelay.Expected result: Back-to-top button appears only on dashboard routes after 400px scroll, scrolls smoothly to top on click/keyboard, respects theme, and does not overlap top-right toasts.
Automated checks:
npm run type-check npm run lint npm test -- test/components/BackToTopButton.test.tsx