-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Develop #1084
base: develop
Are you sure you want to change the base?
Develop #1084
Conversation
Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.3. - [Release notes](https://github.com/mysticatea/eslint-utils/releases) - [Commits](mysticatea/eslint-utils@v1.3.1...v1.4.3) Signed-off-by: dependabot[bot] <[email protected]>
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2. - [Release notes](https://github.com/jonschlinkert/mixin-deep/releases) - [Commits](jonschlinkert/mixin-deep@1.3.1...1.3.2) Signed-off-by: dependabot[bot] <[email protected]>
Bumps [lodash.template](https://github.com/lodash/lodash) from 4.4.0 to 4.5.0. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.4.0...4.5.0) Signed-off-by: dependabot[bot] <[email protected]>
Initial markup was fixed
stylelint was added to npm run lint command
the explanation of the task looked confusing to me + saving new todo on blur is quite weird behavior
edited optional task
…dded Cypress tests added
…ess_tests_added Revert "Cypress tests added"
Cypress tests added
Update README.md
add/prettier: add prettier, update readme, format code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your hard work on this project! 😊 However, there are a few critical issues that need to be addressed before we can approve the pull request:
-
Component Splitting: The
App.tsx
file should be refactored to split the code into several components such asFilter
,TodoList
,Todo
, andNewTodo
. This will improve the maintainability and readability of your code. -
Unique ID for Todos: Ensure that each todo has a unique ID, potentially using
+new Date()
as suggested. This is crucial for managing todos effectively. -
Toggle All Button Behavior: The "Toggle all" button should only be active when all todos are completed. Currently, it is marked as
active
by default, which does not reflect the correct state. -
NewTodo Form Constraints: The
NewTodo
form should not allow the creation of empty todos and should trim redundant spaces. This will prevent invalid entries in your todo list. -
Use of Constants: Avoid using unknown strings directly in your code. Instead, define and use constants for filters to enhance code clarity and reduce errors.
-
React Context: Implement React Context to manage todos, as this is a requirement of the task and will help in managing state more effectively.
-
LocalStorage: Ensure that todos are saved to
localStorage
usingJSON.stringify
after each change. This functionality should be reflected in your main application code. -
Inline Editing: Implement the inline editing feature with functionalities such as saving changes on form submission, trimming the saved text, deleting the todo if the title is empty, saving changes on blur, and canceling editing on pressing
Escape
.
Please address these issues to meet the task requirements. Once these changes are made, we can proceed with the approval. Keep up the great work, and don't hesitate to reach out if you need any help! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review
button in the Reviewers tab.
todosCounter: () => cy.byDataCy('TodosCounter'), | ||
clearCompletedButton: () => cy.byDataCy('ClearCompletedButton'), | ||
footer: () => cy.byDataCy('Footer'), | ||
localStorage: () => cy.getAllLocalStorage().its('http://localhost:3001'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of cy.getAllLocalStorage().its('http://localhost:3001')
assumes that the local storage is structured with this specific key. Ensure that this is consistent with your application's local storage setup, as it might not work if the base URL or storage key changes.
Cypress.Commands.add('getByDataCy', selector => { | ||
cy.get(`[data-cy="${selector}"]`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The getByDataCy
command should return the result of cy.get
to ensure it can be chained properly. Modify it to return cy.get(
[data-cy="${selector}"]);
.
{/* this button should have `active` class only if all todos are completed */} | ||
<button | ||
type="button" | ||
className="todoapp__toggle-all active" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The className
for ToggleAllButton
includes active
by default. Ensure this class is conditionally applied based on whether all todos are completed, as per the comment on line 11.
DEMO LINK