• 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/initialize.js
1
import { dispatch } from "@wordpress/data";
2
import domReady from "@wordpress/dom-ready";
3
import { render } from "@wordpress/element";
4
import { Root } from "@yoast/ui-library";
5
import { get, isEmpty } from "lodash";
6
import { LINK_PARAMS_NAME, PLUGIN_URL_NAME, WISTIA_EMBED_PERMISSION_NAME } from "../shared-admin/store";
7
import { Content, Introduction, IntroductionProvider } from "./components";
8
import { STORE_NAME_INTRODUCTIONS } from "./constants";
9
import { registerStore } from "./store";
10

11
const DATA_NAME = "wpseoIntroductions";
×
12

13
domReady( () => {
×
14
        const initialIntroductions = get( window, `${ DATA_NAME }.introductions`, [] );
×
UNCOV
15
        if ( isEmpty( initialIntroductions ) ) {
×
16
                return;
×
17
        }
18

19
        registerStore( {
×
20
                [ LINK_PARAMS_NAME ]: get( window, `${ DATA_NAME }.linkParams`, {} ),
21
                [ PLUGIN_URL_NAME ]: get( window, `${ DATA_NAME }.pluginUrl`, "" ),
22
                [ WISTIA_EMBED_PERMISSION_NAME ]: {
23
                        value: get( window, `${ DATA_NAME }.wistiaEmbedPermission`, false ) === "1",
24
                },
25
        } );
26
        dispatch( STORE_NAME_INTRODUCTIONS ).setIntroductions( initialIntroductions );
×
27

28
        const rootContext = {
×
29
                isRtl: Boolean( get( window, `${ DATA_NAME }.isRtl`, false ) ),
30
        };
NEW
31
        const initialComponents = {
×
32
                "google-docs-addon-upsell": Content,
33
        };
34

35
        const root = document.createElement( "div" );
×
36
        root.id = "wpseo-introductions";
×
37
        document.body.appendChild( root );
×
38

39
        render(
×
40
                (
41
                        <Root context={ rootContext }>
42
                                <IntroductionProvider initialComponents={ initialComponents }>
43
                                        <Introduction />
44
                                </IntroductionProvider>
45
                        </Root>
46
                ),
47
                root
48
        );
49
} );
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