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

#5531 toggle issue fix #5562

Merged
merged 7 commits into from
Apr 14, 2023
Merged

#5531 toggle issue fix #5562

merged 7 commits into from
Apr 14, 2023

Conversation

prachi00
Copy link
Member

@prachi00 prachi00 commented Apr 8, 2023

Thank you for your contribution to the KodaDot NFT gallery.

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

PR Type

  • Bugfix
  • Feature
  • Refactoring

Context

Before submitting pull request, please make sure:

  • My contribution builds clean without any errors or warnings
  • I've merged recent default branch -- main and I've no conflicts
  • I've tried to respect high code quality standards
  • I've didn't break any original functionality
  • I've posted a screenshot of demonstrated change in this PR

Optional

  • I've tested it at </bsx/collection>
  • I've tested PR on mobile
  • I've written unit tests 🧪
  • I've found edge cases

Had issue bounty label?

  • Fill up your KSM address:
    Payout

Community participation

Screenshot 📸

  • My fix has changed something on UI; a screenshot is best to understand changes for others.

@prachi00 prachi00 requested a review from a team as a code owner April 8, 2023 00:07
@prachi00 prachi00 requested review from daiagi and Jarsen136 and removed request for a team April 8, 2023 00:07
@netlify
Copy link

netlify bot commented Apr 8, 2023

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit 62df37e
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/64377008bbea410008dc2414
😎 Deploy Preview https://deploy-preview-5562--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 8, 2023

AI-Generated Summary: This pull request addresses issue #5531 by simplifying the handling of the wallet connect modal in the ProfileDropdown.vue and ConnectWalletButton.vue components. It reduces code duplication and emits a toggleConnectModal event instead of directly managing the modal within the ConnectWalletButton.vue.

@reviewpad reviewpad bot added small Pull request is small waiting-for-review labels Apr 8, 2023
@reviewpad
Copy link
Contributor

reviewpad bot commented Apr 8, 2023

AI-Generated Summary: This pull request consists of two patches:

  1. Fixes the toggle issue ("do nothing" when clicking icon again #5531) by updating the event handler's name from @closeBurgerMenu to @toggleConnectModal in ProfileDropdown.vue. It also simplifies the toggleWalletConnectModal method in ConnectWalletButton.vue by removing the unnecessary code related to modal.

  2. Removes a useless import (ConnectWalletModalConfig) from ConnectWalletButton.vue file, which further optimizes the code.

...ConnectWalletModalConfig,
})

this.$emit('closeBurgerMenu')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls do not delete this stuff. The changes will break the functionality to open the modal on mobile.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, can we add mobile check then? we dont need this on web, its what was breaking this issue

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any better way to handle this case? The function name is toggleWalletConnectModal which is not related to mobile check I guess : )

@prachi00 prachi00 requested a review from Jarsen136 April 8, 2023 23:27
@reviewpad
Copy link
Contributor

reviewpad bot commented Apr 8, 2023

AI-Generated Summary: This pull request consists of 3 patches that primarily fix a toggle issue:

  1. The first patch addresses the toggle issue by updating the event listener in ProfileDropdown.vue and removing unnecessary lines of code in ConnectWalletButton.vue.
  2. The second patch removes a now-unused import (ConnectWalletModalConfig) from ConnectWalletButton.vue.
  3. The third patch adds a mobile device check in ConnectWalletButton.vue, bringing back the removed ConnectWalletModalConfig import and utilizing the isMobileDevice utility function to conditionally handle the toggle behavior based on whether the user is on a mobile device or not.

@Jarsen136 Jarsen136 added the S-changes-requested-🤞 PR is almost good to go, just some fine tunning label Apr 9, 2023
Copy link
Contributor

@daiagi daiagi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Connect button doesn't work on some device
I have a laptop that can be folded into tablet and it doesn't work on this device (when folded in tablet mode)
probably because of this:
import { isMobileDevice } from '@/utils/extension'

please don't use this to check screen dimensions, it doesn't work as expected, it checks user agent...

image

@reviewpad
Copy link
Contributor

reviewpad bot commented Apr 10, 2023

AI-Generated Summary: This pull request contains 4 commits that address the issue with toggling the wallet connect modal on mobile devices, as well as some refactoring and code clean-up. Specifically, the changes include:

  1. Updating the event listener in ProfileDropdown.vue to use toggleWalletConnectModal instead of closeBurgerMenu.
  2. Removing an unused import in ConnectWalletButton.vue.
  3. Adding a mobile device check in ConnectWalletButton.vue to conditionally open/close the wallet connect modal.
  4. Refactoring code in ProfileDropdown.vue and ConnectWalletButton.vue to improve readability and maintainability.

