usdigitalresponse / usdr-gost

USDR-hosted grants management tools
http://grants.usdigitalresponse.org
Apache License 2.0
32 stars 21 forks source link

Follow+Notes: Implement note input and note feed on Grant Details view #3428

Open TylerHendrickson opened 2 months ago

TylerHendrickson commented 2 months ago

Subtask of [STORY]: Update 'Status' to 'Follow + Note' feature #2960

Blocked by

Blocks

N/A

Definition of Done

See Figma Designs

Implementation details

TylerHendrickson commented 1 month ago

@greg-adams Just calling out this addition that I just made to this ticket's implementation notes, per https://github.com/usdigitalresponse/usdr-gost/issues/3407#issuecomment-2364259301:

  • API responses that retrieve notes and their associated data currently do not provide user's email addresses or preferred avatar colors, both of which are required to properly represent users in the notes feed. To include this data in API responses, make the following modifications to the getCurrentNoteRevisions() function defined in packages/server/src/lib/grantsCollaboration/notes.js:
    • Add users.avatar_color as user_avatar_color to the main database query's SELECT statement.
    • (Note: the query's SELECT statement already includes users.email as user_email.)
    • Update the function's return value so that the user_avatar_color value of each row in the query result set is mapped to notes[].user.avatar_color in the returned object.
    • Update the function's return value so that the user_email value of each row in the query result set is mapped to notes[].user.email in the returned object.

Note that we also need user_email mapped here, in addition to the inclusion of user_avatar_color.

ClaireValdivia commented 1 month ago

So far this is looking really great! per slack discussion, designs are being updated to clarify how delete note should work - I will create a new ticket once that is clarified!

ClaireValdivia commented 4 weeks ago

closing this out as there are no outstanding functionality issues. If we find any bugs or adjustment needed in future bug bashing for this feature, we will open up new issues!