Skip to content

Dashboard: setup the package in the free monorepo#22152

Merged
thijsoo merged 41 commits intotrunkfrom
495-dashboard-setup-the-package-in-the-free-monorepo
Apr 2, 2025
Merged

Dashboard: setup the package in the free monorepo#22152
thijsoo merged 41 commits intotrunkfrom
495-dashboard-setup-the-package-in-the-free-monorepo

Conversation

@igorschoester
Copy link
Copy Markdown
Contributor

@igorschoester igorschoester commented Mar 27, 2025

Context

  • Create a package for the dashboard frontend. Splitting the code up for easier re-use outside of the plugin.

Summary

This PR can be summarized in the following changelog entry:

  • [@yoast/dashboard-frontend 0.1.0 enhancement] Adds widgets and services as building blocks to create a dashboard page.
  • Implements the dashboard-frontend package.
  • Removes the files that are now in the dashboard-frontend package.
  • Fixes a bug where the Site Kit setup widget' learn more would be a button, now a link. Also adds a tiny bit of extra space between the learn more and the primary button.

Relevant technical choices:

  • Site Kit setup widget because it's WordPress specific. Thus only relevant to the plugin and not other platforms
  • The data provider and widget factory are unused exports now, we foresee us changing this to more the interface like the formatter
    • They both make sense to include in the package as an API documentation, or default case
  • Removed the static from the WidgetFactory types to have to go through, a potentially different, instance of the interface (i.e. the calls within the package should lead to the same types as the overrides inside the platform implementation)
  • We had to keep Jest v27 due to monorepo shenanigans when switching to v29 (other packages' tests started failing due to setup, best guess: suddenly running with v29?)

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Connect to site kit and check site kit widget are loading and with data as expected
  • Check out the Site Kit setup widget' learn more link
    • Verify it is a link, with the URL to https://yoa.st/dashboard-site-kit-learn-more
  • Smoke test all the widgets. We moved the code, but not really changes internally
    • Pay some extra attention to the styling (should not be missing). Specifically, the responsiveness of the Search Ranking Compare widget (the 4 in a row one). For example, it should be a 4x4 in the middle size.

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 https://github.com/Yoast/reserved-tasks/issues/495

@igorschoester igorschoester added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Mar 27, 2025
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 27, 2025

Pull Request Test Coverage Report for Build 4229975b3683b5e6a58a14b8d28ef9c9b2705a35

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

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.4%) to 54.454%

Totals Coverage Status
Change from base Build 17b5e5668cddb7f4d9014f667801941761aaedf3: -0.4%
Covered Lines: 29570
Relevant Lines: 54786

💛 - Coveralls

@igorschoester igorschoester marked this pull request as ready for review April 1, 2025 11:22
Not sure why we have this elsewhere, but doesn't seem needed now
@thijsoo thijsoo added this to the 25.0 milestone Apr 2, 2025
Copy link
Copy Markdown
Contributor

@thijsoo thijsoo 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 👍

@thijsoo thijsoo merged commit a35f8fb into trunk Apr 2, 2025
23 checks passed
@thijsoo thijsoo deleted the 495-dashboard-setup-the-package-in-the-free-monorepo branch April 2, 2025 12:23
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.

4 participants