Giter Club home page Giter Club logo

Comments (4)

dorner avatar dorner commented on June 18, 2024 1

That gem doesn't seem to be super popular (only 115 stars). With Rails I've found that jumping towards using gems for things can bite us in the long run as many of them stop being maintained, or don't quite do what we wanted them to. It shouldn't be too much code to roll our own, especially if we can use Stimulus for it.

It looks like there are around 10 places in the app total that use it, but many of those are funneled through one helper method, add_line_item_button.

from human-essentials.

JuanVqz avatar JuanVqz commented on June 18, 2024

Hi @cielf, do you know this gem https://github.com/arielj/vanilla-nested? it is well-maintained and also doesn't depend on jQuery. what do you think about it? do you know how many places we need to update?

from human-essentials.

elasticspoon avatar elasticspoon commented on June 18, 2024

Is removing cocoon still on the Todo list?

I was thinking of tackling this. I was thinking that we could reuse request behavior and replace:

<div class="col-xs-12">
  <%= add_line_item_button f, "#transfer_line_items" %>
</div>

with

<%= add_item_button('Add Another Item') do %>
  <%= render 'item_request', form: form, object: @partner_request.item_requests.build %>
<% end %>

Edit: this would likely require making the add button method and the stimulus controller a bit more generic but the changes seem pretty reasonable to do.

from human-essentials.

dorner avatar dorner commented on June 18, 2024

Sure, this would be great. The fewer dependencies, the better.

from human-essentials.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.