lightning-browser-extension icon indicating copy to clipboard operation
lightning-browser-extension copied to clipboard

Display icon next to balance in the pop up or remove it if it cannot be displayed properly

Open MoritzKa opened this issue 3 years ago • 5 comments

Describe the bug

The (bee?) icon is not displayed properly on Chrome (Windows)

Screenshots of the changes [optional]

5kdjIvopc8

To Reproduce

Steps to reproduce the behavior:

  1. Open the extension
  2. Select an Alby account

Expected behavior

a properly displayed icon or no icon at all

Alby information

  • Alby Version: [e.g. 1.5.0]
  • Alby installed through [e.g. installed through the browser stores, installed manually]
  • Wallet connected with Alby [e.g. LND, BlueWallet LNDhub]

Device information [optional]

  • OS: Windows
  • Browser: Chrome and Firefox
  • Browser Version: Chrome Version 105.0.5195.127

Are you working on this issue?

No

MoritzKa avatar Oct 05 '22 11:10 MoritzKa

not super urgent. but fix should be quick anyway.

MoritzKa avatar Oct 05 '22 11:10 MoritzKa

finally somebody reports that. this has been there forever :) it is because we cut off the emoji (which comes from the alby lnd node alias) in the middle. - substr is not utf8 aware.

bumi avatar Oct 05 '22 12:10 bumi

LNbits works great.

Screenshot 2022-10-06 at 19 59 41(1)

rottingcleaner avatar Oct 06 '22 18:10 rottingcleaner

@rottingcleaner that name is short enough ;) This i.e. looks bad: image

If it's longer it will break, because we use substring:
https://github.com/getAlby/lightning-browser-extension/blob/master/src/app/components/AccountMenu/index.tsx/#L40

I think this should be handled via CSS (ellipsis) instead of JS cutting of the string hard.

escapedcat avatar Oct 07 '22 04:10 escapedcat

@escapedcat I saw the line, then tested with my LNbits account and it was fine ;)

A CSS solution is a better way to cut the title on this place.

rottingcleaner avatar Oct 07 '22 06:10 rottingcleaner