Skip to content

Add a comments sidebar & associate comments to specific objects - #4923

Open
wes-otf wants to merge 11 commits into
mainfrom
feature/comments-on-specific-objects
Open

Add a comments sidebar & associate comments to specific objects#4923
wes-otf wants to merge 11 commits into
mainfrom
feature/comments-on-specific-objects

Conversation

@wes-otf

@wes-otf wes-otf commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Closes #4871. Adds the ability to comment on objects like Project Forms, SOWs, Reports & Invoices via a "mini" comment form in the detail view sidebar for said objects.

This PR also covers a few related yet adjacent things:

  • Formatting fixes to normalize the detail views between Project Forms, SOWs, Reports & Invoices.
  • New events for "creating" (first edit) and editing of the Project Forms/SOWs
  • Tailwind formatting (ie. max-w-[60rem]max-w-240)

TODO:

  • Resolve merge conficts
  • Add/fix unit tests
  • Make status updates to PF/SOW reactive like they are for Invoices
  • Associate status updates (ie. approvals) to the ProjectFormPointer instead of the project so they show in the Status & Activity section
  • Unify the CommentForm more to be able to the used for both the comments tab and the comment sidebar

Test Steps

Confirm that...

  • (as a Staff role) smaller version of the comment form is available as a sticky sidebar item in the detail views for Project Form, Scope of Work, Invoices & Reports.
  • (as a Staff role) when commenting utilizing the mini form, it shows up in both the "Status & Activity" section and in the "Comment" tab, with a link to the object that was commented on.
  • detail views between Project Forms, SOWs, Reports & Invoices are all very stylistically similar/the same
  • statuses & activity are available in the detail view for Project Forms, SOWs, Reports & Invoices and are reactive when a status is updated
  • an event is created when a PF/SOW is edited for the first time

Comment thread hypha/apply/activity/forms.py
{% if activities.count > 1 or activities.count == 1 and not preview_activity %}
<details class="collapse collapse-arrow group" id="statusDetail" {% if open %}open{% endif %}>
<summary class="collapse-title">
<h2 class="card-title">{% blocktrans with activity_count=activities.count %}Status & Activity <span class="font-normal text-base-content/70">({{ activity_count }})</span>{% endblocktrans %}</h2>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible, avoid tags in translated strings.

@wes-otf wes-otf Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you think makes the most sense for this? for RTL languages I figured the ability to put the count on the left would be ideal, but can also include the variable in the translation & just remove the formatting, just thought it was slick.

Comment thread hypha/apply/utils/templatetags/apply_tags.py Outdated
Comment thread hypha/apply/utils/templatetags/apply_tags.py
Comment thread hypha/apply/activity/templates/activity/partials/comment_form.html Outdated
…conditional field inclusion with `CommentForm`, small timeline formatting fixes
{% if not object.is_archive or object.projects.exists %}
<h2 class="sr-only">{% trans "Add communication" %}</h2>
<div class="pb-6 mb-4 w-full border-b border-base-300">
<div class="pb-6 w-full border-b border-base-300">

@wes-otf wes-otf Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was causing a gap between the start of the border & the timeline line which is why I removed it here

@wes-otf
wes-otf marked this pull request as ready for review August 13, 2026 15:45
@wes-otf wes-otf changed the title WIP: Add a comments sidebar & associate comments to specific objects Add a comments sidebar & associate comments to specific objects Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the ability to comment on specific parts of a PAF/SOW

2 participants