Add `ModuleRecoveryAlert` to authenticated dashboard
See original GitHub issueFeature Description
Using ModuleRecoveryAlert implemented in #4823, the alert needs to be added to the authenticated dashboard to be visible to authenticated admins.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The
ModuleRecoveryAlertcomponent should be added to the main and entity dashboards, below any error notifications - The component should only be rendered on the authenticated dashboards (not view-only)
Implementation Brief
-
- In
assets/js/components/Header.jscomponent:- Render
ModuleRecoveryAlertunder theErrorNotificationscomponent when thedashboardSharingfeature flag is enabled and the dashboard is notviewOnly { ! viewOnlyDashboard && dashboardSharingEnabled && <ModuleRecoveryAlert /> }
- Render
- In
Test Coverage
- Add a story with the
ModuleRecoveryAlertshowing something (notnull) inassets/js/components/Header.stories.js
QA Brief
Site Kit
The new Sharing Settings plugin can be used to help show the Module Recovery Alert.
- Setup Site Kit and install the Sharing Settings plugin.
- Create a second admin user, log in to WordPress but don’t sign in to Site Kit with the second user.
- As the second user, use the Sharing Settings plugin to change some settings for Pagespeed Insights and hit save.
- This will have the effect of changing the owner ID for the PSI module. This can be verified with the following SQL query:
SELECT option_value FROM wp_options WHERE option_name = 'googlesitekit_pagespeed-insights_settings';
- View the Site Kit Dashboard as the first user. The Module Recovery Alert should be visible and pressing the Recover button should work (the PSI owner ID should be set to the first user’s ID and the alert should disappear).
- In order to view the checkbox list variant of the Module Recovery Alert, enable the
ideaHubModulefeature flag and set up Idea Hub. Then follow the same steps as above, changing sharing settings as the second user for both PSI and Idea Hub. The alert should show up again for the first user with both modules listed.
Storybook
- Ensure the Module Recovery Alert is visible in the new story Components > Header > Plugin Header with Module Recovery Alert.
Changelog entry
- Add module recovery alert to the dashboard.
Issue Analytics
- State:
- Created a year ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
How to Setup User Authentication for Dash Apps using Python ...
How to authenticate users for dash applications. Learn Dash by Plotly. ... Create User Accounts and Protect Access to Dashboards.
Read more >Authentication | Dash for Python Documentation | Plotly
dash -enterprise-auth allows you to get information about your app viewer with the get_username and get_user_data methods, as well as add a logout...
Read more >How To Add Login Authentication to React Applications
By the end of this tutorial, you'll be able to add authentication to a React application and integrate the login and token storage...
Read more >Site Kit by Google – Analytics, Search Console, AdSense ...
It provides authoritative, up-to-date insights from multiple Google products directly on the WordPress dashboard for easy access, all for free.
Read more >Add authentication and authorization to a Plotly Dash web ...
This tutorial shows you how to integrate your Plotly Dash dashboard with the IBM Cloud App ID service for authentication and authorization.
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

QA ❌
While testing the latest state of dashboard sharing, I noticed that the
ModuleRecoveryAlertis currently being loaded on the splash screen in addition to the dashboard. It is not needed there, and it furthermore triggers a console error due to being loaded there since the necessary dashboard sharing data is (correctly) not being loaded on the splash screen.I’ll create a separate follow-up PR to address this.
QA Update: ✅
Verified:
https://sitekit.withgoogle.com/documentation/using-site-kit/dashboard-sharing/Screenshots