Dynamic nested form (new gem by me)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Dynamic nested form (new gem by me)

Ariel Juodziukynas

Hi, I want to share a gem that I'm working on.


https://github.com/arielj/vanilla-nested/



It's a replacement of the cocoon gem (dymanic nested forms) but using only vanilla javascript so no jQuery dependency. I'm already using it on one of my projects and it has a few config options to customize it for different requirements.


You can find some examples on theREADME at github (it's really similar to cocoon).


For now, it can only be added as a git repo (I'll see how I can publish it as a gem on rubygems).


gem 'vanilla_nested', git: 'https://github.com/arielj/vanilla-nested', branch: 'master'


I'd really really apreciate if you test it and can give me some feedback (ideally on github)!


Thanks!


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/7872b592-370f-4a64-84eb-9172b9e5ffba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic nested form (new gem by me)

Juan Ignacio Villarejo Arzivian
Hey Ariel! 

Good initiative! I think it would really come handy a GIF image with a visual example of how it does. 
I suggest this because from the description I don't get how would it be the look and feel of the nested form. Of course cocoon has the same issue.
An image is a thousand words and a GIF is a thousand images. 

Congrats and keep it up. Removing JQuery dependency it's a great plus. 

On Wednesday, April 10, 2019 at 5:41:18 PM UTC-3, Ariel Juodziukynas wrote:

Hi, I want to share a gem that I'm working on.


<a href="https://github.com/arielj/vanilla-nested/?fbclid=IwAR0eT6yBP2bxsezH5RqB158W28aivi01l9gXTR2oRq3ZTTPuXmmFzDxOxtI" rel="nofollow" style="color:rgb(54,88,153);font-family:inherit" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Farielj%2Fvanilla-nested%2F%3Ffbclid%3DIwAR0eT6yBP2bxsezH5RqB158W28aivi01l9gXTR2oRq3ZTTPuXmmFzDxOxtI\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHkaErj9xUyr7-gFfndvA5EPtR2bA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Farielj%2Fvanilla-nested%2F%3Ffbclid%3DIwAR0eT6yBP2bxsezH5RqB158W28aivi01l9gXTR2oRq3ZTTPuXmmFzDxOxtI\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHkaErj9xUyr7-gFfndvA5EPtR2bA&#39;;return true;">https://github.com/arielj/vanilla-nested/



It's a replacement of the cocoon gem (dymanic nested forms) but using only vanilla javascript so no jQuery dependency. I'm already using it on one of my projects and it has a few config options to customize it for different requirements.


You can find some examples on theREADME at github (it's really similar to cocoon).


For now, it can only be added as a git repo (I'll see how I can publish it as a gem on rubygems).


gem 'vanilla_nested', git: '<a href="https://l.facebook.com/l.php?u=https%3A%2F%2Fgithub.com%2Farielj%2Fvanilla-nested%3Ffbclid%3DIwAR3jk-IzmASPu2S-uub1nLWWr0u8wuENM2Gj0VF5enr21Mc6R741cab00s8&amp;h=AT0OqqCsfpXsrVdPD3qFlqGG5E9iruBWzObKKKmqrg0ZTXn_gVJ37UMJB5NHGIfmbWQ6Zctbq05KlvbNjvBsUu-X7RTScbkOB1GiW4kdMWhKo5tOxv6mRoP2js_8E3K-aFxMdc96FlA" rel="nofollow" style="color:rgb(54,88,153)" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fgithub.com%252Farielj%252Fvanilla-nested%253Ffbclid%253DIwAR3jk-IzmASPu2S-uub1nLWWr0u8wuENM2Gj0VF5enr21Mc6R741cab00s8%26h%3DAT0OqqCsfpXsrVdPD3qFlqGG5E9iruBWzObKKKmqrg0ZTXn_gVJ37UMJB5NHGIfmbWQ6Zctbq05KlvbNjvBsUu-X7RTScbkOB1GiW4kdMWhKo5tOxv6mRoP2js_8E3K-aFxMdc96FlA\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHZN47VQDVe82ToMQhGRo9rFmRz5A&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fgithub.com%252Farielj%252Fvanilla-nested%253Ffbclid%253DIwAR3jk-IzmASPu2S-uub1nLWWr0u8wuENM2Gj0VF5enr21Mc6R741cab00s8%26h%3DAT0OqqCsfpXsrVdPD3qFlqGG5E9iruBWzObKKKmqrg0ZTXn_gVJ37UMJB5NHGIfmbWQ6Zctbq05KlvbNjvBsUu-X7RTScbkOB1GiW4kdMWhKo5tOxv6mRoP2js_8E3K-aFxMdc96FlA\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHZN47VQDVe82ToMQhGRo9rFmRz5A&#39;;return true;">https://github.com/arielj/vanilla-nested', branch: 'master'


I'd really really apreciate if you test it and can give me some feedback (ideally on github)!


Thanks!


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f373ff8a-81d9-48b4-91ef-2cb5cb0632fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic nested form (new gem by me)

Joe Guerra
In reply to this post by Ariel Juodziukynas
Very nice.



On Wednesday, April 10, 2019 at 4:41:18 PM UTC-4, Ariel Juodziukynas wrote:

Hi, I want to share a gem that I'm working on.


<a href="https://github.com/arielj/vanilla-nested/?fbclid=IwAR0eT6yBP2bxsezH5RqB158W28aivi01l9gXTR2oRq3ZTTPuXmmFzDxOxtI" rel="nofollow" style="color:rgb(54,88,153);font-family:inherit" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Farielj%2Fvanilla-nested%2F%3Ffbclid%3DIwAR0eT6yBP2bxsezH5RqB158W28aivi01l9gXTR2oRq3ZTTPuXmmFzDxOxtI\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHkaErj9xUyr7-gFfndvA5EPtR2bA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Farielj%2Fvanilla-nested%2F%3Ffbclid%3DIwAR0eT6yBP2bxsezH5RqB158W28aivi01l9gXTR2oRq3ZTTPuXmmFzDxOxtI\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHkaErj9xUyr7-gFfndvA5EPtR2bA&#39;;return true;">https://github.com/arielj/vanilla-nested/



It's a replacement of the cocoon gem (dymanic nested forms) but using only vanilla javascript so no jQuery dependency. I'm already using it on one of my projects and it has a few config options to customize it for different requirements.


You can find some examples on theREADME at github (it's really similar to cocoon).


For now, it can only be added as a git repo (I'll see how I can publish it as a gem on rubygems).


gem 'vanilla_nested', git: '<a href="https://l.facebook.com/l.php?u=https%3A%2F%2Fgithub.com%2Farielj%2Fvanilla-nested%3Ffbclid%3DIwAR3jk-IzmASPu2S-uub1nLWWr0u8wuENM2Gj0VF5enr21Mc6R741cab00s8&amp;h=AT0OqqCsfpXsrVdPD3qFlqGG5E9iruBWzObKKKmqrg0ZTXn_gVJ37UMJB5NHGIfmbWQ6Zctbq05KlvbNjvBsUu-X7RTScbkOB1GiW4kdMWhKo5tOxv6mRoP2js_8E3K-aFxMdc96FlA" rel="nofollow" style="color:rgb(54,88,153)" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fgithub.com%252Farielj%252Fvanilla-nested%253Ffbclid%253DIwAR3jk-IzmASPu2S-uub1nLWWr0u8wuENM2Gj0VF5enr21Mc6R741cab00s8%26h%3DAT0OqqCsfpXsrVdPD3qFlqGG5E9iruBWzObKKKmqrg0ZTXn_gVJ37UMJB5NHGIfmbWQ6Zctbq05KlvbNjvBsUu-X7RTScbkOB1GiW4kdMWhKo5tOxv6mRoP2js_8E3K-aFxMdc96FlA\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHZN47VQDVe82ToMQhGRo9rFmRz5A&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fgithub.com%252Farielj%252Fvanilla-nested%253Ffbclid%253DIwAR3jk-IzmASPu2S-uub1nLWWr0u8wuENM2Gj0VF5enr21Mc6R741cab00s8%26h%3DAT0OqqCsfpXsrVdPD3qFlqGG5E9iruBWzObKKKmqrg0ZTXn_gVJ37UMJB5NHGIfmbWQ6Zctbq05KlvbNjvBsUu-X7RTScbkOB1GiW4kdMWhKo5tOxv6mRoP2js_8E3K-aFxMdc96FlA\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHZN47VQDVe82ToMQhGRo9rFmRz5A&#39;;return true;">https://github.com/arielj/vanilla-nested', branch: 'master'


I'd really really apreciate if you test it and can give me some feedback (ideally on github)!


Thanks!


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b60c0f1e-3865-4fb9-8600-105f672f55fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic nested form (new gem by me)

Ariel Juodziukynas
In reply to this post by Juan Ignacio Villarejo Arzivian
Hi! The look and feel does not depend on the gem, it just adds/removes some html (defined by the user) to/from an specific container when you click a button. The actual look depends on the form defined and styled by the user. I'll try to add a gif with an use example though, thanks!!

El jue., 11 abr. 2019 a las 11:53, Juan Ignacio Villarejo Arzivian (<[hidden email]>) escribió:
Hey Ariel! 

Good initiative! I think it would really come handy a GIF image with a visual example of how it does. 
I suggest this because from the description I don't get how would it be the look and feel of the nested form. Of course cocoon has the same issue.
An image is a thousand words and a GIF is a thousand images. 

Congrats and keep it up. Removing JQuery dependency it's a great plus. 

On Wednesday, April 10, 2019 at 5:41:18 PM UTC-3, Ariel Juodziukynas wrote:

Hi, I want to share a gem that I'm working on.


https://github.com/arielj/vanilla-nested/



It's a replacement of the cocoon gem (dymanic nested forms) but using only vanilla javascript so no jQuery dependency. I'm already using it on one of my projects and it has a few config options to customize it for different requirements.


You can find some examples on theREADME at github (it's really similar to cocoon).


For now, it can only be added as a git repo (I'll see how I can publish it as a gem on rubygems).


gem 'vanilla_nested', git: 'https://github.com/arielj/vanilla-nested', branch: 'master'


I'd really really apreciate if you test it and can give me some feedback (ideally on github)!


Thanks!


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f373ff8a-81d9-48b4-91ef-2cb5cb0632fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcD-U%3D%3DEzNq4au0h6VZYfAfUBtCGZNb3ebV72e9YKQVCrw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic nested form (new gem by me)

localhostdotdev
In reply to this post by Ariel Juodziukynas
pretty cool, I was using a jQuery based one and moved to stimulus, greatest choice I ever made I think:

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8a2134b6-1b9d-452c-aa5d-6a7babd99e3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.