jcquarto
Joined 11/23/2021
jcquarto said over 2 years ago on Hotwire Dashboards :
is this necessarily Rails 7 ? I'm trying to get it to work on 6.1.4 with the hotwire-rails gem

jcquarto said over 2 years ago on Hotwire Dashboards :
Also, would this act any differently if you had content in a modal which was the turbo-frame?  For example, I have one modal for the page, and N number of elements on the page and when I click on one of those elements it opens the modal and updates its content based on the specific element?

In your example app, for instance, what if clicking on a comment brought up a modal with, say, the comment's author ? (just as a concept)

jcquarto said over 2 years ago on Hotwire Dashboards :
my eyes started to glaze over on that second paragraph! :). seems much more complex, even though the modal is no more than a hidden div.  The need for a specialized stimulus controller, yes, though I was hoping for just throwing an event up (to @ window or @ document) that would be listened for by the frame inside the modal

jcquarto said over 2 years ago on Hotwire Dashboards :
you've correctly described what worried me. I probably would have hundred of cards from which I want to click to see the modal for more details, but only ever click on a few. So yes, it doesn't make sense to have a 1:1 of card to modal. I'd rather just have one modal, and re-write its content as a card is clicked (based on data from the card, likely just an id for Rails to call -- roughly 'card_modal_path(17)', that sort of thing)

jcquarto said about 2 years ago on Hotwire Dashboards :
I'm was able to get some code to work that does "many elements calling one modal". No need for a stream. Hung up on using a modal from tailwindui, though