Comments UI/HTMX regressions: stale empty state, reply placement, and Turnstile init #48

Closed
opened 2026-03-04 11:46:02 +00:00 by mark · 0 comments
Owner

Summary

The comment section has regressed after recent UI changes and no longer behaves like a conventional modern comments experience.

Problems observed

  • The main comment composer ("fresh comment") looks visually detached from the rest of the comments UI.
  • Replies can render in the wrong visual position (appearing as if they hop left/outside expected nesting).
  • Reply flows are inconsistent with Cloudflare Turnstile behavior after HTMX updates.
  • Empty-state copy ("No comments yet. Be the first to comment.") can remain visible even when comments are present.

Scope of fix

  • Align comment and reply forms with a standard, cohesive comments layout.
  • Use a stable replies container target for HTMX OOB reply insertion.
  • Ensure Turnstile widgets initialize for dynamically swapped HTMX content (main/reply forms).
  • Keep empty-state visibility synchronized with actual rendered comments.
  • Add/update automated tests to cover these behaviors.

Acceptance criteria

  • Top-level and reply comments render in expected positions, with replies nested under their parent.
  • Reply submissions use Turnstile in the same way as top-level submissions, including after HTMX swaps.
  • Empty-state message is hidden/removed whenever comments exist.
  • Article comments UI looks cohesive and conventional (no detached composer block).
  • Test coverage updated for HTMX OOB targeting, empty-state behavior, and related rendering contracts.
## Summary The comment section has regressed after recent UI changes and no longer behaves like a conventional modern comments experience. ## Problems observed - The main comment composer ("fresh comment") looks visually detached from the rest of the comments UI. - Replies can render in the wrong visual position (appearing as if they hop left/outside expected nesting). - Reply flows are inconsistent with Cloudflare Turnstile behavior after HTMX updates. - Empty-state copy ("No comments yet. Be the first to comment.") can remain visible even when comments are present. ## Scope of fix - Align comment and reply forms with a standard, cohesive comments layout. - Use a stable replies container target for HTMX OOB reply insertion. - Ensure Turnstile widgets initialize for dynamically swapped HTMX content (main/reply forms). - Keep empty-state visibility synchronized with actual rendered comments. - Add/update automated tests to cover these behaviors. ## Acceptance criteria - Top-level and reply comments render in expected positions, with replies nested under their parent. - Reply submissions use Turnstile in the same way as top-level submissions, including after HTMX swaps. - Empty-state message is hidden/removed whenever comments exist. - Article comments UI looks cohesive and conventional (no detached composer block). - Test coverage updated for HTMX OOB targeting, empty-state behavior, and related rendering contracts.
mark closed this issue 2026-03-04 12:22:54 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nohype/main-site#48