@prachi00
Copy link
Member Author

Connect button doesn't work on some device I have a laptop that can be folded into tablet and it doesn't work on this device (when folded in tablet mode) probably because of this: import { isMobileDevice } from '@/utils/extension'

please don't use this to check screen dimensions, it doesn't work as expected, it checks user agent...

image

maybe in another issue we can refactors this utils function then if it isnt usable, for now I have used
private isMobile = ref(window.innerWidth < 1024)

which is the same check we are using to show the menu on mobile so all good

@daiagi
Copy link
Contributor

daiagi commented Apr 10, 2023

wfm on desktop
could you do the same for tablet?

screen-capture.webm

@daiagi
Copy link
Contributor

daiagi commented Apr 10, 2023

for now I have used
private isMobile = ref(window.innerWidth < 1024)

works now. thanks

@reviewpad
Copy link
Contributor

reviewpad bot commented Apr 10, 2023

AI-Generated Summary: This pull request includes four patches that address the following changes:

  1. Fixing the toggle issue ("do nothing" when clicking icon again #5531) by updating the event listeners in the ProfileDropdown.vue and ConnectWalletButton.vue components.
  2. Removing an unused import statement in ConnectWalletButton.vue.
  3. Adding a mobile check using isMobileDevice function and conditionally update the modal handling in the toggleWalletConnectModal method in ConnectWalletButton.vue.
  4. Performing minor refactors for code readability in ProfileDropdown.vue and ConnectWalletButton.vue components.

@reviewpad
Copy link
Contributor

reviewpad bot commented Apr 10, 2023

AI-Generated Summary: This pull request contains a series of patches that fix the toggle issue #5531, remove a useless import, add a mobile check, and refactor some code. The patches modify the ProfileDropdown.vue and ConnectWalletButton.vue files, adjusting their functionalities, removing unnecessary imports, and adding a mobile check to better handle wallet connection. The refactors include minor changes to enhance readability and maintainability of the code.

Copy link
Contributor

@Jarsen136 Jarsen136 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a strange fix but works for me

@Jarsen136 Jarsen136 added S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked and removed S-changes-requested-🤞 PR is almost good to go, just some fine tunning labels Apr 12, 2023
@prachi00
Copy link
Member Author

wfm on desktop could you do the same for tablet?

bit tricky to do the same on mobile, pulling this in for a separate issue

@codeclimate
Copy link

codeclimate bot commented Apr 13, 2023

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

View more on Code Climate.

@reviewpad
Copy link
Contributor

reviewpad bot commented Apr 13, 2023

AI-Generated Summary: This pull request includes 4 different patches:

  1. Fixes the toggle issue in the ProfileDropdown component by changing the event listener from @closeBurgerMenu to @toggleConnectModal.
  2. Removes an unnecessary import of ConnectWalletModalConfig from ConnectWalletButton.vue.
  3. Adds a mobile device check using isMobileDevice utility function and updates the toggleWalletConnectModal method in the ConnectWalletButton.vue to handle different behaviors on mobile and desktop devices.
  4. Refactors code for closing the burger menu in ProfileDropdown.vue and updates the ConnectWalletButton.vue component to make use of a ref, isMobile, for checking the device type.

Copy link
Contributor

@daiagi daiagi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug fixed on desktop
needs fixing in mobile /tablet as well

@yangwao
Copy link
Member

yangwao commented Apr 14, 2023

pay 30 usd

@yangwao yangwao merged commit 8aac5f5 into main Apr 14, 2023
17 checks passed
@yangwao yangwao deleted the feat-toggle-fix branch April 14, 2023 18:35
@yangwao
Copy link
Member

yangwao commented Apr 14, 2023

😍 Perfect, I’ve sent the payout
💵 $30 @ 37.26 USD/KSM ~ 0.805 $KSM
🧗 EzGc4s9PgCPx1YnF3fqzhLzVHpHMTL4LWPScwpDrR8JKgSU
🔗 0x6aacb845986c9709697b23daa0ca30bc0bd3b4744701cff8c243fbc4d055c20a

🪅 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 14, 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-✅ S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked small Pull request is small waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"do nothing" when clicking icon again
6 participants