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

Customer JS calling ActiveAdmin.modal_dialog no longer working after upgrade #5953

Closed
kernow opened this issue Dec 2, 2019 · 2 comments · Fixed by #5956
Closed

Customer JS calling ActiveAdmin.modal_dialog no longer working after upgrade #5953

kernow opened this issue Dec 2, 2019 · 2 comments · Fixed by #5956

Comments

@kernow
Copy link

kernow commented Dec 2, 2019

Hi,

I can't see any docs on how to use ActiveAdmin.modal_dialog in custom JS after the upgrading from 2.3.1 to 2.5.0. Looking through the commits I can see the JS has undergone significant changes which would explain the breakage but can't see the new way to use the modal_dialog function.

We have a app/assets/javascripts/active_admin.js file which is calling ActiveAdmin.modal_dialog, this is now raising an ActiveAdmin is not defined error.

What is the new way to do this? Our app uses webpacker so I'm happy to switch this JS to webpacker if thats the way to go now, the only sprockets JS we have in our app is some custom active admin code.

Thanks

@deivid-rodriguez
Copy link
Member

Thanks for reporting this, it does sound related to the JS refactor in preparation for webpacker support.

I'll have a look myself but pinging @sgara in case you have any ideas.

@sgara
Copy link
Contributor

sgara commented Dec 2, 2019

I’m pretty sure components aren’t exported at all as I didn’t expect those to be used in client code, sorry about that @kernow.
Webpacker compatible package is not that far from being ready though we would still need to add export statements to make this work.
I’ll check what can be done to mitigate this meanwhile

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

Successfully merging a pull request may close this issue.

3 participants