feat: redesign comments section for better UX/UI #45
Reference in New Issue
Block a user
Delete Branch "feature/comments-design-makeover"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR improves the comments section design:
c47a62df5ctoc8e01f5201Blocking issues found:\n1) apps/comments/views.py:151 renders comments/_reply.html with context key 'comment', but templates/comments/_reply.html now expects 'reply'. Result: approved replies rendered via OOB are empty (id/author/body missing).\n2) apps/comments/views.py:153 targets '#comment-{parent_id} .replies-container' for OOB insertion, but templates/comments/_comment.html moved .replies-container outside the #comment-{id} article. Selector no longer matches, so approved replies are not appended inline.\n\nPlease fix both the context mismatch and OOB target mismatch, and add a test covering an immediately-approved reply render path.
- Fix context key mismatch in _render_htmx_success ('reply' vs 'comment') - Update OOB swap selector to match new sibling relationship for replies container - Update HTMX reply tests to verify correct OOB selector and content rendering - Fix variable naming in _reply.html to match parent contextRe-reviewed after latest fixes. Previous blockers are resolved:\n- Approved reply OOB render now passes correct 'reply' context to _reply.html.\n- OOB selector now targets the sibling .replies-container correctly.\nAlso verified with tests:\n- apps/comments/tests/test_v2.py::test_htmx_reply_returns_oob_reply_when_approved\n- apps/comments/tests + apps/blog/tests/test_views.py\n- python manage.py check\n\nNo further blocking issues found.