Skip to content

Commit

Permalink
Refactor comment's commenters field, add subComments field and …
Browse files Browse the repository at this point in the history
…seed

I thought that perhaps subcomments would best be `Array<Comment>`, if
that is possible. Following up with that, the `commenters` field is
more apt to be a singlular `commenter` field.

Added an example seed that I spent too much time having fun with.
Reference:
https://www.youtube.com/watch?v=rvh0uaR7cd8&feature=youtu.be&t=193

Issue #147 (Create comment object)
Epic #217 (Comment on Abstracts)
Epic #131 (Submission Card View)
  • Loading branch information
michael-small committed Nov 30, 2019
1 parent 5ff024e commit d31f68d
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/src/app/submissionView/comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ export interface Comment {
_id?: {
$oid: string
};
commenters: Array<User>;
commenter: User;
subComments?: Array<Comment>;
quotedSnippet?: string; //generated by highlighting abstract... may not always be needed
commenterInput: string;
resolved?: boolean; //Top level comments (TLC's) resolvable, comments on TLC resolved via TLC resolution
timestamp: string;
}




68 changes: 68 additions & 0 deletions comments.seed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[
{
"_id": {
"$oid": "5b3524ba76bdf718e137b493"
},
"commenter":
[
{
"_id": {
"$oid": "6b4fafaa7ff1d34e9da88cca"
},
"SubjectID": "110073864477046231189",
"FirstName": "Travis",
"LastName": "McElroy",
"ShirtSize": "m",
"Role": "reviewer"
}
],
"subComments":
[
{
"_id": {
"$oid": "5b3524ba76bdf718e137b493"
},
"commenter":
[
{
"_id": {
"$oid": "5b4fafaa7ff1d34e9da88ccb"
},
"SubjectID": "910073864477046231181",
"FirstName": "Griffin",
"LastName": "McElroy",
"ShirtSize": "m",
"Role": "user"
}
],
"commenterInput": "I just formalized and followed up about Levi's. Look good?",
"resolved": false,
"timestamp": "Wed Feb 15 16:23:20 CST 2020"
},
{
"_id": {
"$oid": "4d4424ba76bdf718e1374444"
},
"commenter":
[
{
"_id": {
"$oid": "6b4fafaa7ff1d34e9da88cca"
},
"SubjectID": "110073864477046231189",
"FirstName": "Travis",
"LastName": "McElroy",
"ShirtSize": "m",
"Role": "reviewer"
}
],
"commenterInput": "Looks good for the most part. Though you could condense the two sentences about the Levi's tagline into one.",
"timestamp": "Wed Feb 15 17:23:20 CST 2020"
}
],
"quotedSnippet": "Denim was-- denim was invented, so that like, cows, when they bit you, it didn't hurt very bad.",
"commenterInput": "Please formalize your prose... why is it so conversational? You should also add that that used to be the tagline underneath Levi's: \"So it doesn't hurt so bad when cows bite you.\"",
"resolved": false,
"timestamp": "Wed Feb 14 16:23:20 CST 2020"
}
]

0 comments on commit d31f68d

Please sign in to comment.