feat: add clear completed button to todo list #821
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a “Clear Completed” action to the Todo list in the editor side sheet. Previously, users had to delete completed tasks individually, which was time-consuming and inefficient. With this update, users can now remove all completed tasks at once, offering a smoother and more intuitive experience.
In addition, this PR upgrades ESLint to version 9 to address npm deprecation warnings and modernize the linting configuration.
Changes
Functionality Updates
Updated src/components/EditorHeader/SideSheet/Todo.jsx:
Added a new “Clear Completed” option to the existing dropdown menu.
Implemented logic to remove tasks where complete === true.
Updated src/i18n/locales/en.js:
Added a new translation key: clear_completed.
Tooling & Configuration Updates
Upgraded ESLint to v9 to resolve npm deprecation warnings (e.g., rimraf, inflight, etc.).
Migrated ESLint configuration to the new eslint.config.js format.
Updated relevant package.json dependencies and scripts.
Verification
Manual Testing
Open the Todo list.
Create several tasks.
Mark some tasks as completed.
Open the “Sort by” dropdown (or menu button).
Select “Clear Completed”.
Confirmed that all completed tasks were removed while active tasks remained intact.
Linting
Ran npm run lint and confirmed no new errors or warnings were introduced.