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

Fix collectible hover button #4971

Closed
fabric-8 opened this issue Feb 22, 2024 · 13 comments · Fixed by #5586 or #5611
Closed

Fix collectible hover button #4971

fabric-8 opened this issue Feb 22, 2024 · 13 comments · Fixed by #5586 or #5611
Assignees
Labels
area:collectibles Issues related to non-fungible tokens (NFTs) effort:small Expected to take up to 1 day of integration work needs:visual-improvement

Comments

@fabric-8
Copy link
Contributor

fabric-8 commented Feb 22, 2024

When hovering the callout button that appears on top of the collectible preview, the button becomes transparent. Instead we'd like the button to stay opaque while applying the hover effect as an overlay.

Image

Solution suggestion: At this point this is a one-off case for collectibles. Hence we suggest to solve this locally vs. systematically. For example, we could simply wrap the button in a container with bg background-primary, with the button staying transparent and using the transparent hover effect via the corresponding component background hover token (as is applied now).

PS: New icon is assuming new icon library is in place

@fabric-8 fabric-8 added bug-p3 Non-critical functionality broken for many users, or there are clear workarounds effort:small Expected to take up to 1 day of integration work area:collectibles Issues related to non-fungible tokens (NFTs) labels Feb 22, 2024
@markmhendrickson markmhendrickson added needs:visual-improvement and removed bug-p3 Non-critical functionality broken for many users, or there are clear workarounds labels Mar 15, 2024
@pete-watters pete-watters self-assigned this Jun 28, 2024
@pete-watters
Copy link
Contributor

I made this change as requested @fabric-8 . Let me know if it looks OK

Area.mp4

@fabric-8
Copy link
Contributor Author

fabric-8 commented Jul 1, 2024

@pete-watters Thanks for improving this! Minor thing I am wondering about: It's still using the rounded shape / prior size, any chance we can align this with the design system so it uses a 32x32 rectangular shape with border-radius?

@pete-watters
Copy link
Contributor

@pete-watters Thanks for improving this! Minor thing I am wondering about: It's still using the rounded shape / prior size, any chance we can align this with the design system so it uses a 32x32 rectangular shape with border-radius?

Sure. I hadn’t noticed that, I will standardise it with the design system ASAP

@pete-watters pete-watters reopened this Jul 1, 2024
@pete-watters
Copy link
Contributor

pete-watters commented Jul 2, 2024

Does this look OK now? I don't have a good eye for these small changes

New:
Screenshot 2024-07-02 at 07 29 20

Old:
Screenshot 2024-07-02 at 07 29 33

#5592

kyranjamie pushed a commit that referenced this issue Jul 2, 2024
## [6.42.2](v6.42.1...v6.42.2) (2024-07-02)

### Bug Fixes

* add ledger test for bitcoin api calls, close leather-io/issues[#114](#114) and [#5574](#5574) ([26b6b4f](26b6b4f))
* add network form bitcoin network selector ([2169065](2169065))
* adjust collectible arrow hover transparancy, closes [#4971](#4971) ([4571ad7](4571ad7))
* apply spamFilter to all crypto captions and titles, ref leather-wallet/issues[#5589](#5589) ([ed284b9](ed284b9))
* asset row skeleton loader, closes [#5466](#5466) ([9b1c8c7](9b1c8c7))
* integrate tabs, toast, avatar, address  ref leather-wallet/issues[#64](#64) ([930c125](930c125))
* ledger bitcoin query ([a11f6a6](a11f6a6))
* refactor dialog to use IconButton to fix title without affecting header, closes [#5470](#5470) ([a5011ec](a5011ec))
* remove extra div, ref leather-io/issues[#5469](#5469) ([abdaab5](abdaab5))
* responsive width for popup ([c61ced0](c61ced0))
* roll back import of dropdown menu,  ref leather-wallet/issues[#64](#64) ([b03d6af](b03d6af))
* stx send form high fee warning, closes [#5362](#5362) ([0af3ae9](0af3ae9))
* **ui:** center header, ref leather-io/issues[#5470](#5470) ([53d1e6c](53d1e6c))
* use dialog from monorepo,  ref leather-wallet/issues[#108](#108) ([de2b5a0](de2b5a0))
* use DropDown menu from monorepo for Settings,  ref leather-wallet/issues[#102](#102) ([65131b0](65131b0))

### Internal

* **analytics:** use uniform api with middlewear, remove wrapper fns ([c82ed26](c82ed26))
* install @leather-wallet/ui package, ref leather-wallet/issues[#64](#64) ([12dca36](12dca36))
* post-release merge back ([834d399](834d399))
* remove radix-ui base css styles, ref leather-wallet/issues[#104](#104) ([d5ebb6b](d5ebb6b))
* rename github org ([5d42eeb](5d42eeb))
* rename npm package scope ([7851c44](7851c44))
* specify resolution for ws ([ff74653](ff74653))
* undo width change ([d3595f4](d3595f4))
* update dependancies ([62500b8](62500b8))
* update monorepo dependancies ([7ec537b](7ec537b))
* update monorepo packages ([263adcd](263adcd))
* upgrade react query to v5 ([6184a3d](6184a3d))
@markmhendrickson
Copy link
Collaborator

@pete-watters are you referring to this design guidance in the description of this issue? It looks quite different than your latest change, in terms of icon asset and styles

image

@markmhendrickson
Copy link
Collaborator

I don't have a good eye for these small changes

Let's pull the details directly from Figma so they don't have to be eye-balled?

@fabric-8
Copy link
Contributor Author

fabric-8 commented Jul 3, 2024

@pete-watters All that needs to be done here:

  • Change button border-radius to xs (2px)
  • Change button-size: 30px → 32px
  • use external-link icon (From what I can tell we're currently rotating the arrow which won't be necessary anymore)

@pete-watters
Copy link
Contributor

pete-watters commented Jul 3, 2024

Thanks @markmhendrickson & @fabric-8 . I was working on this yesterday evening but forgot to update the ticket.

My mistake here was I focused on fixing the hover effect and didn't actually realise I had to replace the icon also. (@fbwoolf helped me spot that)

I have it working as you say above Fab but when I check Figma this button has a padding of 8px around the icon so the hover isn't working perfectly there.

No button padding:

Screenshot 2024-07-02 at 17 28 38

Padding:

Screenshot 2024-07-02 at 17 29 05 (1)

I take it that this padding is necessary so it looks right? When I add padding it is effecting the hover state and there is a small gap around the edges. I can continue to work on that

@fabric-8
Copy link
Contributor Author

fabric-8 commented Jul 3, 2024

Yes with padding looks good and sorry for the hassle 🙈

@pete-watters
Copy link
Contributor

Yes with padding looks good and sorry for the hassle 🙈

No need to be sorry, it's my fault, I should have checked the screenshot in more detail before.

I'll open a PR for review with the padding as it doesn't look 100% right. It's hard to see in the screenshot but there is a slight visible gap in the hover overlay due to the padding

@pete-watters
Copy link
Contributor

pete-watters commented Jul 4, 2024

@fbwoolf said she can add the final touches here and get the hover effect working in the IconButton component itself #5600 (comment)

Thanks Fara!

@fbwoolf
Copy link
Contributor

fbwoolf commented Jul 4, 2024

@pete-watters the fix ended up being real simple here based on my changes in this commit:
ea297d9

All I had to do was add a bg="ink.background-primary" to the div wrapping the entire IconButton so it always had a background underneath it.

Screenshot 2024-07-04 at 8 42 36 AM

Screenshot 2024-07-04 at 8 42 41 AM

fbwoolf added a commit that referenced this issue Jul 4, 2024
@fbwoolf fbwoolf linked a pull request Jul 4, 2024 that will close this issue
@pete-watters
Copy link
Contributor

@pete-watters the fix ended up being real simple here based on my changes in this commit: ea297d9

All I had to do was add a bg="ink.background-primary" to the div wrapping the entire IconButton so it always had a background underneath it.

Screenshot 2024-07-04 at 8 42 36 AM

Screenshot 2024-07-04 at 8 42 41 AM

Thanks @fbwoolf 👏 I tested it and it's looking great.

I'm not sure how I didn't figure this out but glad to be part of a great team

github-merge-queue bot pushed a commit that referenced this issue Jul 4, 2024
kyranjamie pushed a commit that referenced this issue Jul 15, 2024
## [6.43.0](v6.42.2...v6.43.0) (2024-07-15)

### Features

* add Leather to WBIP004 array, closes [#5615](#5615) ([e38f6ab](e38f6ab))
* mock mainnet btc blockstream requests ([16d751c](16d751c))

### Bug Fixes

* choose account prevent bug, closes [#5509](#5509) ([89500a8](89500a8))
* collectible hover, closes [#4971](#4971) ([7728eeb](7728eeb))
* confine clickable area of account switcher to account name and chevron, closes [#5621](#5621) ([472c7e4](472c7e4))
* dust change amounts, closes [#4979](#4979) ([8b40ea7](8b40ea7))
* increase zIndex of tooltip to prevent it being obscured, closes [#5622](#5622) ([a1f86bb](a1f86bb))
* show account name in signPsbt and signBip322 header, ref [#4657](#4657) [#4859](#4859) ([71f2565](71f2565))

### Internal

* add new analytics events ([3f9548e](3f9548e))
* post-release merge back ([c1bbf89](c1bbf89))
* reenable swaps, closes leather-io/issues[#98](#98) ([5faba22](5faba22))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment