-
Notifications
You must be signed in to change notification settings - Fork 826
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 issues with watching CSS reloading #2128
Conversation
That may be right. I'm assuming you've pushed the hot reloading quite hard and can't break it. If that method isn't called anywhere, then I'd go ahead and remove it. |
I'm going to go ahead and add tests for the hot reloading. |
@rodrigogiraoserrao Still working on those tests? |
Yeah, there wasn't a good way to test the hot reloading and take a snapshot test. |
@willmcgugan now I'm happy. |
This will close #2063.
The only reason I am a bit confident in this fix is because all the tests pass.
I am not 100% sure why this works, but I have a conjecture: the call to
reset_styles
was flagging the need to repaint a widget too soon and it was either preventing the latter refresh from happening or it was keeping some outdated information around.I got to this conclusion because setting the border property programmatically works, and the code that runs in that case is just the
__set__
in the descriptor and the layout refresh, as opposed to what happens when the CSS is reloaded, which runs many more lines of code, so I figured that the CSS reloading was “doing too much work”.Note: Playing with the code and running the tests suggests we can actually get rid of the method
reset_styles
altogether.