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

Yoast / wordpress-seo / 119fc61724a33762dcb3892e0df877fc30b32205

27 May 2025 06:46AM CUT coverage: 52.768% (+0.5%) from 52.29%
119fc61724a33762dcb3892e0df877fc30b32205

Pull #22309

github

web-flow
Merge 1a031ad0c into d51584948
Pull Request #22309: Announce the addition of the Google docs add on to Free & Premium #4603

8175 of 14246 branches covered (57.38%)

Branch coverage included in aggregate %.

3 of 30 new or added lines in 4 files covered. (10.0%)

1 existing line in 1 file now uncovered.

29690 of 57512 relevant lines covered (51.62%)

41513.1 hits per line

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

0.0
/packages/js/src/introductions/components/content.js
1
import { useSelect } from "@wordpress/data";
2
import { useMemo } from "@wordpress/element";
3
import { GoogleDocsAddonUpsell } from "../../shared-admin/components";
4
import { STORE_NAME_INTRODUCTIONS } from "../constants";
5
import { Modal } from "./modal";
6
import { __, sprintf } from "@wordpress/i18n";
7
import { get } from "lodash";
8

9
/**
10
 * @returns {JSX.Element} The element.
11
 */
12
export const Content = () => {
×
NEW
13
        const learnMoreLink = useSelect( select => select( STORE_NAME_INTRODUCTIONS ).selectLink( "https://yoast.com/products/google-docs-addon/" ), [] );
×
NEW
14
        const imageLink = useSelect( select => select( STORE_NAME_INTRODUCTIONS ).selectImageLink( "google-docs-addon-thumbnail.png" ), [] );
×
NEW
15
        const isPremium = useMemo( () => Boolean( get( window, "wpseoIntroductions.isPremium", false ) ), [] );
×
16

17
        const thumbnail = useMemo( () => ( {
×
18
                src: imageLink,
19
                width: "432",
20
                height: "243",
21
        } ), [ imageLink ] );
22

NEW
23
        const buttonLabel = useMemo( () => {
×
NEW
24
                if ( isPremium ) {
×
NEW
25
                        return __( "Get started for free", "wordpress-seo" );
×
26
                }
27

28

NEW
29
                return sprintf(
×
30
                        /* translators: %1$s expands to Yoast SEO Premium. */
31
                        __( "Unlock with %1$s", "wordpress-seo" ),
32
                        "Yoast SEO Premium"
33
                );
34
        }
35
        , [ isPremium ] );
36

NEW
37
        const buttonLink = useMemo( () => {
×
NEW
38
                if ( isPremium ) {
×
NEW
39
                        return useSelect( select => select( STORE_NAME_INTRODUCTIONS ).selectLink( "https://yoa.st/google-docs-add-on-introduction-get-started/" ), [] );
×
40
                }
41

NEW
42
                return useSelect( select => select( STORE_NAME_INTRODUCTIONS ).selectLink( "https://yoa.st/google-docs-add-on-introduction-upsell/" ), [] );
×
43
        }, [ isPremium ] );
44

45
        return (
×
46
                <Modal>
47
                        <GoogleDocsAddonUpsell
48
                                learnMoreLink={ learnMoreLink }
49
                                buttonLink={ buttonLink }
50
                                thumbnail={ thumbnail }
51
                                buttonLabel={ buttonLabel }
52
                                isPremium={ isPremium }
53
                        />
54
                </Modal>
55
        );
56
};
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