FightPandemics / FightPandemics/FightPandemics-Telegram

FP Chatbot on Telegram-Create Posts flow

Open
#6 6 comments 0 reactions 1 assignee Claimed by @rd257 View on GitHub
ready for engineering
Dominant language
Python
Stars
1
Forks
6
PR merge metrics
No merged PRs in 30d

Description

**User Story:** As a chatbot user, I should be able to create a post that is added to the Fight Pandemics Help Board so that I can contribute to the board without accessing the webapp.

**_- Use Case 1:_** Logged in user when clicks on "Create Post" button then the user should see a series of 4 messages from the bot one after other as per the user inputs in the order given as below along with buttons (Create Post Main Message). In this use case, they don't edit their message after filling out the fields.

1a: "Do you want to make a post to Offer Help or Request Help?" with two buttons: [Offer Help] [Request Help] > user selects one

1b: "What is the title of your post? (60 characters or less)" > user types title and enters

1c: "What is the description of your post?" > user types description and enters

1d: Next there will be a series of buttons and text before they hit "Preview"

- "Please select the following additional attributes for your post:"
- "What is the category of help (choose all the relevant tags)?" (with 12 checkbox buttons- user can select multiple: **Medical Supplies, Groceries/Food, Business, Education, Legal, Wellbeing/Mental, Entertainment, Information, Funding, R&D, Tech, Other**) > can this be dynamcally called so that if webapp adds more category tags, then chatbot automatically will get updated?
- "What is the visibility of your post? (choose only one option)" (with 4 radio buttons- user can only select one: **City, State, Country, Worldwide**)
- "What is the duration of your post? (choose only one option)" (with 4 buttons- user can only select one: **Day, Week, Month, Forever**)
- Button for [Preview]

**Wireframe:** https://miro.com/app/board/o9J_kp0wo_Y=/?moveToWidget=3074457349121133904&cot=12

These are all required fields, so **if the user does not select one of the buttons, they should get an error for what was missing:**
- If tag was missing: "Please enter a category of help"
- If visibility of the post was missing: "Please enter the visibility of the post"
- If the duration of the post was missing: "Please enter the duration of the post"

1e. After user selects [Preview] and all required fields are submitted, they will see a message, a preview of their message, options to edit a part of their post, and a big button to [Submit Post]

1. Message: "Please review your post information before submitting:"
2. Preview: display Post Preview in same format as View Individual Post covered in this story: #4
3. Buttons for the following:
- [Edit Type] > this would go back to 1a above
- [Edit Title] > this would go back to 1b above
- [Edit Description] > this would go back to 1c above
- [Edit Attributes] > this would go back to 1d above
4. Button for [Submit Post]

1f. After user selects [Submit Post], they will get confirmation:
"Post submitted successfully!" along with the following buttons:
- [Main menu] > go to issue #3
- [View my Posts] > go to issue #13

**Wireframe:** https://miro.com/app/board/o9J_kp0wo_Y=/?moveToWidget=3074457349121133925&cot=12

**Wireframe for full Create a Post Flow:** [HERE](https://miro.com/app/board/o9J_kp0wo_Y=/?moveToWidget=3074457349121133912&cot=13)

**_- Use Case 2:_** Same as above but user edits the Post after Preview Post but before Submitting.
After user selects [Preview], they will see:

- "Please review your post information before submitting:"
- [Preview of Message with format of View Individual Post #4 ]
- Buttons for the following:
- - [Edit Type] > this would go back to 1a above
- - [Edit Title] > this would go back to 1b above
- - [Edit Description] > this would go back to 1c above
- - [Edit Attributes] > this would go back to 1d above
- Button for [Submit Post]

**Wireframe:** https://miro.com/app/board/o9J_kp0wo_Y=/?moveToWidget=3074457349121133905&cot=12

2a. If user selects "Edit Type", they get 1a above
"Do you want to make a post to Offer Help or Request Help?" (with two buttons: "Offer Help"; "Request Help")
After user selects one, instead of returning to the full flow, they go back to the results for Preview Post (1e)

2b. If user selects "Edit Title", they get 1b above
"What is the title of your post?
(60 characters or less)"
After user enters a title, instead of returning to the full flow, they go back to the results for Preview Post (1e)

2c. If user selects "Edit Description", they get 1c above
"What is the description of your post?"
After user enters a description, instead of returning to the full flow, they go back to the results for Preview Post (1e)

2d. If user selects "Edit Attributes", they get 1d above
They get the same series of texts and buttons
Then user will click on [Preview] and return to the same Preview Post results (1e)

Eventually user will stop editing and then click "Submit Post" button.

**Acceptance Criteria for Logged In User:**
**AC 1a:**
Given that user taps on "Create a Post" button,
Then the user should see "Do you want to make a post to Offer Help or Request Help?" message along with two buttons: "Offer" & "Request"
When user taps on either "Offer" or "Request" button,
Then the user sees the next message in the Create Posts flow 1b.

**AC 1b:**
Given that user selects either "Offer" or "Request" button,
Then the user should see the following message: "What is the title of your post? (60 characters or less)",
When user types the title and taps on enter,
Then the user sees the next message in the flow 1c.

**Question: what happens on FP Webapp if title is longer than 60 characters? Error or accept and truncate?**

**AC 1c:**
Given that user enters the Title of post,
Then the user should see the following message: "What is the description of your post?",
When user types the Description and taps on enter,
Then the user sees the next message in the flow 1d.

**AC 1d:**
Given that user enters the Description of the post,
Then the user should see following messages:
"Please select the following additional attributes for your post:"
"What is the category of help (choose all the relevant tags)?" with 12 checkbox buttons (can select multiple): Medical Supplies, Groceries/Food, Business, Education, Legal, Wellbeing/Mental, Entertainment, Information, Funding, R&D, Tech, Other
"What is the visibility of your post? (choose only one option)" with 4 radio buttons (can select only 1): City, State, Country, Worldwide)
"What is the duration of your post? (choose only one option)" with 4 buttons (can select only one): Day, Week, Month, Forever
[Preview] button at the end.

When user selects all relevant checkboxes and radio buttons and taps on "Preview" button,
Then the user sees the next message in the flow 1e which is the preview of their Post.

Given that user selects [Preview] but misses the category tag criteria,
Then the user should see following message: "Please enter a category of help"
And user is not able to submit until at least one is selected.

Given that user selects [Preview] but misses the visibility criteria,
Then the user should see following message: "Please enter the visibility of the post"
And user is not able to submit until at least one is selected.

Given that user selects [Preview] but misses the duration criteria,
Then the user should see following message: "Please enter the duration of the post"
And user is not able to submit until at least one is selected.

**AC 1e:**
Given that user selects the category tags, visibility and duration of the post and then clicks "Preview"
Then the user should see the following message: "Please review your post information before submitting" along with the post details message and 5 buttons: ("Edit Type", "Edit Title", "Edit Description", "Edit Attributes", "Submit Post")
When user selects "Submit Post"
Then user will see a confirmation:
"Post submitted successfully!" along with the following buttons:
- [Main menu] > go to issue #3
- [View my Posts] > go to issue #13

**AC 2a.**
Given user selects "Edit Type" from Post Preview screen (1e),
Then user will be prompted again to choose "Do you want to make a post to Offer Help or Request Help?" (with two buttons: "Offer Help"; "Request Help")
After user selects one, user goes back to the results for Preview Post (1e)

**AC 2b.**
Given user selects "Edit Title" from Post Preview screen (1e),
Then user will be prompted "What is the title of your post?
(60 characters or less)"
After user enters a title, user goes back to the results for Preview Post (1e)

**AC 2c.**
Given user selects "Edit Description"
Then user will be prompted "What is the description of your post?"
After user enters a description, user goes back to the results for Preview Post (1e)

**AC 2d.**
Given user selects "Edit Attributes"
They get the same series of texts and buttons from Attribute (1d)
After user clicks on [Preview], user returns to Preview Post results (1e)

**_- Use Case 3:_** A logged out user clicks on "create post" button will need to sign in.

Bot should start "Login/Signup" flow. (Check [HERE](https://github.com/FightPandemics/FightPandemics-Telegram/issues/5) )

**API Integration**
Create Post: POST /api/posts/

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.