Repository navigation
fix(wallet): prevent event bubbling and add responsive address truncation in WalletConnectButton (#887) - #1007
Merged
k-deejah merged 5 commits intoOct 18, 2026
Conversation
…tion in WalletConnectButton (Sorokit#887)
|
@bamiebot-maker Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
…tsideClick listener test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #887
Summary of Changes
e.stopPropagation()inWalletConnectButton'sonClickhandlers across disconnected trigger, connected trigger withonOpenModal, connected dropdown trigger, and clear-error action to prevent click events from bubbling to ancestor clickable containers (e.g. account list cards).aria-haspopup="dialog"and dynamicaria-expanded={connectModalOpen}on the disconnected trigger button.aria-haspopup="dialog"andaria-expanded={false}on connected button whenonOpenModalis provided.truncateAddressResponsiveinsrc/lib/utils.tssupporting compact truncation (compact: true, default bounds 3/3) for narrow mobile viewports (<360px).WalletConnectButton, rendered compact address for small viewports (inline sm:hidden) and standard address for larger viewports (hidden sm:inline) withmax-w-fullto prevent text clipping and container overflow.WalletConnectButton.test.tsxverifying event bubbling prevention, ARIA attributes, and responsive truncation rendering.utils.test.tsverifyingtruncateAddressResponsivebehavior.NetworkSwitcher.tsxto satisfy the ESLintpreserve-caught-errorrule.npm run typecheck), linting (npm run lint), and export tests (npm run test:exports).