• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / 8c08e42cc37b02d75d66d8edd429eb7c0454f677

20 Feb 2026 11:02AM UTC coverage: 56.496%. First build
8c08e42cc37b02d75d66d8edd429eb7c0454f677

Pull #22972

github

web-flow
Merge pull request #23008 from Yoast/1076-task-list-add-scrollbar-and-fade-to-parent-tasks

1076 task list add scrollbar and fade to parent tasks
Pull Request #22972: Task List Phase 2

8963 of 16526 branches covered (54.24%)

Branch coverage included in aggregate %.

167 of 238 new or added lines in 18 files covered. (70.17%)

15128 of 26116 relevant lines covered (57.93%)

114553.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

6.67
/packages/js/src/general/components/task.js
1
import { TaskRow } from "@yoast/dashboard-frontend";
2
import { useCallback, useMemo } from "@wordpress/element";
3
import { useDispatch, useSelect } from "@wordpress/data";
4
import { STORE_NAME } from "../constants";
5
import { values } from "lodash";
6

7
/**
8
 * The Task component to display a task row and modal.
9
 *
10
 * @param {string} title The title of the task.
11
 * @param {string} id The ID of the task.
12
 * @param {number} duration The duration in minutes.
13
 * @param {string} priority The priority: 'low', 'medium', 'high'.
14
 * @param {boolean} isCompleted Whether the task is completed.
15
 * @param {string} [badge] An optional badge to display next to the task title: `premium`, `woo`, `ai`.
16
 *
17
 * @returns {JSX.Element} The Task component.
18
 */
19
export const Task = ( { title, id, duration, priority, isCompleted, badge } ) => {
2✔
NEW
20
        const { resetTaskError, setCurrentOpenTaskId } = useDispatch( STORE_NAME );
×
21

NEW
22
        const tasks = useSelect( ( select ) => select( STORE_NAME ).selectTasks(), [] );
×
NEW
23
        const childTasks = values( tasks ).filter( task => id && task.parentTaskId === id );
×
24

NEW
25
        const totalTasks = useMemo( () => {
×
NEW
26
                return childTasks.length;
×
27
        }, [ childTasks ] );
28

NEW
29
        const completedTasks = useMemo( () => {
×
NEW
30
                return childTasks.filter( ( task ) => task.isCompleted ).length;
×
31
        }, [ childTasks ] );
32

33
        const handleOnOpen = useCallback( () => {
×
34
                resetTaskError( id );
×
NEW
35
                setCurrentOpenTaskId( id );
×
36
        }, [ resetTaskError, setCurrentOpenTaskId, id ] );
37

38
        return <TaskRow
×
39
                title={ title }
40
                duration={ duration }
41
                priority={ priority }
42
                isCompleted={ isCompleted }
43
                onClick={ handleOnOpen }
44
                completedTasks={ completedTasks }
45
                totalTasks={ totalTasks }
46
                badge={ badge }
47
        />;
48
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc