adobe / franklin-dashboard

Apache License 2.0
4 stars 2 forks source link

Make echarts optional #27

Closed langswei closed 9 months ago

langswei commented 9 months ago

Not all pages on the dashboard require charting capabilities, so let's provide the ability for a page to say "do not load echarts library" which is currently loaded by default in delayed.js. I have no specific implementation to recommend.

MarquiseRosier commented 9 months ago

Nice! I was just thinking this! Hmmmm; we can create some kind of shared object; again using the window object, and delay.js will just check the window object for any code it has to run? We will just have the blocks signal whether something will be used!

langswei commented 9 months ago

I was just looking into https://www.hlx.live/developer/block-collection/metadata which is probably our lowest-code solution. We would only need an OOTB block on the page and update delayed.js to look into the DOM/meta tags.

langswei commented 9 months ago

Complete, closing issue