Skip to content

Comments 0.4.3: Edited comments update everywhere at once

Comments 0.4.3 makes an edited comment update live on every open page, the way new and deleted comments already did.

Before, an edit to a comment’s text or status sent no live update. Other people looking at the same record, and any preview of its comments elsewhere on the page, kept the old text until they reloaded. update_comment/3 now broadcasts {:comments_updated, %{action: :updated}} on the record’s topic, and the comments component tells its host page after a successful edit. Deleting still sends a single :deleted message.

For developers: code that subscribes with PhoenixKitComments.subscribe/2 and matches on the action should now handle :updated as well as :created, :deleted and :reaction. The README example lists all four.

 

 


Comments 0.4.3. Install or update: {:phoenix_kit_comments, "~> 0.4"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.