Fix issues navigating profile page on busy

in #utopian-io6 years ago (edited)

Related PR

Here is the original problem that I noticed when navigating one's on profile page on Busy:

This improves the usability for 2 situations I've noticed.

You scroll far down your history on profile and then click profile link expecting to go back to top but it doesn't.

If you are in another tab on your profile, for example activity, scroll far down, then click profile link, you will change tabs but still be scrolled down.

This seems to fix both of those issues.

Edit: these problems are specific to viewing your own profile.

It was originally a very small change adding onClick={window.scrollTo(0, 0)} to the profile image.

Later I added another trigger for window.scrollTo(0, 0), that trigger is router changing URL, so now anytime a URL is changed by clicking on a link on busy the user will scroll to the top.

The idea with the second change is to cover any other similar issues. In most cases if you change pages you'll want to be at the top of the busy application, not scrolled down somewhere.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

More description is always better.
Try to include at least one picture.

You can contact us on Discord.
[utopian-moderator]

Hey @kirkins I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.28
TRX 0.11
JST 0.030
BTC 68500.64
ETH 3751.22
USDT 1.00
SBD 3.65