-
Notifications
You must be signed in to change notification settings - Fork 494
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
Version picker #90
Version picker #90
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.
Great work @jonaskuske! Like I've mentioned before, I love the version picker and how easy it makes installation.
I've requested a few changes and added some feedback in my review.
Since water.css v2 with CSS variables is not officially published yet, the legacy non-standalone versions don't work, as they reference the CDN. (Also, the README instructions are wrong as v2 is merged but not published...)
Yup, we'll need v2 published to NPM before merging. cc @kognise
Docs files are currently located in docs/ and then compiled to dist/docs. I don't know what makes most sense here, but the Netlify config needs to be adjusted one way or another.
That's okay, we can always move it later. Again, cc @kognise on the Netlify config.
File size information is currently hard-coded into the JS, but we should aim to integrate this with our build step so file sizes on the docs page are automatically updated with every re-build. But I'd say that's a future concern and no merge-blocker, unlike the other two points.
I agree, great solution for now and we can integrate this later into our build tools.
You can specify the initial selected version via URL parameters theme=dark|light, standalone and legacy, e.g. index.html?theme=light&standalone which can be handy when linking to it from the docs.
Nice bonus feature! Great idea.
Two notes:
|
+ prevent potential error in getFileSize()
& use HTML entity for space before emoji
+ legacy option defaults to true when opened in legacy browsers
49f20aa
to
8113c5b
Compare
only remove startup stylesheet on first JS style load
Okay @kylejrp @kognise , anything else preventing this from getting merged? I've just updated the build step so the I think these are the next steps:
|
I've emailed @kognise and would love to get this merged. We just need the netlify configuration up to date. Once we hear back from @kognise, we can get the branch up to date and resolve any merge conflicts. Then we can get @jonaskuske's hard work finally into master. Thanks so much for your patience. |
Hey @kognise, any chance you can still update the Netlify configuration so that the publish directory is |
Mentioned over in the Next Steps issue (#187) that we might want to re-visit and potentially streamline the version/naming strategy. That's because basically all relevant browsers support But updating the UI of the docs site is no breaking change of course, so if we keep all file names the way they are we can just merge this and improve the UI later – in that case I'd create a separate issue. |
Sounds awesome - if we end up doing what I outlined in my last reply to #187 it might be better to make the ui changes in a separate pull request. |
I'm going to close this pr because I've already manually merged it into the |
I built the version picker to choose between the different available builds, feedback welcome!
Preview link: https://deploy-preview-90--watercss.netlify.com/dist/docs/
A few notes:
docs/
and then compiled todist/docs
. I don't know what makes most sense here, but the Netlify config needs to be adjusted one way or another.theme=dark|light
,standalone
andlegacy
, e.g.index.html?theme=light&standalone
which can be handy when linking to it from the docs.fix #27, fix #88, fix #84, fix #89