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

Yoast / wordpress-seo / 288b805388e31ecb55dff883f9700a1f6517ff30

25 Nov 2024 03:26PM CUT coverage: 54.166% (-0.001%) from 54.167%
288b805388e31ecb55dff883f9700a1f6517ff30

Pull #21862

github

web-flow
Merge 66a57fa3a into b00849231
Pull Request #21862: Dashboard: move to final copy

7593 of 13672 branches covered (55.54%)

Branch coverage included in aggregate %.

0 of 3 new or added lines in 3 files covered. (0.0%)

1 existing line in 1 file now uncovered.

29764 of 55295 relevant lines covered (53.83%)

41506.01 hits per line

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

0.0
/packages/js/src/dashboard/components/page-title.js
1
import { createInterpolateElement } from "@wordpress/element";
2
import { __, sprintf } from "@wordpress/i18n";
3
import { Alert, Link, Paper, Title } from "@yoast/ui-library";
4
import { OutboundLink } from "../../shared-admin/components";
5

6
/**
7
 * @type {import("../index").Features} Features
8
 * @type {import("../index").Links} Links
9
 */
10

11
/**
12
 * @param {string} userName The user name.
13
 * @param {Features} features Whether features are enabled.
14
 * @param {Links} links The links.
15
 * @returns {JSX.Element} The element.
16
 */
NEW
17
export const PageTitle = ( { userName, features, links } ) => (
×
18
        <Paper>
×
19
                <Paper.Content className="yst-flex yst-flex-col yst-gap-y-4 yst-max-w-screen-sm">
20
                        <Title as="h1">
21
                                { sprintf(
22
                                        __( "Hi %s,", "wordpress-seo" ),
23
                                        userName
24
                                ) }
25
                        </Title>
26
                        <p className="yst-text-tiny">
27
                                { features.indexables && ! features.seoAnalysis && ! features.readabilityAnalysis
×
28
                                        ? createInterpolateElement(
29
                                                sprintf(
30
                                                        /* translators: %1$s and %2$s expand to an opening and closing anchor tag. */
31
                                                        __( "It looks like the ‘SEO analysis’ and the ‘Readability analysis’ are currently turned off in your %1$sSite features%2$s. Enable these features to start seeing all the insights you need right here!", "wordpress-seo" ),
32
                                                        "<link>",
33
                                                        "</link>"
34
                                                ),
35
                                                {
36
                                                        // Added dummy space as content to prevent children prop warnings in the console.
37
                                                        link: <Link href="admin.php?page=wpseo_page_settings#/site-features"> </Link>,
38
                                                }
39
                                        )
40
                                        : createInterpolateElement(
41
                                                sprintf(
42
                                                        /* translators: %1$s and %2$s expand to an opening and closing anchor tag. */
43
                                                        __( "Welcome to your dashboard! Check your content's SEO performance, readability, and overall strengths and opportunities. %1$sLearn more on how to improve your content with our content analysis tool%2$s.", "wordpress-seo" ),
44
                                                        "<link>",
45
                                                        "</link>"
46
                                                ),
47
                                                {
48
                                                        // Added dummy space as content to prevent children prop warnings in the console.
49
                                                        link: <OutboundLink href={ links.contentAnalysis }> </OutboundLink>,
50
                                                }
51
                                        )
52
                                }
53
                        </p>
54
                        { ! features.indexables && (
×
55
                                <Alert type="info">
56
                                        { __( "Oops! You can’t see the overview of your SEO scores and readability scores right now because you’re in a non-production environment.", "wordpress-seo" ) }
57
                                </Alert>
58
                        ) }
59
                </Paper.Content>
60
        </Paper>
61
);
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

© 2025 Coveralls, Inc