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: update collectible hover icon, closes #4971 #5600

Closed
wants to merge 3 commits into from

Conversation

pete-watters
Copy link
Contributor

@pete-watters pete-watters commented Jul 3, 2024

This PR:

Some more work is needed as on hover there is still as slight gap around the icon related to the button padding as you can see here:
https://github.com/leather-io/extension/assets/2938440/2dc6f147-9f18-4fe7-8804-55c922d36a51

@pete-watters pete-watters requested a review from fabric-8 July 3, 2024 13:38
@pete-watters pete-watters self-assigned this Jul 3, 2024
Copy link

coderabbitai bot commented Jul 3, 2024

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@pete-watters pete-watters linked an issue Jul 3, 2024 that may be closed by this pull request
@pete-watters pete-watters force-pushed the fix/4971/collectible-action-hover branch from dba5879 to f68714d Compare July 3, 2024 13:46
@pete-watters pete-watters force-pushed the fix/4971/collectible-action-hover branch from f68714d to cc43751 Compare July 3, 2024 13:48
height="30px"
_hover={{ bg: 'ink.component-background-hover' }}
/>
<styled.div bg="ink.background-primary" padding="space.01">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The padding space.01 is needed so that the button looks right however this means on hover there is a visible gap and difference in colour.

If I apply the _hover={{ bg: 'ink.component-background-hover' }} to this wrapper then in light mode when you hover the button colour makes it look transparent as per #4971 .

I tried a few things here including negative margin but can't figure it out yet

@markmhendrickson markmhendrickson requested a review from fbwoolf July 3, 2024 14:13
@fbwoolf
Copy link
Contributor

fbwoolf commented Jul 4, 2024

@pete-watters I made a commit here, am I missing something or aren't the changes this simple? The IconButton is pretty well setup to receive these adjustments from what I see, if anything changes should be made to the component in the mono repo if needed? I'm not sure why you were adding a div around the icon passed to it? If nec, we could create a new recipe for the icon button and/or not use the Button component at all for it and create it's own variants, but I think the changes here are actually pretty simple? The button should already have the 2px corners.

cc @fabric-8 @markmhendrickson for design review here:

Screenshot 2024-07-03 at 7 49 52 PM Screenshot 2024-07-03 at 7 49 33 PM

@fbwoolf fbwoolf requested a review from kyranjamie July 4, 2024 01:00
@pete-watters
Copy link
Contributor Author

@pete-watters I made a commit here, am I missing something or aren't the changes this simple? The IconButton is pretty well setup to receive these adjustments from what I see, if anything changes should be made to the component in the mono repo if needed? I'm not sure why you were adding a div around the icon passed to it? If nec, we could create a new recipe for the icon button and/or not use the Button component at all for it and create it's own variants, but I think the changes here are actually pretty simple? The button should already have the 2px corners.

cc @fabric-8 @markmhendrickson for design review here:

Screenshot 2024-07-03 at 7 49 52 PM Screenshot 2024-07-03 at 7 49 33 PM

Thanks @fbwoolf . This change doesn't give the icon itself a hover of ink.component-background-hover. That's the tricky part I was asking for help with here

The icon needs to look as we both made it but then on hover it should apply a colour effect of ink.component-background-hover to the full area of the button without disappearing in light mode.

  • applying the hover bg to the ExternalIcon leaves a gap of 8px of hover colour due to the padding
  • applying it to IconButton makes it disappear when in light mode

Here is a video demonstrating it:
https://github.com/leather-io/extension/assets/2938440/935a3b5d-5707-4a79-81e0-0e3edb5f3585

@kyranjamie @alter-eggo maybe you have some ideas on how to solve this?

@fbwoolf
Copy link
Contributor

fbwoolf commented Jul 4, 2024

@pete-watters I made a commit here, am I missing something or aren't the changes this simple? The IconButton is pretty well setup to receive these adjustments from what I see, if anything changes should be made to the component in the mono repo if needed? I'm not sure why you were adding a div around the icon passed to it? If nec, we could create a new recipe for the icon button and/or not use the Button component at all for it and create it's own variants, but I think the changes here are actually pretty simple? The button should already have the 2px corners.

cc @fabric-8 @markmhendrickson for design review here:

Screenshot 2024-07-03 at 7 49 52 PM Screenshot 2024-07-03 at 7 49 33 PM

Thanks @fbwoolf . This change doesn't give the icon itself a hover of ink.component-background-hover. That's the tricky part I was asking for help with here

The icon needs to look as we both made it but then on hover it should apply a colour effect of ink.component-background-hover to the full area of the button without disappearing in light mode.

  • applying the hover bg to the ExternalIcon leaves a gap of 8px of hover colour due to the padding

  • applying it to IconButton makes it disappear when in light mode

Here is a video demonstrating it:

Area.mp4

@kyranjamie @alter-eggo maybe you have some ideas on how to solve this?

Got it, I can fix that, np. I didn't see a hover to the icon in the designs so misssed that was the issue. You want to reassign the issue to me? Happy to fix that part.

@fbwoolf
Copy link
Contributor

fbwoolf commented Jul 4, 2024

I think it makes more sense to change the IconButton itself so it can handle the icon hover? Still don't totally understand wrapping the icon here?

@pete-watters
Copy link
Contributor Author

I think it makes more sense to change the IconButton itself so it can handle the icon hover? Still don't totally understand wrapping the icon here?

Thanks @fbwoolf . The wrapping solution was a suggestion from Fab in his initial report: #4971 (comment)

It works in that the icon doesn't disappear but then it has this spacing issue. With what I got released last time, the hover effect is working but it's using the old icon.

I can re-assign to you. It's not an urgent thing to work on so no panic

@pete-watters pete-watters deleted the fix/4971/collectible-action-hover branch July 8, 2024 17:30
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

Successfully merging this pull request may close these issues.

Fix collectible hover button
2 participants