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

fix: opening sidebar resets scroll position #5693

Merged
merged 2 commits into from
Apr 17, 2023
Merged

Conversation

leo-anderson-x
Copy link
Contributor

Thank you for your contribution to the KodaDot NFT gallery.

👇 _ Let's make a quick check before the contribution.

PR Type

  • Bugfix

Context

Changes

  1. autoFocus causes document.documentElement.scrollTop to always be reset to 0, so I disabled it first.
  2. The changes above may cause the modal-background to go out of view, because the default position of modal-background was previously based on document.body instead of window. Therefore, I changed it to fixed so that no matter where the scrollbar is, it can ensure that the modal-background covers the entire screen.

Had issue bounty label?

  • Fill up your KSM address: Payout

Screenshot 📸

  • My fix has changed something on UI; a screenshot is best to understand changes for others.
CleanShot.2023-04-16.at.21.32.31.mp4

@leo-anderson-x leo-anderson-x requested a review from a team as a code owner April 16, 2023 12:44
@leo-anderson-x leo-anderson-x requested review from preschian and vikiival and removed request for a team April 16, 2023 12:44
@kodabot
Copy link
Collaborator

kodabot commented Apr 16, 2023

SUCCESS @leo-anderson-x PR for issue #5565 which is assigned to you. Please wait for review and don't hesitate to grab another issue in the meantime!

@netlify
Copy link

netlify bot commented Apr 16, 2023

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit a602390
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/643d522161181d00088f364d
😎 Deploy Preview https://deploy-preview-5693--koda-canary.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@reviewpad
Copy link
Contributor

reviewpad bot commented Apr 16, 2023

AI-Generated Summary: This pull request includes a fix for the issue where opening the sidebar resets the scroll position. Two changes were made: adding autoFocus: false to the ConnectWalletModalConfig object in useConnectWallet.ts and adding position: fixed !important to the .modal-background class in _modal.scss.

@reviewpad reviewpad bot added small Pull request is small waiting-for-review labels Apr 16, 2023
@exezbcz
Copy link
Member

exezbcz commented Apr 16, 2023

yup, works fine, can you please apply the same behavior to the notification sidebar as well @leo-anderson-x

@codeclimate
Copy link

codeclimate bot commented Apr 17, 2023

Code Climate has analyzed commit a602390 and detected 0 issues on this pull request.

View more on Code Climate.

@leo-anderson-x
Copy link
Contributor Author

@exezbcz updated:

CleanShot.2023-04-17.at.23.12.54.mp4

@vikiival vikiival merged commit e0dcbd5 into kodadot:main Apr 17, 2023
16 checks passed
@vikiival
Copy link
Member

pay 10 usd

@yangwao
Copy link
Member

yangwao commented Apr 17, 2023

😍 Perfect, I’ve sent the payout
💵 $10 @ 35.93 USD/KSM ~ 0.278 $KSM
🧗 DzUbHCk3Fr3XdCPNKo7uCJvtBH7YfgiFbn4Gr3VmCMiFy1C
🔗 0x2a048bbbb0d74cba8a9b124ac15ff72617ac73d9cc330f51090147328cb5a76a

🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues

@yangwao yangwao added the paid pull-request has been paid label Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
paid pull-request has been paid S-visual-ok-✅ small Pull request is small waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Opening sidebar resets scroll position
5 participants