Skip to content
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

Update Import external scripts in Dynamic Text #690

Open
mikhail-vl opened this issue Jun 17, 2024 · 0 comments · May be fixed by #696
Open

Update Import external scripts in Dynamic Text #690

mikhail-vl opened this issue Jun 17, 2024 · 0 comments · May be fixed by #696
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@mikhail-vl
Copy link
Member

mikhail-vl commented Jun 17, 2024

Necessary changes:

  • Update screenshots
  • Remove mentioning of external scripts editor (since es modules approach is recommended, thie previous one is not supported)
  • Disabling sanitizing is not required anymore because we can't prohibit a using import function
  • Describe how to use a not esm npm package. Convert with https://esm.sh/#docs and use it. Eg. https://www.npmjs.com/package/flatpickr - esm is not supported and unable to use with import(). But can be converted and used https://esm.sh/flatpickr (a working example with flatpickr - DT with Grafana 11 fails for Date-Picker flatpickr volkovlabs-dynamictext-panel#309 (comment))
  • Use this in afterRender code to keep data for next updates. Eg. destroy chart before creating a new one. It's show in chart.js example

Following #684

@mikhail-vl mikhail-vl added the enhancement New feature or request label Jun 17, 2024
@mikhail-vl mikhail-vl added this to the Version 4.9.0 milestone Jun 17, 2024
@mikhail-vl mikhail-vl linked a pull request Jun 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

2 participants