-
Notifications
You must be signed in to change notification settings - Fork 89
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(btn): don't render visited colors on outlined btn #1847
base: develop
Are you sure you want to change the base?
Conversation
Thanks @dancormier. How can we test this? I'm wondering if it's worth adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to add visual regression tests also for hover and visited states, although I think it would create a huge amount of screenshots even if we generate them in a separate test file. An option for snowflakes like this could be to just test that specific variation as a one off in a separate file (e,g, button.snowflakes.visual.test.ts
) manually without our test-utils method.
I will leave it up to you Dan if you want to spend some time experimenting with it or save it for later.
@abovedave there are so many variants of the button that to properly illustrate anchor-based As far as testing goes, I only have a clunky suggestion of running this locally and temporarily modifying the docs page to include this variant, then resetting the change.
@giamir I considered it, but I think it's a similar issue as with what I said above about the docs. Of the ~2600 images currently generated, over 900 of them are for the button component already. If they ran really quickly, I'd consider adding a test to generate hover/visited states, but I'm apprehensive to add more visual button tests since they already take a while to render. |
What about the snowflake idea? Just testing this specific case combo where we observed the issue? That should only add 3 more images I guess - one per browser. Not sure if it's worthy though. |
@giamir I spent a moment today trying to create a test to generate an image of this button in its hover and visited state. Just speaking of hover, I tried using None of these approaches worked to have simulate a hover state. I also tried a few ways of simulating visited (such as setting |
Agree. We can merge this PR as is. I have spent some time as well, checking how easy would be to test |
Quick bug fix for unexpected border color being applied to
.s-btn.s-btn__outlined:hover:visited
. When an outlined button is being hovered and is visited, it shows a black border when it should show a theme color border. This happens in Chrome but not Firefox and seems to be an issue with how a given browser honors the cascade.From slack thread: