Skip to content

Misc improvements for the backend of the tasklist#22731

Merged
vraja-pro merged 7 commits intofeature/task-listfrom
858-backend-include-the-endpoints-in-the-script-data
Nov 20, 2025
Merged

Misc improvements for the backend of the tasklist#22731
vraja-pro merged 7 commits intofeature/task-listfrom
858-backend-include-the-endpoints-in-the-script-data

Conversation

@leonidasmi
Copy link
Copy Markdown
Contributor

@leonidasmi leonidasmi commented Nov 19, 2025

Context

Summary

This PR can be summarized in the following changelog entry:

  • Finalizes task copies.
  • Returns null in the how-to copies for tasks that have none.
  • Makes camelCase attributes in the backend response
  • Flattens the copySet response
  • Includes endpoints in script data
  • Adds badges in tasks.

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:

  • In the console data of the dashboard page, we can now see the wpseoScriptData.taskListConfiguration.endpoints attribute that contains the endpoints:
completeTask: "http://dev.local/wp-json/yoast/v1/complete_task"
getTasks: "http://dev.local/wp-json/yoast/v1/get_tasks"
  • Do a GET request in the http://dev.local/wp-json/yoast/v1/get_tasks endpoint and confirm that you see the following response (ignore the values of the isCompleted, as they depend on whether you have done the tasks or not) (the copies should be the same with this sheet) (everything else should be the same):
{
    "success": true,
    "tasks": {
        "complete-ftc": {
            "id": "complete-ftc",
            "duration": 15,
            "priority": "high",
            "badge": null,
            "isCompleted": true,
            "callToAction": {
                "label": "Start configuration",
                "type": "link",
                "href": "http://dev.local/wp-admin/admin.php?page=wpseo_dashboard#/first-time-configuration"
            },
            "title": "Complete the First-time configuration",
            "why": "Skipping the configuration limits how much Yoast SEO can help you. Completing it makes sure the core settings are working in your favor.",
            "how": null
        },
        "delete-hello-world": {
            "id": "delete-hello-world",
            "duration": 1,
            "priority": "medium",
            "badge": null,
            "isCompleted": true,
            "callToAction": {
                "label": "Delete for me",
                "type": "delete",
                "href": null
            },
            "title": "Remove the “Hello World” post",
            "why": "Leaving placeholder content makes your site look unfinished and untrustworthy. Removing it keeps your site clean and professional for visitors and search engines.",
            "how": null
        },
        "enable-llms-txt": {
            "id": "enable-llms-txt",
            "duration": 1,
            "priority": "medium",
            "badge": null,
            "isCompleted": false,
            "callToAction": {
                "label": "Enable llms.txt",
                "type": "default",
                "href": null
            },
            "title": "Create an llms.txt file",
            "why": "Without llms.txt, AI crawlers may not know how to treat your content. Publishing it helps communicate your preferences in a clearer way to AI tools.",
            "how": null
        },
        "set-search-appearance-templates-post": {
            "id": "set-search-appearance-templates-post",
            "duration": 10,
            "priority": "high",
            "badge": null,
            "isCompleted": false,
            "callToAction": {
                "label": "Customize search appearance",
                "type": "link",
                "href": "http://dev.local/wp-admin/admin.php?page=wpseo_page_settings#/post-type/posts"
            },
            "title": "Set search appearance templates for your posts",
            "why": "Generic titles and descriptions make your results unclear in search. Templates ensure every post has a clear, click-worthy snippet automatically.",
            "how": "Go to Search appearance, choose your post type, and set default title and meta description patterns."
        },
        "set-search-appearance-templates-page": {
            "id": "set-search-appearance-templates-page",
            "duration": 10,
            "priority": "high",
            "badge": null,
            "isCompleted": false,
            "callToAction": {
                "label": "Customize search appearance",
                "type": "link",
                "href": "http://dev.local/wp-admin/admin.php?page=wpseo_page_settings#/post-type/pages"
            },
            "title": "Set search appearance templates for your pages",
            "why": "Generic titles and descriptions make your results unclear in search. Templates ensure every page has a clear, click-worthy snippet automatically.",
            "how": "Go to Search appearance, choose your post type, and set default title and meta description patterns."
        }
    }
}

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.

Impact check

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

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.
  • I have ran grunt build:images and commited the results, if my PR introduces new images or SVGs.

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 #

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

coveralls commented Nov 19, 2025

@leonidasmi leonidasmi added this to the feature/task-list milestone Nov 20, 2025
@leonidasmi leonidasmi marked this pull request as ready for review November 20, 2025 06:56
Copy link
Copy Markdown
Contributor

@vraja-pro vraja-pro left a comment

Choose a reason for hiding this comment

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

CR & AC ✅

@vraja-pro vraja-pro merged commit 7af5ceb into feature/task-list Nov 20, 2025
27 checks passed
@vraja-pro vraja-pro deleted the 858-backend-include-the-endpoints-in-the-script-data branch November 20, 2025 09:31
@leonidasmi leonidasmi modified the milestones: feature/task-list, 26.6 Dec 1, 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.

3 participants