-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Add webpacker compatibility with config switch and installation generator #5855
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congrats!
Thanks @sgara! I haven't missed this, I'll have a closer look soon but it looks like a good first initial step in principle! |
thanks @deivid-rodriguez, no hurry. I'm already taking a look at the next step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starting to look into this. I added a few comments!
90b7f19
to
ad6f302
Compare
ad6f302
to
9f37c55
Compare
Finally getting there! |
@sgara I got an error
|
Thanks for the feedback @nyrf I’ll look into it 👍 |
@sgara I think that because of style file wouldn't be generated in development environment, so the style file seems like active_admin_application.stylesheets.each do |style, options|
stylesheet_tag = active_admin_namespace.use_webpacker ? stylesheet_pack_tag(style, options) || "" : stylesheet_link_tag(style, options)
text_node(stylesheet_tag.html_safe)
end |
@nyrf should be fixed now, thanks for testing 👍 |
@sgara It works. thanks for your work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great thanks! Just a suggestion on automating the webpacker environment config too.
Any chances we can merge it before 2.6 release? =^..^= |
2aed4c4
to
74b3a7d
Compare
85e86fc
to
a1350c0
Compare
I have to go back into it, it's been such a while now I forgot most of it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sgara Added a final pass of comments. At this point really minor, I'm almost ready to merge and ship this! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me! Just last tiny comments about the new Gemfile
:
-
Can you run
BUNDLE_GEMFILE=gemfiles/rails_60_webpacker/Gemfile bundle lock --add-platform java
and commit the result? This makes it so thatjruby
developers don't get warnings when bundling theGemfile
. It will be done by default by the nextbundler
version, but it's not yet released. -
Can you pin the
rails
dependency like it's done in master for the otherGemfile
s? This is so that we still get the warnings fixed, but dependabot doesn't create PRs for every commit in Rails.
Other than these minor things, this looks good!
@javierjulio Any comments from your side? Does this look good to you?
I’ll make the changes tonight I think. Glad to see the end of the road! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @sgara for all your work here! It looks great. ❤️ All I have are minor comments. Majority are just text changes. Thanks David!
lib/generators/active_admin/install/templates/active_admin.rb.erb
Outdated
Show resolved
Hide resolved
lib/generators/active_admin/install/templates/active_admin.rb.erb
Outdated
Show resolved
Hide resolved
lib/generators/active_admin/webpacker/templates/active_admin.js
Outdated
Show resolved
Hide resolved
Fix linting issue
3b8494e
to
9355880
Compare
Update webpacker Gemfile.lock Update Gemfile.lock Update webpacker gemfile to silence ruby 2.7 warnings Lock jruby dependencies Lock rails version Update Gemfile.lock
Use `generate` instead of `rake` for asset setup Clean duplicated comments Fix installation generator typo
bf1c2c4
to
c7729ae
Compare
Skip asset generation in case of conflicts Update rails_template.rb Put back turbolinks setup to previous rails template location
Update installation instructions Co-Authored-By: David Rodríguez <deivid.rodriguez@riseup.net>
Remove circleci/config.yml trailing whitespace
Update rails_template.rb
Co-Authored-By: Javier Julio <javierjulio@icloud.com>
c7729ae
to
8c5ed9d
Compare
Applied changes from both @deivid-rodriguez and @javierjulio reviews and cleaned git history a bit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wowowowowoooo 🎉, this is so awesome and sooooo long due, THANK YOU!!!
The changes in the changelog collide with #6133, but I don't mind rebasing my changes after this one, so... 👍 from me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Massive effort. Thanks so much @sgara for seeing this through! 👌🏻 We really appreciate it. ❤️
Great, I'll be releasing a new version very soon, thanks everyone, specifically @sgara for his massive effort! |
Why did we not let users use both webpacker and sprockets at the same time? If i make a PR to fix this, would that be accepted? |
@ziaulrehman40 yes, I'd be interested to see what's involved. |
After reading a few issues and related discussions (see #5829, #5551 and #5048), and willing to switch to webpacker myself, I wanted to propose a first step toward moving to webpacker. This is of course open to discussion. The goal here is to be able to simple switch to loading active_admin assets from webpack instead of sprockets. Also introduced a gemfile to generate development app running webpacker although there is no js nor css at the moment.
To me, the next step would be to create a npm package from sources present in this repo already. Note that a few changes may be required, I'm not sure we can have one set of assets compatible with both webpack and sprockets. But that can be discussed separately I guess