-
Notifications
You must be signed in to change notification settings - Fork 321
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
Theme switcher should not added via a script tag, in general do we support browsers w/o js ? #1920
Comments
The logic here was "the switcher won't work at all without JS, so don't even render it if JS is unavailable". I'm open to trying out your proposed approach. I'll add that the current approach may be bad practice for another reason: |
See pydata#1920, this removes every usage of document.write in favor of display:none with a noscript tag. I did have to be a little more specific for buttons as the css rule in boostrap were overwriting the *.jsonly. Note that this does not solves pydata#1920 as some things (like the more dropdown in nav bar) still require JS to work.
See pydata#1920, this removes every usage of document.write in favor of display:none with a noscript tag. I did have to be a little more specific for buttons as the css rule in boostrap were overwriting the *.jsonly. Note that this does not solves pydata#1920 as some things (like the more dropdown in nav bar) still require JS to work.
So... my personal dream would be that one could load a PST-themed docs site in Lynx and reach all the same info as someone loading the site in Chrome. In other words, everything beyond basic HTML is considered a progressive enhancement. In that same spirit, I would love to have fallbacks for all JS-powered components, such as the theme switcher. But perhaps that is not realistic. Or perhaps it doesn't stand up to a cost-benefit analysis. At any rate, I think that our current implementation could use improvement. Since we have core components that absolutely require JavaScript, we should more prominently warn users who have disabled JavaScript that the site won't completely work and disclose exactly what functionality requires JavaScript. |
the theme switcher does:
I believe this is bad practice as it will block rendering while js is executed to insert this. Which makes the theme slower. We could use I belive:
And just have whatever is js only be not displayed when there is no JS.
But in general we do rely on a bunch of other things that need JS (
More
dropdown in navbar requires js).So maybe we should assume we always have JS ?
The text was updated successfully, but these errors were encountered: