You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
proposal. Set serve_locally = True by default #284
Would switching this break anyone's code? There is some weird logic where if serve_locally = True then any scripts or stylesheets appended with an external_url won't work (the original idea being that there would be two versions of each resource supplied, one local and one external, and you could swap between the two. That's how the component library's stylsheets and scripts are included. However, in practice, we end up just doing app.scripts.append_script({'external_url': ...})). So, we would have to remove that logic in a way that doesn't end up including the component's resources twice. All of that stuff should be reworked anyway.
IIRC there was some issue with serving up your own CSS as well as serving locally, or something like that. Worth making sure that #265 is compatible with serve_locally=True without any downsides
If we can smooth over the transition issues then I think serve_locally =
True by default would make a lot of sense. We should aim for a default path
of least friction, which I think this is.
Activity
valentijnnieman commentedon Jul 10, 2018
I don't see why not! 👍
nicolaskruchten commentedon Jul 10, 2018
Yes, yes, yes! The slight performance boost from the CDN is probably not worth the headache and perception of requiring outbound connections.
chriddyp commentedon Jul 10, 2018
I think I'm 👍 with this as well.
A few notes for discussion:
serve_locally = Truethen any scripts or stylesheets appended with anexternal_urlwon't work (the original idea being that there would be two versions of each resource supplied, one local and one external, and you could swap between the two. That's how the component library's stylsheets and scripts are included. However, in practice, we end up just doingapp.scripts.append_script({'external_url': ...})). So, we would have to remove that logic in a way that doesn't end up including the component's resources twice. All of that stuff should be reworked anyway.nicolaskruchten commentedon Jul 10, 2018
IIRC there was some issue with serving up your own CSS as well as serving locally, or something like that. Worth making sure that #265 is compatible with
serve_locally=Truewithout any downsidesT4rk1n commentedon Jul 10, 2018
I think it should be set to True if
debug = True, what I have for the static files is compatible with theserve_locallyoption.ned2 commentedon Jul 11, 2018
Merge pull request plotly#284 from plotly/282-tabs-content-fix