Guillem Arias
a69b84f572
fix(goals/chart): redraw on turbo:render so the chart survives morph navigation
...
Repro: index -> goal show (chart drawn) -> open edit modal in turbo
frame -> pick a new icon -> submit. Server responds with
turbo_stream.action(:redirect, goal_path). Turbo morphs the show
page, wiping the chart container's children, but Stimulus' connect()
isn't re-run on the morphed element so _draw never fires again. The
ResizeObserver doesn't help — the container's box dimensions are
unchanged.
Listen for turbo:render and turbo:frame-load on document and re-draw
when the container's SVG is missing. Cheap idempotent check
(querySelector('svg')) — no-op if the chart is already there.
Listeners cleaned up in disconnect().
Verified: same flow now lands on the show page with the chart fully
rendered (23 SVG children).
2026-05-11 21:52:56 +02:00
..
2026-02-15 09:34:34 +01:00
2026-01-05 22:11:47 +01:00
2026-01-16 21:04:10 +01:00
2026-03-14 11:32:33 +01:00
2026-05-05 00:47:45 +02:00
2026-04-11 19:33:30 +02:00
2025-04-30 18:14:22 -04:00
2026-03-14 23:56:27 +01:00
2026-01-24 01:11:56 +01:00
2025-07-23 18:21:37 -04:00
2026-04-10 23:19:48 +02:00
2026-04-13 23:32:27 +02:00
2025-01-16 14:36:37 -05:00
2026-04-10 23:06:32 +02:00
2026-01-23 09:52:15 +01:00
2026-04-07 11:24:50 +02:00
2026-03-20 21:19:30 +01:00
2025-03-28 13:08:22 -04:00
2025-12-24 01:57:16 +01:00
2024-10-14 17:09:27 -04:00
2026-04-01 20:25:06 +02:00
2025-04-30 18:14:22 -04:00
2026-02-19 19:55:10 +01:00
2026-05-11 21:28:23 +02:00
2024-10-14 17:09:27 -04:00
2025-04-30 18:14:22 -04:00
2026-03-07 10:17:27 +00:00
2026-03-07 10:17:27 +00:00
2026-04-18 00:06:08 +02:00
2026-01-23 00:24:29 +01:00
2026-03-23 17:07:12 -07:00
2025-04-30 18:14:22 -04:00
2026-04-26 09:32:20 +02:00
2026-01-10 16:39:18 +01:00
2026-03-07 10:17:27 +00:00
2024-10-14 17:09:27 -04:00
2026-04-08 21:05:58 +02:00
2025-04-18 08:23:10 -05:00
2026-04-08 21:05:58 +02:00
2026-05-11 20:34:11 +02:00
2026-05-11 21:52:56 +02:00
2026-05-11 20:42:13 +02:00
2026-05-11 20:08:32 +02:00
2026-01-23 12:54:55 +01:00
2024-10-14 17:09:27 -04:00
2026-01-23 22:12:02 +01:00
2024-10-14 17:09:27 -04:00
2026-01-24 01:11:56 +01:00
2026-04-04 13:29:43 +02:00
2024-10-14 17:09:27 -04:00
2025-10-22 19:51:24 +02:00
2025-11-22 02:14:29 +01:00
2025-04-18 08:23:10 -05:00
2026-04-07 12:19:17 +02:00
2025-08-03 07:35:34 +02:00
2026-02-13 19:30:29 +01:00
2026-05-04 21:47:01 +02:00
2025-04-18 08:23:10 -05:00
2026-03-13 08:11:51 +01:00
2026-05-08 15:15:23 +02:00
2025-05-22 11:46:57 -04:00
2026-03-01 17:46:50 +01:00
2025-04-18 08:23:10 -05:00
2026-05-10 22:13:57 +02:00
2026-04-05 09:27:24 +02:00
2026-01-23 00:24:29 +01:00
2025-12-02 17:10:55 +01:00
2025-05-13 10:34:41 -04:00
2026-02-15 13:23:19 +01:00
2025-05-22 11:46:57 -04:00
2026-01-21 22:56:39 +01:00
2026-04-07 20:52:14 +02:00
2025-01-30 14:12:01 -05:00
2026-03-29 17:28:07 +02:00
2026-01-08 15:38:13 +01:00
2025-09-23 15:43:36 +02:00
2026-05-04 00:50:52 +02:00
2024-10-14 17:09:27 -04:00
2024-11-27 16:01:50 -05:00
2026-04-08 21:05:58 +02:00
2026-04-11 00:56:05 +02:00
2026-01-23 00:24:29 +01:00
2026-04-08 21:05:58 +02:00
2025-01-07 09:41:24 -05:00
2025-05-26 20:05:16 -05:00
2026-02-16 23:36:27 +01:00
2026-05-03 22:13:28 +02:00
2026-05-03 22:13:28 +02:00
2026-05-03 22:13:28 +02:00