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

Add dashboard wincher connect patch #20307

Merged
merged 20 commits into from
May 17, 2023
Merged

Conversation

pls78
Copy link
Member

@pls78 pls78 commented May 10, 2023

Context

  • We want to show the Wincher section in the WordPress dashboard also when a user is not connected to their Wincher account.

Summary

This PR can be summarized in the following changelog entry:

  • Shows a widget in the WordPress dashboard with a connection button in case a user has not connected to their Wincher account.
  • Renders Wincher-related information in a separate dashboard widget.

Relevant technical choices:

  • N/A

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:
Preliminary steps

  • Make sure you have the Wincher integration active in Yoast SEO -> Integrations
  • If you are connected to your Wincher account disconnect from it (e.g. by turning off and on again the Wincher integration card)
  • If you're already tracking keywords please remove them

Test the new widget

  • Go to Dashboard
  • verify there's a widget like the one below:
    Screenshot 2023-05-10 at 14 16 30
  • verify the link in Connect with Wincher to get started has the following format (parameters values may vary): https://yoa.st/dashboard-about-wincher?php_version=7.4&platform=wordpress&platform_version=6.2&software=premium&software_version=20.8-RC1&days_active=28&user_language=en_US
  • verify the Get more insights over at Wincher link is the following: https://app.wincher.com/login?utm_medium=plugin&utm_source=yoast&referer=yoast&partner=yoast

Test connection error

  • Click on the Connect blue button and connect to your Wincher account: a popup will appear
  • Click to focus on the main window where your website is loaded
  • Simulate being offline through your browser's developers tools
    • For Chrome
      • open the developers tools and go to the Network tab
      • click on No throttling and change it to offline
    • For Firefox
      • open the developers tools and go to the Network tab

      • click on the Request blocking icon
        Screenshot 2023-05-10 at 15 21 28

      • click on Enable Request Blocking

      • in the text field below add your base url (e.g. wordpress.test)

    • Go back to the login popup and complete the procedure
    • Go back to the browser console open in your main window and verify no Uncaught error is displayed
    • Click on the Connect button again and verify
      • the following alert appears

        Screenshot 2023-05-10 at 15 27 01
      • no Uncaught error is displayed in the browser's console

Test the widget's correct functioning

  • Restore your connection and connect with Wincher; the following alert should appear:

    Screenshot 2023-05-10 at 14 16 07
  • Add a focus keyphrase to some of your posts and track it with Wincher

    • In the metabox, verify the two links in With Wincher you can track the ranking position of your page in the search results based on your keyphrase(s). Read more about keyphrase tracking with Wincher have the following format:
      • https://yoa.st/wincher-popup?php_version=7.4&platform=wordpress&platform_version=6.2&software=premium&software_version=20.8-RC1&days_active=28&user_language=en_US
      • https://yoa.st/wincher-integration?php_version=7.4&platform=wordpress&platform_version=6.2&software=premium&software_version=20.8-RC1&days_active=28&user_language=en_US
  • Go to Dashboard and verify your keywords appear in the Yoast SEO / Wincher: Top Keyphrases widget

  • Add some more keyphrases and track them in order to reack your keyphrase quota (it's 5 for the free tier)

  • Try to track another keyphrase and verify the Upgrade your Wincher plan link has the following format:

    • https://yoa.st/wincher-popup-pricing?php_version=7.4&platform=wordpress&platform_version=6.2&software=premium&software_version=20.8-RC1&days_active=28&user_language=en_US

Testing backward compatibility

  • Install an older version of Yoast SEO
  • Add some keyphrases to your posts and track them with Wincher
  • Upgrade Yoast SEO to the version containing this PR
  • Verify you can still see your keyphrases in the Yoast SEO / Wincher: Top Keyphrases

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 (Block/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.

Impact check

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

  • N/A

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.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins 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.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label and noted the work hours.

Fixes #

@pls78 pls78 added UI change PRs that result in a change in the UI enhancement labels May 10, 2023
@vraja-pro vraja-pro self-assigned this May 15, 2023
};

WincherSEOPerformanceTable.propTypes = {
isBlurred: PropTypes.object,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
isBlurred: PropTypes.object,
isBlurred: PropTypes.bool,


Cell.propTypes = {
isBlurred: PropTypes.bool,
children: PropTypes.object,
Copy link
Contributor

@vraja-pro vraja-pro May 15, 2023

Choose a reason for hiding this comment

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

Suggested change
children: PropTypes.object,
children: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
PropTypes.object
]),

@vraja-pro vraja-pro linked an issue May 15, 2023 that may be closed by this pull request
@vraja-pro
Copy link
Contributor

vraja-pro commented May 15, 2023

On dashboard when there is connection, I'm getting more errors in the console
Screenshot 2023-05-15 at 16 20 26

@vraja-pro vraja-pro removed their assignment May 15, 2023
@vraja-pro
Copy link
Contributor

CR & AC ✅

@vraja-pro vraja-pro added this to the 20.9 milestone May 17, 2023
@vraja-pro vraja-pro merged commit cb115fc into trunk May 17, 2023
34 checks passed
@vraja-pro vraja-pro deleted the add-dashboard-wincher-connect-patch branch May 17, 2023 11:00
@vraja-pro vraja-pro added the changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog label May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog enhancement UI change PRs that result in a change in the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add dashboard wincher connect
3 participants