Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MVP #795

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

MVP #795

wants to merge 7 commits into from

Conversation

AndriiKuz
Copy link

@AndriiKuz AndriiKuz commented Sep 25, 2023

Copy link

@Orpheus29 Orpheus29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job indeed.

Copy link

@roman-mirzoian roman-mirzoian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job, but there is quite a bit of work to be done.

src/TodosContext.tsx Outdated Show resolved Hide resolved
src/TodosContext.tsx Outdated Show resolved Hide resolved
src/TodosContext.tsx Outdated Show resolved Hide resolved
src/TodosContext.tsx Outdated Show resolved Hide resolved
src/TodosContext.tsx Outdated Show resolved Hide resolved
src/components/TodoItem/TodoItem.tsx Outdated Show resolved Hide resolved
src/components/TodoItem/TodoItem.tsx Outdated Show resolved Hide resolved
src/components/TodoItem/TodoItem.tsx Outdated Show resolved Hide resolved
src/components/TodoItem/TodoItem.tsx Outdated Show resolved Hide resolved
src/components/TodoList/TodoList.tsx Show resolved Hide resolved
Copy link

@Moroz-Dmytro Moroz-Dmytro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Should be "1 item" not "1 items"
  2. "Clear completed" should not be visible if there are no completed todos
image

@AndriiKuz
Copy link
Author

  1. Should be "1 item" not "1 items"
  2. "Clear completed" should not be visible if there are no completed todos
image

I agree with you and I changed these bugs, but their were not in the task and the tests are conflicted with these solutions

Copy link

@Moroz-Dmytro Moroz-Dmytro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. When I renamed my todo to empty line -> my todo was deleted, that's correct. But I got an error message on UI(you can check my comment below why that happens)
image
  1. "All" "Active" "Completed" buttons should not "jump"(check the working version on app)
image image
  1. When in offline mode I try to save empty title, message should be "Unable to delete a todo"
image
  1. When I click toggleAll, why I see loader on every todo, if I'm updating just 1
image image

src/TodosContext.tsx Outdated Show resolved Hide resolved
src/TodosContext.tsx Outdated Show resolved Hide resolved
src/TodosContext.tsx Outdated Show resolved Hide resolved
src/TodosContext.tsx Outdated Show resolved Hide resolved
src/TodosContext.tsx Outdated Show resolved Hide resolved
src/TodosContext.tsx Outdated Show resolved Hide resolved
src/TodosContext.tsx Outdated Show resolved Hide resolved
src/components/TodoFooter/TodoFooter.tsx Outdated Show resolved Hide resolved
src/components/TodoItem/TodoItem.tsx Show resolved Hide resolved
src/components/TodoItem/TodoItem.tsx Show resolved Hide resolved
Copy link

@BudnikOleksii BudnikOleksii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job 👍
Left some suggestions, take a look

src/TodosContext.tsx Outdated Show resolved Hide resolved
src/TodosContext.tsx Outdated Show resolved Hide resolved
src/TodosContext.tsx Outdated Show resolved Hide resolved
src/TodosContext.tsx Outdated Show resolved Hide resolved
src/TodosContext.tsx Outdated Show resolved Hide resolved
Comment on lines +172 to +178
setTodos(prevTodos => [...prevTodos, addedTodo]);

return true;
} catch {
setError(ErrorsMessages.Add);

return false;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
setTodos(prevTodos => [...prevTodos, addedTodo]);
return true;
} catch {
setError(ErrorsMessages.Add);
return false;
setTodos(prevTodos => [...prevTodos, addedTodo]);
} catch {
setError(ErrorsMessages.Add);

It's strange to return true or false in handler

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is necessary in order to know whether our promise was fulfilled normally or with an error. I don't know how to do it differently, but it works)

Comment on lines +201 to +205
return true;
} catch {
setError(ErrorsMessages.Update);

return false;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same get rid of them

src/api/todos.ts Outdated Show resolved Hide resolved
src/components/TodoItem/TodoItem.tsx Show resolved Hide resolved
Copy link

@roman-mirzoian roman-mirzoian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done 👍

src/components/TodoItem/TodoItem.tsx Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants