Skip to content

497 redirect to Yoast dashboard at the end of site kit installation flow#22185

Merged
pls78 merged 9 commits intotrunkfrom
497-redirect-to-yoast-dashboard-at-the-end-of-site-kit-installation-flow
Apr 15, 2025
Merged

497 redirect to Yoast dashboard at the end of site kit installation flow#22185
pls78 merged 9 commits intotrunkfrom
497-redirect-to-yoast-dashboard-at-the-end-of-site-kit-installation-flow

Conversation

@thijsoo
Copy link
Copy Markdown
Contributor

@thijsoo thijsoo commented Apr 9, 2025

Context

  • We want to redirect back from the Site Kit plugin if the activation or install originated from the Yoast Dash.

Summary

This PR can be summarized in the following changelog entry:

  • Adds a potential redirect from the Site Kit onboarding back to the Yoast SEO dashboard when the onboarding is completed.

Relevant technical choices:

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

To mock testing this feature without actually having to do the onboarding we will fake coming back from the Site Kit Oauth by using the following url to test the working of the transient:
/wp-admin/admin.php?page=googlesitekit-splash&notification=authentication_success

  • Without doing anything else go to this URL and make sure you get redirected to the dashboard. Take note of the page changing to googlesitekit-dashboard
  • Reset your options so the Site Kit widget shows up.
  • Uninstall the Site Kit plugin and click on the install button in the widget. Also activate it via the widget.
  • Go to /wp-admin/admin.php?page=googlesitekit-splash&notification=authentication_success and make sure you get redirected to the dashboard and see the message in the screenshot.
image
  • Go to the url again and make sure you are not redirected.
  • Activate the plugin via the setup widget and go back to the /wp-admin/admin.php?page=googlesitekit-splash&notification=authentication_success and make sure you get redirected again.
  • Setup the Site Kit widget and make sure you are redirect to our dashboard.

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

QA can test this PR by following these steps:

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • I have added unit tests to verify the code works as intended.
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label.
  • I have added my hours to the WBSO document.

Fixes #

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2025

A merge conflict has been detected for the proposed code changes in this PR. Please resolve the conflict by either rebasing the PR or merging in changes from the base branch.

@thijsoo thijsoo added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Apr 9, 2025
…ect-to-yoast-dashboard-at-the-end-of-site-kit-installation-flow

# Conflicts:
#	packages/js/src/dashboard/widgets/site-kit-setup-widget.js
#	packages/js/src/general/initialize.js
@thijsoo thijsoo marked this pull request as ready for review April 9, 2025 13:40
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 9, 2025

Pull Request Test Coverage Report for Build 1966a80473408e10301c55e248aed4f6250b0a7a

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 53 of 77 (68.83%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 52.457%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/js/src/dashboard/widgets/site-kit-setup-widget.js 1 2 50.0%
src/dashboard/infrastructure/integrations/site-kit.php 6 29 20.69%
Totals Coverage Status
Change from base Build d5c0395617268a4e44627c6847bf3faa0a6cc695: 0.003%
Covered Lines: 29058
Relevant Lines: 56436

💛 - Coveralls

@github-actions
Copy link
Copy Markdown

A merge conflict has been detected for the proposed code changes in this PR. Please resolve the conflict by either rebasing the PR or merging in changes from the base branch.

@pls78 pls78 added this to the 24.9 milestone Apr 15, 2025
Copy link
Copy Markdown
Member

@pls78 pls78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR && Acc. ✅

…of-site-kit-installation-flow

# Conflicts:
#	src/dashboard/infrastructure/integrations/site-kit.php
@pls78 pls78 merged commit aa29bd5 into trunk Apr 15, 2025
38 checks passed
@pls78 pls78 deleted the 497-redirect-to-yoast-dashboard-at-the-end-of-site-kit-installation-flow branch April 15, 2025 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants