-
Notifications
You must be signed in to change notification settings - Fork 495
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
Inline styles to fix style loading issues #298
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.
This looks excellent!
@mac-s-g I've tested this PR and it works smoothly. |
waiting for this |
@usulpro @Kikobeats I've found in this thread that you're now contributors of this (amazing) project. |
I'm sorry to pile in here, but I also would like this feature and have confirmed this branch works. |
Confirmed. This PR works. The unit tests actually pass. I don't have time rn to get into this Travis CI test runner misconfiguration. Anybody know how to fix it? Working example here: https://wordio.co I actually cloned the code from the latest commit in this PR, and installed it in my project. Built, committed, pushed to my own repo as a quick fix. |
testing now |
migrating discussion to #311 which contains commits to this repo. it's just making it easier for me to resolve the conflicts. thank you to everyone contributing to the code and discussion. |
Hooray, thanks @mac-s-g ! |
Thank you @mac-s-g ! |
@thomasjm, just to confirm, have you tested the new version with success? I'm getting a strange problem with unit tests/code coverage and I want to confirm if it's only happening to me. I've tried to remove it from coverage in jest.config but without success. |
This is meant to fix #121 .
The culprit was the styles in
src/style/scss/global.scss
, which required the use ofstyle-loader
, which doesn't work in SSR settings.At first I tried switching it to
isomorphic-style-loader
, but that still felt too troublesome and heavyweight. It's such a small amount of styles that it was easiest to just inline them.The main challenge was converting
&:hover
selectors to React state. I think I did this correctly, but if I missed any places it will manifest as some of the buttons appearing/not appearing when they're not supposed to with respect to hover. It would be good if someone familiar with this library could donpm run dev
on this PR and click around to make sure everything still works the same.I also upgraded a bunch of the dev dependencies like
webpack
. Note thatcss-loader
/sass-loader
/style-loader
etc. are still present because they're used in the demo build. It would be good to inline things there too and get rid of all style loader stuff.Thanks to @justinmchase for pinpointing the issue.