Skip to content

Add the googlesitekit-key-metrics-setup screen and script asset with stub content, including webpack configuration. #11373

@techanvil

Description

@techanvil

Feature Description

Add the googlesitekit-key-metrics-setup screen and script asset with stub content, including webpack configuration.

For reference, see the Key Metrics setup section in the Design Doc.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • A new WordPress screen googlesitekit-key-metrics-setup is created.
  • The screen is only accessible to administrators.
  • The screen doesn't appear in the WordPress menu.
  • The new screen renders basic stub content without full functionality.

Implementation Brief

  • Create a new component, KeyMetricsSetupApp, in assets/js/components/key-metrics-setup/KeyMetricsSetupApp.js.
    • Render some basic stub content in the component.
  • Create the entry point for the JS asset, assets/js/googlesitekit-key-metrics-setup.js.
    • Follow the pattern of the googlesitekit-user-input.js file.
    • Use the render target js-googlesitekit-key-metrics-setup.
    • Render the KeyMetricsSetupApp component, wrapped in the Root component with a new VIEW_CONTEXT_KEY_METRICS_SETUP view context.
  • Add the new JS asset to the list of modules in assets/webpack/modules.config.js.
  • In Core::Admin::Screens::get_screens(), add a new screen with the slug googlesitekit-key-metrics-setup.
    • capability should be Permissions::MANAGE_OPTIONS.
    • parent_slug should be self::PARENT_SLUG_NULL.
  • In Core::Assets::get_assets(), add a new asset with the handle googlesitekit-key-metrics-setup.
    • src should point to googlesitekit-key-metrics-setup.js.
    • dependencies should be the same as the user-input asset, i.e. the dashboard dependencies.

Test Coverage

  • No new tests needed.

QA Brief

  • Set up Site Kit
  • Visit wp-admin/admin.php?page=googlesitekit-key-metrics-setup
  • Ensure that the screen loads and has the stub content.
  • Ensure the screen is not linked to in the menu.

Changelog entry

  • Add the googlesitekit-key-metrics-setup screen, with stub content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0High priorityTeam MIssues for Squad 2Type: EnhancementImprovement of an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions