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

kindly review - Ravi Bhushan #2

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

Conversation

r-bhushan
Copy link

Req 112704 - Written Assignment

Issue details: When adding a new TODO, title text box does not get cleared similar to description.

Solution: updated AddTodoForm.tsx - added value property to title input element to always shows value from the variable, which gets cleared after every submitting
Issue 2 details: Currently there are duplicate records shown in the list/grid.For instance TOODs with title "Implement user authentication"
Issue 3 details: In "sampleData.json" there are around 8 TODO items but very few are getting displayed in UI

Solution: updated index.tsx and fixed displayTodos function  for "not urgent flow" was causing issue this behaviour and fix both issues
Issue 4 details: getting below warning during UI rendering
 "Warning: Each child in a list should have a unique "key" prop."

 Solution: added key attribute to TodoList.tsx, Key attribute helps React differentiate between elements in a list. When rendering a list of components, React uses the key to track each item and manage updates efficiently.
Issue 5 details: When adding new TODO, UI does not maintain state

 Solution:
 * added preventDefafult() in AddTodoForm.tsx to restrict browser to from refreshing/reloading UI
 * fixed AddTODO function in index.tsx file by adding new TODO object to the list in a way where react recognise/detect the state change
Issue 6 details: When  deleting a completed TODO, all other TODOs also gets removed instead

 Solution:
 * updated deleteTodo condition in index.tsx to only remove intended TODO item
…deleted

Issue 7 details: When a  TODO gets completed or becomes not urgent , it gets removed from UI and earlier deleted TODOs gets displayed in UI

 Solution:
* updated index.tsx callback function to Including todos ensures the callback always works with the latest state
Details: When a new TODO gets added,system is not providing any feedback to end user

 Solution:
* Implemented toaster message on new TODOs - utilize react toastify dependency in package json and implemented toaster message in AddTodoForm.tsx to display a message on top right connor of UI to provide feedback to end user.
@r-bhushan r-bhushan marked this pull request as ready for review September 6, 2024 04:15
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.

1 participant