codeforcauseorg / edu-client

Product focuses on 100% education as well as upskilling developing countries and rural areas.
https://educlient.codeforcause.org/
MIT License
128 stars 148 forks source link

ScrollToTop FAB Added #280

Closed dhwaj1902 closed 3 years ago

dhwaj1902 commented 3 years ago

Related to Issue#277

Added Scroll To Top Button is a Floating Action Button, and it triggers when the page offset is greater than 400. image

Advantages: No need to add a separate ScrollToTop button on every page.

adarsh-technocrat commented 3 years ago

Good change! I would suggest making a fab button offset above the bottom navbar.

dhwaj1902 commented 3 years ago

@adarsh-technocrat done☺.

image

dhwaj1902 commented 3 years ago

Hey, @Abhijay007 thanks for reviewing.

  1. In your first suggestion, I found it amazing and have removed the previous scroll to top button from the following pages:

    • Home Page
    • Course Page
    • Wish List
    • Peer Discussion Page
  2. While doing this, I found on Routes Page that the routes of terms-and-conditions, about and faq are repeated as shown in the picture. image So, I have removed it.

  3. As in your second suggestion, since we are making an app, I think so we are not focussing on that how it looks on the web. That's totally my view but if you want then I can implement it, but the problem is that I have added the following lines for making it fixed on the right bottom, so if I changed it then it will also impact mobile view.

    right: "10px",
    bottom: "65px",
  4. If we removed the height issue, then I have done it in a way that if page offset is greater than 400 then it will show, else it will not.

Sorry if I am not able to understand what you are trying to say.

dhwaj1902 commented 3 years ago

@Abhishek-kumar09 Please look into this Pr.

Abhishek-kumar09 commented 3 years ago

We are gonna remove the scroll to top button in the future version of app. Currently, the scroll to top is looking with center aligned and full color opacity.

Abhijay007 commented 3 years ago

@dhwaj1902 you can close this PR as we may don't need back to top button in the future versions of the application.