FightPandemics / FightPandemics-Telegram

1 stars 6 forks source link

FP Chatbot on Telegram- View my posts/Edit my posts #13

Open emtay opened 4 years ago

emtay commented 4 years ago

User Story 1: View my posts

As a FightPandemics chatbot user, I want to view all my posts so I can review what I have posted and make edits if anything is wrong or could be improved.

  1. Use Case 1: Multiple posts

User engages with the Main Menu and selects "View my posts" (https://github.com/FightPandemics/FightPandemics-Telegram/issues/4) User will then see all their posts in most recent order (most recent first and oldest last) with the following information separated by "-" from 1-10 (if they have more than 10 posts, they will need to use the arrow ">" button to see posts 11-20). Title - Info (Limited Description like in the FP web view before it gets cut off with option to "View more") - Time of post (as calculated from today's date: 1 week ago/1 day ago/1 month ago/etc.) - # of comments

User will have the following keyboard button options with the corresponding functionality: 1- Buttons 1-10 which matches the # of the post (1-10). Selecting one of these buttons will will then give the user the view of the individual post (see User Story 2) and will also allow them to view the comments. 2- The button ">" will scroll to the next set of posts (11-20) if the user has more than 10 posts (or 21-30 if more than 20 posts). If they have 10 or less, this button will not do anything. 3- The button "<" will scroll to the previous set of posts if the user has more than 10 posts and had scrolled to see 11-20 but now wants to go back to see 1-10. If they have 10 or less, this button will not do anything. 4- The button "Create Post" will kick off the Create Post flow (https://github.com/FightPandemics/FightPandemics-Telegram/issues/6)

Wireframe: https://miro.com/app/board/o9J_kp0wo_Y=/?moveToWidget=3074457349041791975&cot=13 image

User Story 2: View my post > Individual post

As a FightPandemics chatbot user, I want to view my post in full detail and be able to read comments about my post by other users so I can be in touch with them.

  1. Use Case 1: Selection from List of Posts (User Story 1)

User selects one of the posts to view more list of posts on 'View my posts' results. User will then see their single post in detail Wireframe: https://miro.com/app/board/o9J_kp0wo_Y=/?moveToWidget=3074457349090987640&cot=13 image

User will have the following keyboard button options with the corresponding functionality: See comments: Display the comments related to the posts will go to Comments Flow to view and add a comment: https://github.com/FightPandemics/FightPandemics-Telegram/issues/7 Edit Post: This will connect with editing post functionality in User Story 3 below Create Post: This will connect with Create Post flow: https://github.com/FightPandemics/FightPandemics-Telegram/issues/6 Delete Post: This will connect with editing post functionality in User Story 4 below

  1. Use Case 2: Single post

User engages with the Main Menu and selects "View my posts" but they only have 1 post, then automatically go to the individual post view. _> If this is too hard to do, then can do the list and then they select to go to the individual view, but extra work for user._

User Story 3: View my post > Edit post

As a FightPandemics chatbot user, I want to edit my post if anything is wrong or could be improved so that the FP posts are as relevant and accurate as possible.

  1. Use Case 1: User Edits Title After user selects "Edit Post" from the Individual My Post view, then the user should be prompted to select what they want to edit. Buttons for [Edit Title] and [Edit Information] will prompt user to enter the new title or information. Upon hitting enter, they will be submitting their new Title/Information and then will see the result along with the buttons they have for viewing an individual post.

Edit Profile screen: Wireframe: https://miro.com/app/board/o9J_kp0wo_Y=/?moveToWidget=3074457349097297597&cot=13 image

Screen for updating title or information: https://miro.com/app/board/o9J_kp0wo_Y=/?moveToWidget=3074457349107828396&cot=13

  1. Use Case 2: User Edits Type of Help, Location or Duration

User updating Type of Help, Location, or Duration of help will see an updated check within the buttons. Once done they will click "Submit" and then will go to the individual post view with the updated post.

Example of updating Type of Help, Location or Duration: https://miro.com/app/board/o9J_kp0wo_Y=/?moveToWidget=3074457349109201812&cot=13

Confirmation screen after submitting edits: https://miro.com/app/board/o9J_kp0wo_Y=/?moveToWidget=3074457349109201641&cot=13

User Story 4: View my post > Delete post

As a FightPandemics chatbot user, I want to delete my post if it is no longer valid and should be removed so that the FP posts are as relevant and accurate as possible.

  1. Use case 1: Delete Post After user selects "Delete Post" from the Individual My Post view, then the user should be prompted to confirm they want to delete their post: "Are you sure you'd like to delete your post?" With buttons "Yes" or "No

If Yes, give confirmation: "Your post has successfully been deleted"

  1. Use case 1: Not Delete Post After user selects "Delete Post" from the Individual My Post view, then the user should be prompted to confirm they want to delete their post: "Are you sure you'd like to delete your post?" With buttons "Yes" or "No

If No, return user to the individual post they had come from (when they selected "Delete Post")

**Wireframe: https://miro.com/app/board/o9J_kp0wo_Y=/?moveToWidget=3074457349097392813&cot=13 image

Acceptance Criteria:

  1. Given user sees "View my posts" from Main Menu When user has more than one post Then user will see the list of all their posts, in chronological order from newest: 1 > oldest: n with the following information:

  2. Title - Info - Time of post (from current time) - # of comments

  3. Given user sees keyboard options under the list of their posts, When user selects individual post from keyboard from 1 to n Then user will see individual post with the full post details: Title, Info, Time of Post, Location, Type of Help, Duration

  4. Given user sees keyboard options under the list of their posts and is logged in, When user selects "Create Post" from keyboard Then user will be prompted to enter the title of their post. (If user was not logged in they would be directed to log in or sign up)

  5. Given user sees keyboard options under the list of their posts and has made 13 posts, When user selects ">" from keyboard Then user will see posts 11, 12, and 13 on the next page.

  6. Given user has made 13 posts and is currently on the screen seeing posts 11, 12, 13, When user selects "<" from keyboard Then user will go back to the first page 1-10.

  7. Given user has selected a post and is viewing the individual post in detail (or only has 1 post), When the user clicks "See Comments" Then they will see the list of comments similar to the list of posts, as outlined in https://github.com/FightPandemics/FightPandemics-Telegram/issues/7.

  8. Given user has selected a post and is viewing the individual post in detail (or only has 1 post), When the user clicks "Edit Post" Then they will be prompted to go to the Edit Profile screen to be able to update select "Edit Title", "Edit Information", and click on buttons to adjust options for Type of Help, Location, Duration of the post and "Submit."

  9. Given user has selected a post and is viewing the individual post in detail (or only has 1 post), When the user clicks "Create Post" Then they will be prompted to start the Create Post flow https://github.com/FightPandemics/FightPandemics-Telegram/issues/6

  10. Given user has selected a post and is viewing the individual post in detail (or only has 1 post), When the user clicks "Delete Post" Then they will be asked to confirm they want to delete the post.

  11. Given user has clicked "Delete Post" When the user confirms they want to delete the post, Then they will get a message saying: "Your post has been successfully deleted." with buttons for "Create Post" or "Main Menu."

  12. Given user has clicked "Edit Post" When the user selects to "Edit Title" Then they will be prompted to enter their new title and then either go back to "Edit Post" or "Submit" if they're done editing the post.

  13. Given user has clicked "Edit Post" When the user selects to "Edit Title" Then user will be prompted to enter a new title and after hitting enter, the update post will be displayed along with the same options as before when viewing an individual post: "See comments" "Edit Post" "Create Post" "Delete Post"

User sees option to "View Author Profile", "Leave Comment", "See Comments" on the post. User cannot edit or delete the post. User is able to leave a comment on the post.

omerkhan3 commented 4 years ago

API Integration

View Posts: GET /api​/posts​/ - Author ID request parameter to corresponding logged in user. Edit Posts: POST /api/posts/{postId} - Get Post ID from previous View All Posts call and cache for usage.

CamilaArias commented 4 years ago

I think it'd be better if we split this in "View my posts" and "Edit my post"

kumudchauhan commented 3 years ago

Yes, I agree with Cami. "View my posts" is functional through the main menu workflow and we need to implement "Edit my post"