cms icon indicating copy to clipboard operation
cms copied to clipboard

feature: Maintain scroll position while navigating through pages

Open somashekhar161 opened this issue 10 months ago • 4 comments

Title: Maintain Scroll Position When Navigating Between Pages

Description: When browsing through courses and navigating back from inside a week's page, the user is scrolled to the top and must manually scroll back to their previous position. This makes it a tedious task to navigate between pages.

Problem: The current implementation does not preserve the scroll position when navigating away from and back to a page, resulting in a poor user experience.

Solution: Remember the scroll position of the page when the user navigates away, and restore it when they navigate back. This will allow users to pick up where they left off without having to manually scroll back to their previous position.

Expected Behavior:

  • When a user navigates away from a page, the current scroll position is stored.
  • When the user navigates back to the page, the stored scroll position is restored.

References:

  • https://stackoverflow.com/questions/59100931/maintaining-state-and-scroll-position-in-react
  • https://lingash.medium.com/how-to-maintain-state-and-scroll-position-in-react-4baa5dea0ce

Labels:

  • usability
  • navigation
  • scrolling

somashekhar161 avatar Feb 06 '25 10:02 somashekhar161

I want to work on this issue

Mackhack0705 avatar Apr 05 '25 04:04 Mackhack0705

yes please

somashekhar161 avatar Apr 05 '25 07:04 somashekhar161

Hi, @somashekhar161. Should this feature be implemented on every page or only on the course or home page?

Mackhack0705 avatar Apr 05 '25 07:04 Mackhack0705

course page is enough

somashekhar161 avatar Apr 05 '25 07:04 somashekhar161