Comments (4)
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.
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.
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.
Sure, this would be great. The fewer dependencies, the better.
from human-essentials.
Related Issues (20)
- [PACKS] # 6 Add custom request units to partner's request list HOT 7
- [PACKS] # 7 Show custom request units in banks' request view
- [PACKS] #8 New / Edit Distribution for the banks shows custom request units, if applicable
- [PACKS] # 9 Distribution printout for banks includes custom request units, if applicable
- [PACKS] #10 Add custom request units to Request export
- [PACKS] 11: Add ability to print all outstanding requests as pick-lists
- [PACKS] #12 Item view should include all fields (including new custom request units) HOT 4
- [PACKS] #13 Calcuate Product Totals
- Bank Request View -- only show fulfillment column if partner has default location
- Account requests and org websites HOT 2
- [BUG]: rspec tests fail in fresh virtual machine dev environments
- Bug: Inventory levels by date with read_events enabled doesn't work before snapshot
- Remove the ability for the superuser to delete users
- Add number of disposable diapers purchased to annual report HOT 2
- Storage Location on purchase and donation should default to the Default Intake Location
- [BUG] if you have an error in defining a kit, the information you entered is not preserved. It should be.
- Distribution, New. Add Another Item should be activated when storage location chosen, after error. HOT 2
- Clean up distribution print HOT 2
- Autoscrolling when adding new items in donations/distributions/purchases HOT 2
- [DOCS]: Merge README and CONTRIBUTING.md
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from human-essentials.