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

Support for custom JS files #2786

Closed
robinkar opened this issue Apr 28, 2023 · 4 comments · Fixed by #2791
Closed

Support for custom JS files #2786

robinkar opened this issue Apr 28, 2023 · 4 comments · Fixed by #2791
Milestone

Comments

@robinkar
Copy link
Contributor

robinkar commented Apr 28, 2023

The new custom CSS feature (#2150) introduced in OOD 3.0 is quite nice. It would be nice to have a similar feature available for including custom JS files.
As an example, the JS we would like to include consists of Matomo tracking code and some code used in all interactive app forms, which we would like to avoid copying across all of the form.js files and include globally instead.

Currently, we include these JS files by overriding views/layouts/application.html.erb, but an officially supported method for accomplishing this would be great.

┆Issue is synchronized with this Asana task by Unito

@osc-bot osc-bot added this to the Backlog milestone Apr 28, 2023
@johrstrom
Copy link
Contributor

Hi, thanks for the ticket. I recall someone else (maybe CSC) wanting Matomo support directly so that could be an option.

I'm a little weary to add this directly. It could introduce a big vulnerability. On the other hand, there's clearly something you need that we don't support directly so ... it does add support for a lot of things indirectly.

@abujeda
Copy link
Contributor

abujeda commented May 1, 2023

Created an implementation proposal based on the custom CSS feature:
#2791

@johrstrom
Copy link
Contributor

Yea thinking about this again, it really comes down to having a strong CSP and if we can secure the assets we serve, which that PR seems to do.

@robinkar
Copy link
Contributor Author

robinkar commented May 2, 2023

Hi, thanks for the ticket. I recall someone else (maybe CSC) wanting Matomo support directly so that could be an option.

I'm a little weary to add this directly. It could introduce a big vulnerability. On the other hand, there's clearly something you need that we don't support directly so ... it does add support for a lot of things indirectly.

I think that might have been us at CSC wanting Matomo support indeed. We do some slight customization of what data is reported though, so not sure if a generic solution would be suitable for us. We for example sanitize the files app URLs and add tracking for Shell app launches.

Created an implementation proposal based on the custom CSS feature: #2791

That is great, thank you.

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

Successfully merging a pull request may close this issue.

4 participants