Skip to content
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

Feat [GSW-1952] Earn > Pool position ID scroll #566

Merged
merged 3 commits into from
Nov 20, 2024

Conversation

tfrg
Copy link
Collaborator

@tfrg tfrg commented Nov 20, 2024

Purpose

  • Resolve inconsistent scroll behavior when accessing position details via URL hash
  • Implement reliable scroll functionality for staking and position sections
  • Prevent duplicate scroll actions during component rendering

Description

  • Consolidated scroll logic into a single useEffect hook for better maintainability
  • Implemented jumpFlagRef to prevent duplicate scroll actions during re-renders
  • Added proper handling for three main scroll scenarios:
    • Staking section navigation (#staking)
    • Specific position navigation (#position-id)
    • Default liquidity section navigation
  • Added smooth scroll behavior for better user experience
  • Ensured DOM elements are properly loaded before scroll execution using setTimeout
  • Added proper error handling for non-existent elements

Copy link

vercel bot commented Nov 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gnoswap-interface ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2024 11:22am

jinoosss
jinoosss previously approved these changes Nov 20, 2024
@tfrg tfrg force-pushed the GSW-1952-position-id-scroll branch from bb35df1 to fe0ec2c Compare November 20, 2024 11:19
Copy link

sonarcloud bot commented Nov 20, 2024

@tfrg tfrg merged commit 49f8137 into develop Nov 20, 2024
6 checks passed
@tfrg tfrg deleted the GSW-1952-position-id-scroll branch November 20, 2024 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants