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

Select — Add theme.select.clear.container.hover #7397

Merged
merged 4 commits into from
Oct 25, 2024

Conversation

taysea
Copy link
Collaborator

@taysea taysea commented Oct 23, 2024

What does this PR do?

Adds ability for caller to define hover styling for Clear selection container.

Adds plain to Button to maintain previous "plain" functionality of the Button once we switch into the function notation.

Where should the reviewer start?

src/js/components/Select/SelectContainer.js

What testing has been done on this PR?

Local in storybook and test added:

Screen.Recording.2024-10-23.at.3.43.38.PM.mov

How should this be manually tested?

Do Jest tests follow these best practices?

  • screen is used for querying.
  • The correct query is used. (Refer to this list of queries)
  • asFragment() is used for snapshot testing.

Any background context you want to provide?

What are the relevant issues?

Closes #7342

Screenshots (if appropriate)

Do the grommet docs need to be updated?

Yes.

Should this PR be mentioned in the release notes?

Yes.

Is this change backwards compatible or is it a breaking change?

Backwards compatible.

@taysea taysea requested a review from halocline October 23, 2024 22:53
@halocline halocline requested a review from MikeKingdom October 24, 2024 19:50
</Box>
{({ hover }) => (
<Box
{...theme.select.clear.container}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Won't this accidentally put a hover=[object, object] on the Box?

Copy link
Collaborator

Choose a reason for hiding this comment

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

image

Copy link
Collaborator Author

@taysea taysea Oct 24, 2024

Choose a reason for hiding this comment

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

It wasn't passing it to the DOM so originally I was okay with that, but I've added one more step to avoid it being passed in React props as well:

Screenshot 2024-10-24 at 2 25 45 PM

@taysea taysea requested a review from MikeKingdom October 24, 2024 21:26
Copy link
Collaborator

@MikeKingdom MikeKingdom left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

Select -- add theme.select.clear.hover
4 participants