Skip to content

Remove 'New' badge from audience groups widget  #12290

@wpdarren

Description

@wpdarren

Bug Description

In #12096 we removed the New badge from Site Kit settings for a few modules that had been available for a long period of time. While release testing, I noticed that we still have this badge on the Audience group widget. We should remove the badge from this location too as this feature has been available for a while.

image.png

Steps to reproduce

  1. Set up Site Kit with Analytics that has data (or is zero data)
  2. Set up Audience groups so that the widget appears on the dashboard.
  3. Observe the New badge on the side of the description text.

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

Acceptance criteria

  • The "New" badge should be removed from the "Audience groups" widget (in assets/js/googlesitekit/widgets/register-defaults.js)
  • The "New" badge should no longer appear in the "Audience groups" widget

Implementation Brief

  • Remove the hasNewBadge: true from
    widgetsAPI.registerWidgetArea(
    AREA_MAIN_DASHBOARD_TRAFFIC_AUDIENCE_SEGMENTATION,
    {
    subtitle: __(
    'Understand how different visitor groups interact with your site',
    'google-site-kit'
    ),
    hasNewBadge: true,
    style: WIDGET_AREA_STYLES.BOXES,
    priority: 2,
    CTA: ChangeGroupsLink,
    Footer: AudienceAreaFooter,
    filterActiveWidgets( select, areaWidgets ) {
    if (
    ! select( CORE_USER ).hasAccessToShareableModule(
    MODULE_SLUG_ANALYTICS_4
    )
    ) {
    return [];
    }
    const isAudienceSegmentationWidgetHidden =
    select( CORE_USER ).isAudienceSegmentationWidgetHidden();
    if (
    isAudienceSegmentationWidgetHidden === undefined ||
    isAudienceSegmentationWidgetHidden
    ) {
    return [];
    }
    return areaWidgets;
    },
    },
    CONTEXT_MAIN_DASHBOARD_TRAFFIC
    );

Test Coverage

  • Adjust/update any VRT images and unit tests to reflect the lack of "New" badge. No new tests are required.

QA Brief

  • Follow "Steps to reproduce" above
  • Ensure the New badge is no longer on the side of the description text

Changelog entry

  • Remove the "New" badge from the Audience groups widget.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Module: AnalyticsGoogle Analytics module related issuesP2Low 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