-
Notifications
You must be signed in to change notification settings - Fork 3.4k
refactor(switch): refactor for spec changes #882
Conversation
CLAs look good, thanks! |
@robertmesserle do you know a good way to disable the transition of background-color on initial load? |
1f0d1c6
to
f9ad10c
Compare
} | ||
.md-switch-thumb { | ||
&:focus .md-label { |
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.
Switches need interaction styles for mouse, keyboard, and touch.
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.
Forgot about focus, thanks.
ngAria isn't able to compute
That data setup appears truthy to ngAria, triggering |
4717cb2
to
01d04e7
Compare
Ready for final review and merge. @marcysutton fixed both problems. |
Hi @ajoslin! 👍 👍 for this PR! I was wondering, have you figured out how to disable the background-color transition during initial loading yet? If not, you could try doing something similar to what If that doesn't work, you could try doing it the way that // Wait until all directive and route-related templates are downloaded and
// compiled. The $templateRequest.totalPendingRequests variable keeps track of
// all of the remote templates being currently downloaded. If there are no
// templates currently downloading then the watcher will still fire anyway.
var deregisterWatch = $rootScope.$watch(
function() { return $templateRequest.totalPendingRequests; },
function(val, oldVal) {
if (val !== 0) return;
deregisterWatch();
// Now that all templates have been downloaded, $animate will wait until
// the post digest queue is empty before enabling animations. By having two
// calls to $postDigest calls we can ensure that the flag is enabled at the
// very end of the post digest queue. Since all of the animations in $animate
// use $postDigest, it's important that the code below executes at the end.
// This basically means that the page is fully downloaded and compiled before
// any animations are triggered.
$rootScope.$$postDigest(function() {
$rootScope.$$postDigest(function() {
rootAnimateState.running = false;
});
});
}
); Hope that helps. I'm looking forward to this PR getting merged. Keep up the great work. |
@ajoslin I'm still seeing |
@marcysutton We use the same logic for checkbox It sounds like ngAria should take ng-false-value and ng-true-value into account. |
@mzbyszynski I just ended up doing this in the link function: // no transition on initial load
$$rAF(function() {
element.addClass('transition');
}); |
@ajoslin gotcha! I'll file a bug. |
16e00e9
to
fe36141
Compare
Fixed via 8bc9461 |
PROBLEMS: