paulopes / panel-components

HTML components for Panel templates
Apache License 2.0
6 stars 1 forks source link

Why is it so important to be able to copy and serve local assets? #13

Open MarcSkovMadsen opened 4 years ago

MarcSkovMadsen commented 4 years ago

I can see the Component code contains a lot of functionality for making the local assets available by copying them from a www folder to a static folder.

image

With the TemporaryResources context manager it is no longer nescessary to hard code and potentially serve Bokeh/ Panel assets. All that can be done in the normal Bokeh/ Panel way and the user can specify him/ her self whether to use CDN or inline resources as documented in those frameworks.

So left are assets from other packages panel-bootstrap-vue and from the project of the user him self.

I believe the panel-bootstrap-vue could/ should use a CDN to serve the assets?

I believe the local assets of the project should just be put in the static folder if nescessary. No need to support a copy from a www folder or similar.

Solution

Simplify Component and user experience by removing functionality.

Alternatively document functionality. Why it is needed. How to use it.

Additional Context

I'm not sure I understand all the use cases here. Alternatively I would really like to learn why this functionality is important.

MarcSkovMadsen commented 4 years ago

Ahh. I can see it's not only about the .js and .css. It's actually also about image and font files. Either those can be served. Alternatively they can be inlined via make_inline_uri.

paulopes commented 4 years ago

I think that you and I have different use cases. I need to be able to not depend on the availability of the internet and CDNs.