Threaded comments
Allow users to reply to comments by clicking a new "Reply" button. There will only be one level of reply to avoid query complexity and recursive indentation hell. There are two UI clues that a comment is a reply: indentation and "replied" rather than "commented." The order for top-level comments is "latest first" while the order for replies to a top-level comment is the more natural "earliest first." Implementation details follow. A new property on Activity named `in_reply_to` tracks comment replies. On the relevant pages and snippets, use several new Alpine `x-data` variables to track whether a comment is a reply or not. There are some assumptions made about IDs and these variables between HTML pages and partial pages. In order for migrations to succeed on a fresh database, for example a database migrated during automated tests, an older migration needed to be nerfed. It had made use of an Activity object during a migration. Issue ots/clients/ardc/hypha-tracker#356: Threaded comments
parent
22640691
No related branches found
No related tags found
Showing
- hypha/apply/activity/forms.py 3 additions, 0 deletionshypha/apply/activity/forms.py
- hypha/apply/activity/migrations/0082_change_staff_pii_visibility.py 3 additions, 39 deletions...y/activity/migrations/0082_change_staff_pii_visibility.py
- hypha/apply/activity/migrations/0089_alter_activity_options_activity_in_reply_to.py 43 additions, 0 deletions...tions/0089_alter_activity_options_activity_in_reply_to.py
- hypha/apply/activity/models.py 28 additions, 1 deletionhypha/apply/activity/models.py
- hypha/apply/activity/templates/activity/include/comment_form.html 13 additions, 2 deletions...ply/activity/templates/activity/include/comment_form.html
- hypha/apply/activity/templates/activity/ui/activity-comment-item.html 27 additions, 3 deletions...activity/templates/activity/ui/activity-comment-item.html
- hypha/apply/funds/templates/funds/applicationsubmission_detail.html 8 additions, 1 deletion...y/funds/templates/funds/applicationsubmission_detail.html
Loading
Please register or sign in to comment