Implement Idea Hub dashboard notification informing about the module
See original GitHub issueA Site Kit dashboard notification should be displayed to inform users about the new Idea Hub module if they have access to it. See the Figma file for UI design.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- A new notification component
IdeaHubModuleNotificationshould be implemented which prompts the user to activate the Idea Hub module.- The overall notice should look similar to this Figma design (no need to follow pixel-perfect/design a new component, but follow what we already have in other notifications), except for the buttons which should be left-aligned like we have in all other notifications.
- Clicking the primary button should activate the Idea Hub module and then redirect to OAuth/module setup as usual.
- Clicking the dismiss button should dismiss the notice persistently by storing the dismissal on the server-side. This should use the same implementation that #3360 has established, however it must use a different identifier (i.e. the dismissals for the notification and the widget CTA should be kept separate, even though they are for a rather similar purpose - we want to make sure people don’t “accidentally” dismiss one; they should see both).
- Notification graphic: The Idea Hub module icon.
- Notification heading: Get new ideas to write about based on what people are searching for
- Notification text: Set up Idea Hub to get topic suggestions based on unanswered searches that match your site’s topic.
- Notification button texts: Set up / Dismiss
- The above notification should be shown on the Site Kit dashboard under the following conditions:
- The
ideaHubModulefeature flag is enabled. - The Idea Hub module is not active.
- The success feedback notification about having connected Site Kit or activated a module is not there (we want to avoid showing both together - it is okay though to show this one alongside any remote
core/site/data/notificationsnotifications).
- The
Implementation Brief
- Once #3360 has been merged.
- Create
assets/js/components/notifications/IdeaHubModuleNotification.jswhich exports theIdeaHubModuleNotificationfunctional component with the following details:- Create a constant for will be the predefined ID of the notification.
- Check if the module is active by quering the modules data store via the
getModulefunction, passingidea-hubas paramter and checking theactiveproperty from the result. Ifactiveis nottrue, returnnull. - Check if the notification has been dismissed by querying the user data store via the
isItemDismissedselector, passing the ID defined in the first bullet point. If the item has been dismissed, returnnull. - Internally
IdeaHubModuleNotificationuses theNotificationcomponent with the following main prop values:title,description,ctaLabel,SmallImageSVGas defined in the AC.formatshould besmalltypeshould bewin-successonCTAClick: more below.onDismissmore below.
- Add the
handleCTAClickfunction which is the value for theonCTAClickprop. The function should redirect the user to the module setup screen. To get the module setup URL, query the module’s data store via thegetAdminReauthURLselector. Then dispatch thenavigateToaction of thecore/locationdata store to redirect the user. An example can be found inCompleteModuleActivationCTA. - Add the
handleOnDismissfunction which is the value for theonDismissprop. The function should dispatch thedismissItemaction of the user data store, passing a notification ID defined in the first bullet point as parameter.
- Using `assets/js/components/legacy-notifications/index.js,
- import the
IdeaHubModuleNotificationcomponent and create a variable by callingcreateAddToFilterwith the component as parameter as it is done for theUserInputPromptNotification. - The
IdeaHubModuleNotificationcomponent must be hooked to thegooglesitekit.DashboardNotificationsfilter (similar to what’s been done with theUserInputPromptNotification) based on the following conditions:- Check if the
ideaHubModulefeature flag is enabled by using theisFeatureEnabledfunction. - Check if
notificationandsetupare null, which means there are no setup notifications being shown at the same time.
- Check if the
- import the
Test Coverage
- No new tests to be added.
Visual Regression Changes
- N/A
QA Brief
- Visit the “Modules -> Idea Hub -> Notications -> ModuleNotification -> Ready”
- The title, description, image should be as per the AC.
- Enable the
ideaHubModulefeature flag and don’t connect the module. - A notification with details as per the AC should appear on the main dashboard prompting the user to connect Idea Hub.
- If dismissed, check if the following XHR is made to
/wp-json/google-site-kit/v1/core/user/data/dismiss-item
Changelog entry
- Add Idea Hub dashboard notification to inform users about new Idea Hub module.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
What is Idea Hub? | WordPress.org
Hi, I always see Idea Hub on the update notification messages, but I don't know what it is. There is no documentation about...
Read more >site-kit-wp/readme.txt at develop - GitHub
Add Idea Hub dashboard notification to inform users about new Idea Hub module. See [#3523](https://github.com/google/site-kit-wp/issues/3523).
Read more >Use Alerts and Case Management in Student Success Hub for ...
Explain how alerts keep stakeholders informed of students' needs. Use Student Success Hub for collaborative case management. Student support is a team sport ......
Read more >Notification Hubs - Mobile push notifications - Microsoft Azure
Learn about Azure Notification Hubs. Send push notifications to iOS, Android, Windows, or Kindle from any backend. Easier mobile app development.
Read more >STUDENT HUB ACCOUNT
If you attend an approved private high school, use your social security number to register. ... This includes a login name, password, password...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks @wpdarren A follow up PR has been created: https://github.com/google/site-kit-wp/pull/3739
QA Update: ✅
Verified:
set upbutton sends the user to the connect service page.Get new ideas to write about based on what people are searching forSet up Idea Hub to get topic suggestions based on unanswered searches that match your site’s topic.Set up/DismissAdditional checks: made sure that the notice appeared correctly for our primary supported browsers, i.e. Firefox, Safari and also mobile devices on Android and iOS.