question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add `ModuleRecoveryAlert` to authenticated dashboard

See original GitHub issue

Feature 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 ModuleRecoveryAlert component 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.js component:
      • Render ModuleRecoveryAlert under the ErrorNotifications component when the dashboardSharing feature flag is enabled and the dashboard is not viewOnly
      • { ! viewOnlyDashboard && dashboardSharingEnabled && <ModuleRecoveryAlert /> }

Test Coverage

  • Add a story with the ModuleRecoveryAlert showing something (not null) in assets/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 ideaHubModule feature 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:closed
  • Created a year ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
felixarntzcommented, May 27, 2022

QA ❌

While testing the latest state of dashboard sharing, I noticed that the ModuleRecoveryAlert is 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.

0reactions
wpdarrencommented, May 30, 2022

QA Update: ✅

Verified:

  • The content layout issue reported above has been fixed.
  • The Learn more URL is now pointing to https://sitekit.withgoogle.com/documentation/using-site-kit/dashboard-sharing/

image

  • I did notice the console error that @felixarntz mentioned but assumed (wrongly!) that it was because we are still building the feature. Can confirm that the message no longer appears.
  • As the second user, when I changed settings for Pagespeed Insights, it has an effect of changing the owner ID for the PSI module. This was verified using the SQL query.
  • When viewing the Site Kit Dashboard as the first user, the Module Recovery Alert is visible and pressing the Recover button the PSI owner ID is set to the first user’s ID and the alert disappears.
  • Confirmed that the owner ID changed to the first admin user for the PSI module. This was verified using the SQL query.
  • The checkbox list appears on the Module Recovery Alert. Both Idea Hub and PSI modules are checked by default. When the recover button is clicked the PSI owner ID changes and the message disappears.
  • The checkbox list appears on the Module Recovery Alert. Both Idea Hub and PSI modules are checked by default. When only one of the modules is selected, i.e. Idea Hub, and I click on the recover button, the message reappears with just the PSI mentioned in the alert. The checklist disappears. When I click on the recover button again, the message disappears.
Screenshots

image

image

image

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found