FEATURE: Drafts view in user profile
* add drafts.json endpoint, user profile tab with drafts stream
* improve drafts stream display in user profile
* truncate excerpts in drafts list, better handling for resume draft action
* improve draft stream SQL query, add rspec tests
* if composer is open, quietly close it when user opens another draft from drafts stream; load PM draft only when user is in /u/username/messages (instead of /u/username)
* cleanup
* linting fixes
* apply prettier styling to modified files
* add client tests for drafts, includes a fixture for drafts.json
* improvements to code following review
* refresh drafts route when user deletes a draft open in the composer while being in the drafts route; minor prettier scss fix
* added more spec tests, deleted an acceptance test for removing drafts that was too finicky, formatting and code style fixes, added appEvent for draft:destroyed
* prettier, eslint fixes
* use "username_lower" from users table, added error handling for rejected promises
* adds guardian spec for can_see_drafts, adds improvements following code review
* move DraftsController spec to its own file
* fix failing drafts qunit test, use getOwner instead of deprecated this.container
* limit test fixture for draft.json testing to new_topic request only
2018-08-01 02:34:54 -04:00
export default {
"/drafts.json" : {
drafts : [
{
excerpt : "A fun new topic for testing drafts. " ,
truncated : true ,
created _at : "2018-07-22T22:20:14.608Z" ,
draft _key : "new_topic" ,
sequence : 26 ,
draft _username : "eviltrout" ,
avatar _template : "/user_avatar/localhost/eviltrout/{size}/2_1.png" ,
data :
'{"reply":"A fun new topic for testing drafts. \\n","action":"createTopic","title":"This here is a new topic, friend","categoryId":3,"archetypeId":"regular","metaData":null,"composerTime":24532,"typingTime":2500}' ,
topic _id : null ,
username : "eviltrout" ,
name : null ,
user _id : 1 ,
title : null ,
category _id : 3 ,
archetype : null
} ,
{
excerpt :
"The last reply to this topic was 6 months ago. Your reply will bump the topic to the top of its list" ,
truncated : true ,
created _at : "2018-07-20T19:04:32.023Z" ,
draft _key : "topic_280" ,
sequence : 0 ,
draft _username : "eviltrout" ,
avatar _template : "/letter_avatar_proxy/v2/letter/p/a87d85/{size}.png" ,
data :
'{"reply":"The last reply to this topic was 6 months ago. Your reply will bump the topic to the top of its list.","action":"reply","categoryId":8,"archetypeId":"regular","metaData":null,"composerTime":139499,"typingTime":6100}' ,
topic _id : 280 ,
username : "zogstrip" ,
name : "zogstrip" ,
user _id : 6 ,
title : "Django hangs if I write gibberish" ,
slug : "django-hangs-if-i-write-gibberish" ,
category _id : 8 ,
archetype : "regular"
} ,
{
excerpt : "here goes a reply to a PM." ,
created _at : "2018-07-20T16:58:47.433Z" ,
draft _key : "topic_93" ,
2019-01-28 22:30:01 -05:00
sequence : 0 ,
FEATURE: Drafts view in user profile
* add drafts.json endpoint, user profile tab with drafts stream
* improve drafts stream display in user profile
* truncate excerpts in drafts list, better handling for resume draft action
* improve draft stream SQL query, add rspec tests
* if composer is open, quietly close it when user opens another draft from drafts stream; load PM draft only when user is in /u/username/messages (instead of /u/username)
* cleanup
* linting fixes
* apply prettier styling to modified files
* add client tests for drafts, includes a fixture for drafts.json
* improvements to code following review
* refresh drafts route when user deletes a draft open in the composer while being in the drafts route; minor prettier scss fix
* added more spec tests, deleted an acceptance test for removing drafts that was too finicky, formatting and code style fixes, added appEvent for draft:destroyed
* prettier, eslint fixes
* use "username_lower" from users table, added error handling for rejected promises
* adds guardian spec for can_see_drafts, adds improvements following code review
* move DraftsController spec to its own file
* fix failing drafts qunit test, use getOwner instead of deprecated this.container
* limit test fixture for draft.json testing to new_topic request only
2018-08-01 02:34:54 -04:00
draft _username : "eviltrout" ,
avatar _template : "/user_avatar/localhost/eviltrout/{size}/2_1.png" ,
data :
'{"reply":"here goes a reply to a PM.","action":"reply","categoryId":null,"postId":212,"archetypeId":"regular","whisper":false,"metaData":null,"composerTime":455711,"typingTime":5400}' ,
topic _id : 93 ,
username : "eviltrout" ,
name : null ,
user _id : 1 ,
title : "Hello dear friend, good to see you again" ,
slug : "hello-dear-friend-good-to-see-you-again" ,
archetype : "private_message"
}
]
}
} ;