Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

402 implement site kit setup flow #21978

Open
wants to merge 75 commits into
base: trunk
Choose a base branch
from

Conversation

vraja-pro
Copy link
Contributor

@vraja-pro vraja-pro commented Jan 20, 2025

Context

Summary

This PR can be summarized in the following changelog entry:

  • [@yoast/ui-library 0.1.0 enhancement] Adds Stepper component and Dropdown menu component.
  • Adds unreleased Google Site kit set up flow widget in the dashboard.

Relevant technical choices:

  • This PR doesn't include the quick tour after connecting, the connecting modal and the remove permanently functionality.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Go to Yoast SEO -> General page.
  • Check you don't see the widget for Google Site Kit setup flow(GSK)
  • Enable the feature flag by adding this code ( use Snippets plugin or add to wp-config.php ):
define( 'YOAST_SEO_GOOGLE_SITE_KIT_FEATURE', true );
  • Go to Yoast SEO -> General page.
  • Check you now see the widget for GSK set up flow:
    Screenshot 2025-01-20 at 16 28 35
  • Check the flow in the widget is identical with the design flow [here]
  • (https://www.figma.com/proto/DXKVj4tji7M65FYCYwBFUl/Dashboard?node-id=2984-5586&t=rdGyKj954yajisjl-0&scaling=min-zoom&content-scaling=fixed&page-id=2984%3A5579&starting-point-node-id=2984%3A5586)
  • Check the links will automatically install and activate the plugin.
  • To test completion of set up, complete installation and activation and remove the exclamation sign from line 46 in packages/js/src/dashboard/components/google-site-kit-connection-widget.js
  • To test completion of connection, apply this patch connected-to-gsk.patch
  • Click the three vertical dots in the widget to open a dropdown menu.
  • Check you see two items in the menu:
    • "Dismiss until next visit"
    • "Remove permanently"
  • Click on each and check the widget is removed from the dashboard.
  • Check that the widget reappears when visiting the dashboard again.
  • (The "Remove permanently" functionality is not implemented yet, so the widget would reappear on the next visit.)
  • The quick tour will not work ( for a future PR ).
  • The learn more link would not work, but will be present with params.

UI library - Stepper component

  • Check the stepper works as the flow above.
  • Check the animation order is:
    1. Circle changes into checkmark
    2. Line moves to next circle
    3. That circle changes to current circle
  • Check the active step label is in primary color.
  • Check completed step label has darker hue.
  • Check steps are in the right direction on rtl.

UI library - DropdownMenu component

  • Check the storybook for the DropdwnMenu includes a menu of formatted (ButtonItem) and unformatted (Item) menu item.

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 Implement Site Kit setup flow without the consent modal

add stepper to ui library

export stepper

fix stories args

move margin out of the plugin

fix story space
add translation to the stepper
@vraja-pro vraja-pro added the changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog label Jan 20, 2025
@vraja-pro vraja-pro requested a review from a team as a code owner January 20, 2025 10:13
@coveralls
Copy link

coveralls commented Jan 20, 2025

Pull Request Test Coverage Report for Build d6fd498912430cf12e405e4df66ee8b29264fd73

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

  • 29 of 48 (60.42%) changed or added relevant lines in 6 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-3.1%) to 54.505%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/js/src/integrations-page/recommended-integrations.js 0 2 0.0%
src/dashboard/application/configuration/dashboard-configuration.php 0 4 0.0%
packages/js/src/dashboard/components/dashboard.js 0 5 0.0%
src/dashboard/infrastructure/integrations/site-kit.php 0 8 0.0%
Files with Coverage Reduction New Missed Lines %
packages/js/src/dashboard/components/dashboard.js 1 0.0%
Totals Coverage Status
Change from base Build c975fa023e802752a88b75cc24841cc4d1888cd2: -3.1%
Covered Lines: 30194
Relevant Lines: 55838

💛 - Coveralls

Copy link
Member

@igorschoester igorschoester left a comment

Choose a reason for hiding this comment

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

CR 🏗️

  • About the changelogs/label: You put enhancement while I don't think the unreleased should go in there, right? So probably you meant to signal enhancement for the UI library one. You can do both, see documentation.

AT ❓

  • Getting the following React warning (first run, but already on just not connected):

Warning: Failed prop type: The prop isComplete is marked as required in Stepper, but its value is undefined.

  • The current step svg does not center in the stepper. In the first it is off to the left/bottom? And the rest is off to the right/bottom?
    image
    image

  • No animations? The FTC' vertical stepper has one -- using our ProgressBar that would be fixed

  • Something seems off with the check size, maybe just the outline thing

  • The UI library storybook story is not responding to the inputs

  • The dropdown menu does not show any hover/selection effect

  • The dropdown menu selected looks weird:
    image

packages/js/src/dashboard/components/dashboard.js Outdated Show resolved Hide resolved
packages/js/src/dashboard/components/dashboard.js Outdated Show resolved Hide resolved
packages/ui-library/src/elements/stepper/stories.js Outdated Show resolved Hide resolved
packages/ui-library/src/elements/stepper/index.js Outdated Show resolved Hide resolved
Copy link
Member

@igorschoester igorschoester left a comment

Choose a reason for hiding this comment

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

CR 🏗️

packages/ui-library/src/components/dropdown-menu/index.js Outdated Show resolved Hide resolved
packages/ui-library/src/components/dropdown-menu/index.js Outdated Show resolved Hide resolved
packages/ui-library/src/components/dropdown-menu/index.js Outdated Show resolved Hide resolved
packages/ui-library/src/components/dropdown-menu/index.js Outdated Show resolved Hide resolved
packages/js/src/integrations-page/site-kit-integration.js Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Feb 5, 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.

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 merge conflict
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants