Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Replace Donation Banner with a generic Notification Banner to use when necessary #51

Merged
merged 4 commits into from
Apr 29, 2021

Conversation

obulat
Copy link
Contributor

@obulat obulat commented Apr 29, 2021

Fixes #52

The CC donation banner and the a/b test for its language need to be removed from the site.

This PR converts the DonationBanner into a more general component to display a site banner beneath the header navbar whenever we need that. It creates a new store to keep the state related to the notification banner.

To create and show the Notification Banner, you need to:

  • set showNotification in the notification-store state to true.
  • If you need an 'Okay' action button, set header.notification.okay in the locale file to the name of the button, and add the action that needs to be performed in the NOTIFICATION_ACTION in the notification-store.
  • If you want the Dismiss button to have a text and not just a cross icon, add the button text to header.notification.dismiss key in the locale file.

The test failures in the a/b experiment tests prevented me from pushing, so I fixed them, too.

@obulat obulat requested a review from zackkrida April 29, 2021 16:30
nuxt.config.js Outdated Show resolved Hide resolved
src/plugins/ab-test-init.js Outdated Show resolved Hide resolved
@zackkrida zackkrida merged commit 1e47cb5 into WordPress:develop Apr 29, 2021
@zackkrida zackkrida deleted the notification branch April 29, 2021 18:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove the DonationBanner
2 participants