Files
fizzy/app/views/cards/display/preview/_bubble.html.erb
T
Jorge Manrubia 8c8dbe888e Fix assorted issues when reloading pages with morphing and the pagination system
This patches 2 problems in Turbo/idiomorph that are causing problems when reloading the pagination frames:

- No remove callback in idiomorph when removing a node that had been mapped.
- Regression introduced by https://github.com/hotwired/turbo/pull/1311, where it won't prevent the removal of frames with refresh=morph

I will upstream both patches, this is temporary.

https://fizzy.37signals.com/5986089/cards/2291
2025-10-16 13:39:16 +02:00

25 lines
1.1 KiB
Plaintext

<%= tag.div hidden: true, class: "bubble",
data: {
controller: "bubble",
action: "turbo:morph-element->bubble#update",
bubble_entropy_value: entropy_bubble_options_for(card).to_json,
bubble_stalled_value: stalled_bubble_options_for(card)&.to_json
} do %>
<svg viewBox="0 0 200 100">
<path id="<%= dom_id(card, "bubble-top-half") %>" fill="transparent" d="M 20,100 A 80,80 0 0,1 180,100"/>
<text text-anchor="middle" fill="currentColor">
<textPath href="#<%= dom_id(card, "bubble-top-half") %>" startOffset="50%" dominant-baseline="middle" data-bubble-target="top"></textPath>
</text>
</svg>
<span class="bubble__number" data-bubble-target="center"></span>
<svg viewBox="0 0 200 100">
<path id="<%= dom_id(card, "bubble-bottom-half") %>" d="M 20,0 A 80,80 0 0,0 180,0" fill="transparent"/>
<text text-anchor="middle" fill="currentColor">
<textPath href="#<%= dom_id(card, "bubble-bottom-half") %>" startOffset="50%" dominant-baseline="middle" data-bubble-target="bottom"></textPath>
</text>
</svg>
<% end %>