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

Yoast / wordpress-seo / 8218b111533b92ec47f94130a94bcd0102263a45

01 Dec 2025 09:48AM UTC coverage: 53.092%. First build
8218b111533b92ec47f94130a94bcd0102263a45

push

github

web-flow
Merge pull request #22759 from Yoast/feature/task-list

Feature/task list

8697 of 16050 branches covered (54.19%)

Branch coverage included in aggregate %.

98 of 605 new or added lines in 51 files covered. (16.2%)

32413 of 61381 relevant lines covered (52.81%)

46976.02 hits per line

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

78.95
/packages/dashboard-frontend/src/task-list/components/priority.js
1
import { ChevronDoubleUpIcon, ChevronDoubleDownIcon, MenuAlt4Icon } from "@heroicons/react/outline";
2
import { __ } from "@wordpress/i18n";
3
import { useSvgAria, SkeletonLoader } from "@yoast/ui-library";
4
import classNames from "classnames";
5

6
const priorityLabels = {
24✔
7
        low: __( "Low", "wordpress-seo" ),
8
        medium: __( "Medium", "wordpress-seo" ),
9
        high: __( "High", "wordpress-seo" ),
10
};
11

12
/**
13
 *
14
 * @param {string} level The priority level.
15
 * @returns {Object} The priority object with label and icon.
16
 */
17
const getPriorityIcon = ( level ) => {
24✔
18
        const svgAriaProps = useSvgAria();
58✔
19
        switch ( level ) {
58!
20
                case "high":
21
                        return <ChevronDoubleUpIcon className="yst-w-4 yst-text-red-600" { ...svgAriaProps } />;
44✔
22
                case "medium":
23
                        return <MenuAlt4Icon className="yst-w-4 yst-text-amber-500" { ...svgAriaProps } />;
14✔
24
                default:
NEW
25
                        return <ChevronDoubleDownIcon className="yst-w-4 yst-text-slate-400" { ...svgAriaProps } />;
×
26
        }
27
};
28

29
/**
30
 * The Priority component to display task priority.
31
 *
32
 * @param {string} [level=low] The priority level: 'low', 'medium', 'high'.
33
 * @param {boolean} [isLoading=false] Whether the priority is loading.
34
 * @param {string} [className=""] Additional class names.
35
 * @returns {JSX.Element} The Priority component.
36
 */
37
export const Priority = ( { level = "low", isLoading = false, className = "" } ) => {
24!
38
        const svgAriaProps = useSvgAria();
58✔
39
        return <span className={ classNames( "yst-text-xs yst-text-slate-600 yst-flex yst-gap-1", className ) }>
58✔
40
                { isLoading ? <>
29!
41
                        <MenuAlt4Icon className="yst-w-4 yst-text-slate-400" { ...svgAriaProps } />
42
                        <SkeletonLoader className="yst-w-11 yst-h-[18px]" />
43
                </>
44
                        : <>
45
                                { getPriorityIcon( level ) }
46
                                <span className="sm:yst-inline-block yst-hidden">{ priorityLabels[ level ] }</span>
47
                        </> }
48
        </span>;
49
};
50

51

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