Ruby on Rails #63 Hotwire Modals (the right way)

preview_player
Показать описание
⛔DO NOT use a StimulusJS controller to render TurboStreams!⛔

P.S. Feel free to add CSS "p-5 bg-slate-300 absolute z-10 top-10 right-10 rounded-md w-96 break-words" to the modal, so that it shows nicely above page content.

0:00 Intro
0:49 App Demo
2:12 Create New App
3:20 Scaffold Posts
4:44 Turbo Frame Modal
7:40 Add validations...
8:50 No matching turbo frame
9:35 Turbo Stream - to add new post
11:25 StimulusJS - dismiss modal
17:30 Modal to EDIT a post
20:20 Outro
Рекомендации по теме
Комментарии
Автор

I watched videos for a week trying to understand turbo streams and frames, Halfway through this video it made sense. Most of my problem was not understanding what was referencing what as far as variables. I LOVE how you show what is going where instead of making some stuff happen and saying do it like this. This was much needed and it has helped me to no end. THANK YOU!!!!

SeparatusAbMultitudine
Автор

Thank you so much for all your amazing videos, they are all so helpful!

NinjaBranDizzzle
Автор

could i locate empty turbo frame block on index page instead off remove in stimulus controller?

Obrezkasada
Автор

Thank you so much for the video! I would like to ask why not use something like render turbo_stream: turbo_stream.remove("modal") instead of using a stimulus controller. What am I missing? What are the pros and cons of your approach vs using turbo stream remove/update/replace? Wouldn't a if save render turbo_stream remove/update/replace also guarantee that the modal is only closed on success?

hadleysiqueira
Автор

Turbo-Frame didn't show in my implementation. Had to move the turbo_frame_tag "modal" from the layout to the view and finally it showed.

jensdisselhoff
Автор

but yaro, how you prevent page scroll when the modal are open?

paketankampus
Автор

How did the app is created already styled with tailwind classes, do you use a gem for that ?

ahmedkamal
Автор

That was really interesting, great video

haroldpepete
Автор

How would you trigger showing the modal with Bootstrap 5?

viktorsmari
Автор

we cant use a StimulusJS controller to render TurboStreams anymore ?

clementblgr
Автор

0:22 F̶r̶a̶m̶e̶s̶ Streams. The names get mixed in the head while speaking 😁

SupeRails
Автор

Please video quality 1024. Good lesson! You english so good after indian :) Tons thanks!

ddd
Автор

Could you why your approach is better?

johnrothfield
Автор

sir daterangepicker not working in rails 7 please make a video on daterangepicker

muhammadmudasir
Автор

Superb demo on turmo_frame/streams thanks for sharing this!

SebastianSastre