-
Notifications
You must be signed in to change notification settings - Fork 16
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
Remove the page reload when pressing reset #80
Conversation
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.
Oh yeah, sorry, I think you misunderstood me! I didn't get that far yet. I simply successfully added a class to all the initially injected styles, and successfully added that class to the body element before initial render by using mutation observers. I haven't added the actual showing / not showing functionality yet. I just wanted to check in with you before I kept working that this was the kind of approach you were thinking of? So there's nothing to physically test just as of yet, just code to look at. |
Gotcha. Carry on! |
Cool. So this was the kind of approach you were thinking of using in #63 yeah? |
Yeah I hadn't thought of your solution but it's brilliant and solves the problem in an elegant way. |
Awesome. It was simply my interpretation of what you suggested in #63 haha! |
Still very much a work in progress, but now the reset all button correctly removes all applied inline styles (it's currently assuming that Chess.com don't apply any themselves as it simply clears all inline styles, I'm assuming that's a correct assumption?) Todo:
|
Okay, I seem to have the basics working now! Any thoughts @martynchamberlin ? I'm still lacking point 2 and three from above. But normal style changing and the reset all button should be working as intended now! |
Yep that's still on the to do as mentioned above about point two and three:
|
The two above points have now been implemented! Basically there now, I might do a few more checks and have a few edge cases I'd like to test at some point before we merge it though. But as always, feel free to play around with it / check out the code and give any comments you might have. |
I think I'm happy with this PR now, I opened some issues #92 and #93 which are things I thought of while doing this, but also think they aren't necessarily directly related to this PR so made them issues instead. I believe the PR now has achieved what it set out to achieve ;). @martynchamberlin if you could look through it a final time and review if all is good? |
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.
Beautiful! I checked it in FireFox and Chrome and it's amazing. Huge improvement. Let's ship this.
Awesome I'll get around to fixing conflicts with master and get it merged in. |
That was quite a hairy merge but I'm quite certain I got it all, tested it and looked through the new diff here on the PR after, so I'll merge it in. |
This PR will end up removing the need for a page reload when pressing reset by implementing the approach outlined in #63. (resolves #63)
Currently I have just added the initial commit to check in with @martynchamberlin and anyone else that my starting approach looks okay.