Skip to content

Comments 0.2.8: Live updates across sessions and a plain-text fallback

Comments 0.2.8 updates open threads and comment counts live for every connected user, not only the person who wrote the comment.

Creating or deleting a comment, and changing a reaction, now broadcast a message on a topic per record. Host pages subscribe with PhoenixKitComments.subscribe/2, so a count badge or an open thread elsewhere updates without a reload.

The Leaf rich-text editor needs the host app to register its JavaScript hook; without it, the comment box hangs on its loading text. Settings now has a Rich-Text Editor toggle, on by default, that falls back to a plain text box, and the component takes a rich_text attribute for the same. The README explains which hooks to register.

For developers, count_comments/3 also accepts a list of record uuids and returns a count per uuid from one query, instead of one query per row.

 

 


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