Commit Graph

17 Commits

Author SHA1 Message Date
Jorge Manrubia 2d96e7c9c6 Use streams to update/remove reactions
Prevents race condition causing flickering https://app.fizzy.do/5986089/cards/2906

This will prevent these from udpating live, but we will tackle that as part of live card
updates with page refreshes, which I will tackle soon.
2025-11-12 18:04:20 +01:00
Jorge Manrubia 2b98db9e66 Flatten out comments and messages
https://37s.fizzy.37signals.com/collections/693169850/cards/999008989#comment_994777841
2025-04-29 19:21:18 +02:00
David Heinemeier Hansson 63c05220ce Clearer naming 2025-04-12 11:09:55 +02:00
David Heinemeier Hansson 27d90abbd6 Reduce the direct knowledge of comments inside the card 2025-04-12 11:04:16 +02:00
David Heinemeier Hansson aefae634c3 Anemic params method
Wont ever get reused here since there is no update
2025-04-11 18:21:44 +02:00
David Heinemeier Hansson 8d36f13fab No longer needing that extra local 2025-04-11 18:20:28 +02:00
David Heinemeier Hansson 06a636bd8d Did need to separate them out for the broadcast 2025-04-11 18:19:33 +02:00
David Heinemeier Hansson 5fa8007397 Loaded directly in the partial 2025-04-11 18:19:10 +02:00
David Heinemeier Hansson 7861b7c087 Just open one turbo stream per card
Per comment is excessive and needless
2025-04-11 17:58:11 +02:00
David Heinemeier Hansson 79700162fc Use correct stream name
comment, :comments makes no sense for a stream for the reactions
2025-04-11 17:47:35 +02:00
David Heinemeier Hansson f9bb779b61 Use local vars so ivar dependency is only from before actions 2025-04-11 17:42:30 +02:00
David Heinemeier Hansson 3ecf150636 Use proper access control
Otherwise you could react to any comment on the entire account. And then
you might as well just do Comment.find.
2025-04-11 17:41:28 +02:00
David Heinemeier Hansson 5084bbf3b7 Use modern params#expect syntax 2025-04-11 17:01:19 +02:00
David Heinemeier Hansson 8a4a087a00 Fine to let destroying something destroyed be a no-op
Would be an edge-casey race condition, but its possible
2025-04-11 17:00:08 +02:00
David Heinemeier Hansson 256d536009 Always use _path unless we are changing domains 2025-04-11 16:58:56 +02:00
David Heinemeier Hansson 16c1583133 Usually the order comes last 2025-04-11 16:58:47 +02:00
David Heinemeier Hansson f4ce57e308 Move comments under cards 2025-04-11 16:21:44 +02:00