Skip to content

Refactor the usage of all “info type notice” components to use the new <Notice type='info'> component #10430

@jimmymadon

Description

@jimmymadon

Feature Description

This issue will replace all existing / legacy "info" type notifications with the new <Notice type="info"> component created in #10429.

InfoNotice
Image


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

Acceptance criteria

  • ALL "info" variants of the legacy <SettingsNotice> components should be refactored to use the new <Notice type="info"> component created in Create new Notice versions of existing SubtleNotifications #10429.
  • All legacy or newly created React components and CSS used for any type of "info" notice components (e.g.<SettingsNotice type='info'> components) other than the above should be removed.

Implementation Brief

  • The following components should be refactored to directly use the assets/js/components/Notice/index.js component (type = TYPES.INFO) instead of the SettingsNotice component being used within them:
    • assets/js/components/consent-mode/WPConsentAPIRequirements.js
    • assets/js/components/settings/SettingsCardConsentMode.js
    • assets/js/modules/adsense/components/common/UseSnippetSwitch.js Story 1 | Story 2
    • assets/js/modules/adsense/components/settings/AdBlockingRecoverySetupCTANotice.js Story
    • assets/js/modules/adsense/components/settings/AdBlockingRecoveryToggle.js Story 1 Story 2
    • assets/js/modules/analytics-4/components/settings/AdsConversionIDSettingsNotice.js
    • assets/js/modules/analytics-4/components/settings/AnalyticsSettingsNotice.js
    • assets/js/modules/sign-in-with-google/components/common/AnyoneCanRegisterDisabledNotice.js
  • Remove any css classes and duplicated styles for all of the components listed above.
  • Remove the TYPE_INFO possibility from the assets/js/components/SettingsNotice/SettingsNotice.js component. Remove any associated CSS classes/tests/stories/scenarios for TYPE_INFO of SettingsNotice.
  • Remove the VARIANTS.INFO possibility from the assets/js/components/notifications/SubtleNotification.js component. Remove any associated CSS classes/tests/stories/scenarios related to this.

Test Coverage

  • No new tests required.

QA Brief

Notices affected can be found in the PR, but a high level overview of the notices is as follows:

Consent Mode

  • Plugin compatibility notice informing the user to ensure they have installed a suitable plugin, once WP Consent API has been installed
  • CM Settings notice in Admin > Settings under Consent Mode that shows when Ads is connected and CM is not connected, ...highly recommended to enable Consent mode...

Adsense

  • Notice showed near the "Let Site Kit place AdSense code on your site" toggle in AdSense settings
  • AdBlocker recovery notice: Start recovering revenue lost from ad blockers by deploying an ad blocking recovery message through Site Kit...
  • AdBlocker recovery notice shown when existing recovery method is detected, You’ve already enabled an ad blocking recovery message on your site...

Reader Revenue Manager

  • Product ID settings notice: Use the new settings in the block editor to select different product IDs for individual pages or control where CTAs appear on an individual post

Sign In With Google

  • Notice that shows when "Anyone can register" is disabled: Enable the %1$s setting to allow your visitors to create an account using the %2$s button..., this notices changes slightly depending on whether the Allow new registrations or Anyone can register settings are enabled in WordPress settings.

Tag Manager

  • Settings notice shown when read only user no longer has access to an account when another admin configured it

General changes

  • Some warning notices were affected as part of this PR (see files changed > VRT images) due to removal of empty containing elements in the notice when their contents were not present (title wrapper, description wrapper, actions wrapper and padding on description when no actions follow it), but should be able to be QA'd from the VRT changes alone.

Changelog entry

  • Refactor the usage of all “info type notice” components to use the new <Notice type='info'> component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Low priorityTeam SIssues for Squad 1Type: 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