Skip to content

Timebased traffic route update#22005

Merged
pls78 merged 10 commits intotrunkfrom
timebasedtrafficroute-update
Feb 12, 2025
Merged

Timebased traffic route update#22005
pls78 merged 10 commits intotrunkfrom
timebasedtrafficroute-update

Conversation

@thijsoo
Copy link
Copy Markdown
Contributor

@thijsoo thijsoo commented Jan 30, 2025

Context

  • We want to tweak our endpoint a bit.

Summary

This PR can be summarized in the following changelog entry:

  • Removes widget specific endpoints for a generic time based endpoint.

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:

  • Make sure you have Site kit configured
  • In postman sent the following requests and make sure you get the same results:
  • {your site}/wp-json/yoast/v1/time_based_seo_metrics?options[widget]=query
  • This should return your top 5 queries
  • {your site}/wp-json/yoast/v1/time_based_seo_metrics?options[widget]=page
  • This should return your top 5 queries with SeoScores and links (like described in this PR)
  • {your site}/wp-json/yoast/v1/time_based_seo_metrics
  • You should get a Missing parameter(s): options",
  • {your site}/wp-json/yoast/v1/time_based_seo_metrics?options[widget]=queryk
  • You should see get a 404 with the "error": "Repository not found" response.

Also:

  • Go to Yoast SEO->General and in the console type wpseoScriptData.dashboard.endpoints
  • Confirm that you get a timeBasedSeoMetrics: "http://sitekit.local/wp-json/yoast/v1/time_based_seo_metrics" element.

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/434

@thijsoo thijsoo added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Jan 30, 2025
Base automatically changed from 426-add-the-edit-button-column---backend to trunk February 3, 2025 11:31
Copy link
Copy Markdown
Contributor

@leonidasmi leonidasmi left a comment

Choose a reason for hiding this comment

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

CR: 🏗️

Comment thread src/dashboard/user-interface/search-rankings/time-based-traffic-route.php Outdated
@coveralls
Copy link
Copy Markdown

coveralls commented Feb 3, 2025

Pull Request Test Coverage Report for Build 58fcd7a9185a07a39e49f36ee14661dcd3562001

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 48 (0.0%) changed or added relevant lines in 4 files are covered.
  • 992 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.01%) to 54.591%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/dashboard/infrastructure/search-console/search-console-parameters.php 0 1 0.0%
src/dashboard/domain/time-based-seo-metrics/repository-not-found-exception.php 0 2 0.0%
src/dashboard/infrastructure/endpoints/time-based-seo-metrics-endpoint.php 0 3 0.0%
src/dashboard/user-interface/time-based-seo-metrics/time-based-seo-metrics-route.php 0 42 0.0%
Files with Coverage Reduction New Missed Lines %
src/generated/container.php 992 0.38%
Totals Coverage Status
Change from base Build 2d39f817ad47444fce9230e581a5710e9e3958b5: 0.01%
Covered Lines: 30316
Relevant Lines: 55954

💛 - Coveralls

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, would it make sense to also provide the values that the options[widget] can take, right? as in query, page.

I mean, providing the information of the endpoints to the frontend is useless without providing the information of how to use them 🤔

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: ✅

@pls78 pls78 added this to the 24.5 milestone Feb 12, 2025
@pls78 pls78 merged commit b656761 into trunk Feb 12, 2025
@pls78 pls78 deleted the timebasedtrafficroute-update branch February 12, 2025 11:41
@mhkuu mhkuu modified the milestones: 24.5, 24.6 Feb 18, 2025
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.

5 participants