WalletConnect / web3modal

A single Web3 provider solution for all Wallets
https://web3modal.com
Apache License 2.0
4.67k stars 1.28k forks source link

refactor: render tooltip in root #2210

Closed enesozturk closed 1 week ago

enesozturk commented 1 week ago

Breaking Changes

Refactor the tooltip component to render it in the root of the w3m instead of in the component of it's used. This is an approach that allow us to have more capabilities when rendering tooltips. In some situations, we might need to render a tooltip with variety children's.

wui-tooltip-select

The existing wui-tooltip-select component, originally styled as a wallet feature button, will now support a broader range of components based on the specific use case.

Why render on the root?

1) Overflow Handling: There are instances where the tooltip content is lengthy, causing it to overflow beyond the boundaries of the w3m component. With the previous implementation, the overflow was hidden by the w3m. Rendering at the root level resolves this issue.

2) Positioning and Control: Certain tooltips necessitate rendering outside the w3m component for proper positioning and control. This change allows for precise placement and management of such tooltips.

Changes

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web3modal-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2024 10:23am
web3modal-gallery ✅ Ready (Inspect) Visit Preview May 6, 2024 10:23am
web3modal-laboratory ✅ Ready (Inspect) Visit Preview May 6, 2024 10:23am
enesozturk commented 1 week ago

@svenvoskamp Totally - I wasn't quite sure about its naming but at the same time, I'm not sure if it's a reusable component in different places since we don't have any similar components. Any suggestion for a name?

Taking a look danger issues right now!

enesozturk commented 1 week ago

@svenvoskamp made a few changes danger.js checks for false errors.

svenvoskamp commented 1 week ago

@svenvoskamp Totally - I wasn't quite sure about its naming but at the same time, I'm not sure if it's a reusable component in different places since we don't have any similar components. Any suggestion for a name?

Taking a look danger issues right now!

Yes we don't use it anywhere else, but I like to keep the component naming a bit more general. Maybe something like wui-icon-button