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

Introduce Webpacker and component approach #520

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

DanilAgafonov
Copy link

@DanilAgafonov DanilAgafonov commented Aug 24, 2018

Summary

In this PR we replace Asset Pipeline with Webpacker.

  • Adapt markup for Foundation 6.4. (Flexbox and Float grids has been deprecated and now we need to use XY grid: app/views/application/_footer.html.slim already adapted) (Pagination need to be updated too)
  • Use component approach (https://evilmartians.com/chronicles/evil-front-part-1)
  • Review styles previously located in app/assets/stylesheets/components/. Maybe this styles are not needed now. If they needed, move it as style for specific component.

Test plan

List of steps to manually test introduced functionality:

  • Go to Application
  • Sign in
  • ...

Review notes

While reviewing pull-request (especially when it's your pull-request),
please make sure that:

  • you understand what problem is solved by PR and how is it solved
  • new tests are in place, no redundant tests
  • DB schema changes reflect new migrations
  • newly introduces DB fields have indexes and constraints
  • routes are RESTful, no useless routes
  • there are no missed files (migrations, view templates)
  • required ENV variables added and described in .env.example and added to Heroku
  • associated Heroku review app works correctly with introduced changes

Deploy notes

Notes regarding deployment the contained body of work.
These should note any db migrations, ENV variables, services, etc.

@DanilAgafonov DanilAgafonov changed the title Introduce Webpacker Introduce Webpacker and component approach Aug 24, 2018
source "https://rails-assets.org" do
gem "rails-assets-jquery-ujs"
gem "rails-assets-jquery2"
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this changes means that Assets Pipeline will be removed completely and replaced with Webpacker?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. Do you have concerns about it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I have. It could be more easy to understand if you suggest to add something new and leave all present things here and enable users to continue use technologies they know and technologies they have experience with. Assets Pipeline with all things we use everyday, like Coffee, like rails helpers etc IS compatible with Webpacker, they can be present in one project and work together. If you goal is - moving to new ES6 technology stack, why we MUST drop all previous experience? We did no have a choice? In case rails-base was regular open source project this will be good time to fork at because it will be non-useful for 50% of projects and 75% of developers. As I know almost all projects we start DO NOT require all this complex things, but now, after that change, every project will require react-developer right from start OR require BE developer to program with React / Node. More complex deployment, many new configs for ES6 transpiling, Nodejs, problem's with JQuery (that actually do the job for us, right, except religion questions)... So, really, it's more easy to fork this and drop 50% of things to get really "rails skeleton" lightweight and pre-configured for any type of projects.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense. I think we need to get together BE and FE devs and discuss this case in office.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vladimirbazhanov https://evilmartians.com/chronicles/evil-front-part-1 what do you think about this?

I guess in the future projects it is better to start with modern technologies and frameworks.

Being a fresh Rails full-stack developer out in the wild is a confusing endeavor nowadays. A “classic Rails” way to handle front-end with Asset Pipeline, Sprockets, CoffeeScript, and Sass looks outdated in 2017. A lot of choices made back in the times of Rails 3.1 do not live up to modern expectations. Sticking with the “old way” means passing on everything that happened in the front-end community over the past half decade: the rise of npm as a JavaScript package manager to rule them all, the emergence of ES6 as a go-to JS syntax, the winning streak of transpilers and build tools, the ever-growing embrace of PostCSS as an alternative to CSS pre-processors. Not to mention the astounding success of front-end frameworks like React and Vue that change the very way we think about front-end code: components instead of “pages”.

@vladimirbazhanov
Copy link
Contributor

@DanilAgafonov lets maybe find some time and finish this work? Let me know how I can help here

@timurvafin timurvafin added this to To do in Development Jun 18, 2020
@vladimirbazhanov
Copy link
Contributor

I'' close this PR shortly because we already applied almost all features from it into master. Thanks for great work here!

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

Successfully merging this pull request may close these issues.

None yet

4 participants