Skip to content

Posts 0.1.4: Comments on a post are saved with their text again

Posts 0.1.4 fixes the comment box on a post’s page: what you typed never reached the server, so posting a comment did nothing.

The comment box’s rich text editor reports its text to the page as you type, and the post’s page did not pass that on to the comments section. It now does, through the Comments module’s own helper, so the text you write is what gets posted.

Upgrading

Posts 0.1.4 needs Comments 0.2.6 or later, the first release with the helper the post page uses. There is no migration.

Full release notes: Posts 0.1.4

0.1.4 · 7 June 2026

Fixed

  • Fix post comments silently posting empty content — the comment composer’s Leaf rich-text editor reports its content to the host LiveView via a {:leaf_changed, …} process message, which Details never forwarded into CommentsComponent.forward_leaf_event/2, so “Post Comment” no-opped (PR #7). Now wired via the dependency’s use PhoenixKitComments.Embed helper (a :handle_info lifecycle hook), which also drops the per-keystroke Code.ensure_loaded and the silent catch-all handle_info/2 the initial fix introduced.
  • Move LiveView DB queries from mount/3 to handle_params/3 across the post/group LiveViews — mount/3 runs twice (HTTP + WebSocket), so querying there duplicated every read.

Changed

  • Require phoenix_kit_comments ~> 0.2 (was ~> 0.1) — PhoenixKitComments.Embed only exists in the 0.2.x line (resolved: 0.2.6).
  • Upgrade dependencies: phoenix_kit 1.7.132, phoenix 1.8.7, ecto/ecto_sql 3.14, leaf 0.2.21, phoenix_live_view 1.1.31, earmark 1.4.49.
  • Internal refactors: replace Settings.get_setting(_, "true") == "true" with Settings.get_boolean_setting/2; extract the post preload list to a @post_preloads module attribute.

Posts 0.1.4. Install or update: {:phoenix_kit_posts, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.