-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(switch): Move component specific logic out of foundation #3342
Conversation
All 337 screenshot tests passed for commit 14f81ee vs. |
Codecov Report
@@ Coverage Diff @@
## master #3342 +/- ##
==========================================
- Coverage 98.13% 98.12% -0.01%
==========================================
Files 123 123
Lines 5194 5185 -9
Branches 638 638
==========================================
- Hits 5097 5088 -9
Misses 97 97
Continue to review full report at Codecov.
|
All 337 screenshot tests passed for commit 528bc95 vs. |
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.
Removing the init
code from the foundation regresses #3147. (The two #init
tests you removed are meaningful to this.)
Maybe we can relocate that handleChange
call to the component's initialSyncWithDOM
, but we would also need to pass in a mock event/target based on the initial state, and that seems maybe a little hacky.
Re: #3147, "Firefox would remember the state of the hidden input element on refresh " How do I reproduce this bug? |
In Firefox:
Or, in Chrome, it can be reproduced via browser history:
During the last step, the switch doesn't move... because it was actually already toggled, but its UI wasn't in sync with the fact that the browser recalled its state. |
…f sync with styling
Okay i fixed this bug where the checked state can be out of sync with the styling. I moved the logic to the vanilla component in the |
All 353 screenshot tests passed for commit 632b550 vs. |
FYI I think this needs a |
All 353 screenshot tests passed for commit 69dca96 vs. |
All 353 screenshot tests passed for commit c9ea47b vs. |
All 353 screenshot tests passed for commit 62325ac vs. |
All 353 screenshot tests passed for commit 9c0081b vs. |
No description provided.