As a user, I want to edit my "To-do list" so that I could add or delete items if needed.
Preconditions:
The registered user is logged in.
User has at least 1 habit in progress.
Acceptance criteria:
By clicking on “Edit” button on the "My Habits" page, user is redirected to the "Habits" page (edit mode) where he/she is able to make changes in the "To-do list".
System displays items in the "To-do list" in the following order:
selected items while adding a habit by a user are displayed at the top of the list with the “-” button;
recommended by the system items that weren’t selected by a user are displayed with the “+” button;
at the bottom of the list user sees the input field with “+” button;
system displays 3 items by default;
when user want to see more items he/she can use the "scrollbar" on the right side of the text;
when user hovers a cursor over the item, the system displays the whole item’s name;
recommended by the system items are displayed in alphabetical order.
When there are no recommended items in the "To-do list":
the text "No items to recommend" is displayed in the "To-do list" text area.
User can remove an item from the "To-do list" by clicking on the “-” button.
User can add an item from the recommended list by clicking on the “+” button.
user should type the item's name into the input field by clicking ENTER or the “+” button;
the custom item is displayed on the top of the "To-do list" with the “+” button;
if the user wants to add his created custom item to the "To-do list", he/she should click on the "+" button;
user can remove the custom item by clicking on the "x" button on the right side of the item's name;
user can't type less than 3 characters into the input field. The "+" button is not activated;
the input field should contain no more than 50 characters (all characters, except: @!#$%^*()_+-{}[]?><:";,.\'|/~`§=space);
when the user type more than 50 characters, the message "The input field should contain no more than 50 characters" highlighted in red is displayed under the input field. The '+' button in not activated.
user is able to type a link in the input field which should be clickable on the "Habits" page.
When user click on the “Save” button:
the system updates changes in the "To-do list" on the "Habits" page (edit mode) and in the "My To-do list" on the left side bottom of the "My habits" page;
the system is displayed a pop-up window with the text highlighted in green “You have successfully updated a habit” and returns user to "My habits" page.
As a user, I want to edit my "To-do list" so that I could add or delete items if needed.
Preconditions:
Acceptance criteria:
System displays items in the "To-do list" in the following order:
When there are no recommended items in the "To-do list":
User can remove an item from the "To-do list" by clicking on the “-” button.
User can add an item from the recommended list by clicking on the “+” button.
User can add his/her custom item: according to the user stories: https://github.com/ita-social-projects/GreenCity/issues/2251, https://github.com/ita-social-projects/GreenCity/issues/2249
When user click on the “Save” button: