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

[bug] Close button on "Scan with ..." step sometimes gets squished #1853

Closed
1 task done
midas-myth opened this issue Mar 13, 2024 · 2 comments
Closed
1 task done

[bug] Close button on "Scan with ..." step sometimes gets squished #1853

midas-myth opened this issue Mar 13, 2024 · 2 comments

Comments

@midas-myth
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

RainbowKit Version

2.0.2

wagmi Version

2.5.7

Current Behavior

The x (close button) get squished when the wallet name is long. I noticed this playing with other locales

Expected Behavior

The x button should not shrink.

Steps To Reproduce

  1. Open any rainbowkit modal so that the qr is shown for walletconnect
  2. In devtools manually edit the text node that says Scan with .... Wallet to Scan with very very very super long Wallet
  3. The x should become squished

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

https://codesandbox.io/p/sandbox/rainbowkit-forked-pz4x97?file=%2Fsrc%2FApp.js%3A18%2C35

Anything else?

the button is probably this line: https://github.com/rainbow-me/rainbowkit/blob/main/packages/rainbowkit/src/components/ConnectOptions/DesktopOptions.tsx#L570

The solution is probably just to add flex-shrink: 0;

image
@midas-myth
Copy link
Author

Also while we are at it. I noticed that even in the sandbox provided there is another issue. The modal seems to be cropping the content which may result in GET button being fully invisible.

image

@magiziz
Copy link
Contributor

magiziz commented Mar 13, 2024

@midas-myth We're working on improving the internalisation UI for when GET button gets almost hidden, for now it kind of works, but we'll prioritise to support that soon.

Regarding the squished part of the X i think it's fine that it is like that, we always review wallets before adding them and we've not had any wallets which had a super long name. The longest wallet name we have is probably "Bifrost wallet" and that works fine for all languages. Let me know if you've got any other issues, i'll close this one for now and the team will look into making internalisation UI more friendly 🙏

@magiziz magiziz closed this as completed Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants