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

style: remove custom anticon :hover style #1224

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

ath0mas
Copy link
Contributor

@ath0mas ath0mas commented Nov 27, 2023

The existing style is mostly antd default blue, and custom sets anticon :hover to be like red.
But in most buttons with icon only a reduced part is colored like this ; this change makes it be applied to the whole button removes this custom style.

btn-hover-style

Looking at antd mixins for buttons, I deal with the same pseudo-classes (:hover, :focus, and :active), and then I set the same 3 style properties (color, border-color, and background).
And this keeps the default style when the button is disabled.

Some not directly targeted elements were previously having the custom :hover style too, like some arrows for toggle blocks or dropdowns, and also the link icon at the bottom-left.
They all have the default style back as not targeted by the selectors anymore.

@eglitise
Copy link
Collaborator

Thanks for bringing this up. While this definitely looks better, it seems that this custom style was only ever used on the session page, so all of the icon-only buttons in the inspector page have always had the default hover style.
For consistency I would instead suggest simply removing this custom style entirely. The default one seems fine IMO, and sticking to defaults would make the eventual migration to antd 5 and dark mode just a bit easier.

@ath0mas
Copy link
Contributor Author

ath0mas commented Nov 27, 2023

I completely agree with you, I just thought this red style may have been decided on purpose time ago.
I let this breaking choice of removing it up to the maintainers, like you 😉.

So can I remove it?

@eglitise
Copy link
Collaborator

Sure, you can remove it 🙂

@ath0mas ath0mas changed the title Update custom anticon :hover style, to be for specific btn … Remove custom anticon :hover style Nov 27, 2023
@ath0mas
Copy link
Contributor Author

ath0mas commented Nov 27, 2023

OK done, ready.

@eglitise eglitise added the fix This resolves a user-facing problem label Nov 27, 2023
@eglitise eglitise changed the title Remove custom anticon :hover style style: remove custom anticon :hover style Nov 27, 2023
@eglitise eglitise merged commit fba140a into appium:main Nov 27, 2023
3 of 5 checks passed
@ath0mas ath0mas deleted the fix/btn-with-icon-hover branch November 27, 2023 22:44
shiva-guntoju pushed a commit to shiva-guntoju/appium-inspector that referenced this pull request Feb 2, 2024
* fix: update custom anticon :hover style, to be for specific btn and not disabled

* fix: remove custom hover colors
laib3 pushed a commit to laib3/appium-inspector that referenced this pull request Nov 16, 2024
* fix: update custom anticon :hover style, to be for specific btn and not disabled

* fix: remove custom hover colors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix This resolves a user-facing problem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants