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

Module support for custom_javascript_files #3487

Open
robinkar opened this issue Apr 2, 2024 · 0 comments
Open

Module support for custom_javascript_files #3487

robinkar opened this issue Apr 2, 2024 · 0 comments

Comments

@robinkar
Copy link
Contributor

robinkar commented Apr 2, 2024

We currently depend on some external JS libraries (used in dashboard widgets) which need to be imported as <script type="module></script>, but this does not seem to be supported by the custom_javascript_files configuration option. This is something we would want to have.

Right now, we include those scripts by copying the whole application.html.erb to /etc/ood/config/apps/dashboard/views/layouts/application.html.erb and modifying the HTML <head> there, but this is somewhat fragile as we can not rely on the same application.html.erb working across OOD versions.

As an alternative solution to module support for custom_javascript_files, better support for customization of <head> would also work well for us. It seems like that would be relatively simple to implement. There could be a partial, e.g. views/layouts/_head.html.erb, which is empty, but gets rendered into the HTML <head>. That way, it would be possible to place any custom <head> content into /etc/ood/config/apps/dashboard/views/layouts/_head.html.erb without worrying about breakage (compared to our current method).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants