Fix discrepancy of the progress bar of the meta description inside content planner modal and inside yoast metabox#23188
Conversation
Coverage Report for CI Build 475796Coverage decreased (-0.003%) to 53.475%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
This PR aims to make the meta description progress bar behavior consistent between the AI Content Planner modal and the Yoast snippet editor/metabox by centralizing progress color logic and reusing the existing getDescriptionProgress scoring (locale/date/cornerstone-aware).
Changes:
- Adds and exports a shared
getProgressColor(score)helper from@yoast/search-metadata-previewsand updates Snippet Editor fields to use it. - Updates the Content Outline modal’s meta description progress bar to use
getDescriptionProgress(...)+ the sharedgetProgressColor(...), and changes the bar height (8px → 6px). - Updates/extends AI Content Planner modal tests to cover the new progress bar behavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/search-metadata-previews/src/snippet-editor/SnippetEditorFields.js | Switches progress bar color selection to the shared helper. |
| packages/search-metadata-previews/src/index.js | Exposes getProgressColor as a public helper export. |
| packages/search-metadata-previews/src/helpers/progress.js | Implements getProgressColor(score) using style-guide colors. |
| packages/js/src/ai-content-planner/components/content-outline-modal.js | Uses getDescriptionProgress/getProgressColor for the meta description bar and updates bar height. |
| packages/js/src/ai-content-planner/containers/content-outline-modal.js | Passes date, locale, and a cornerstone-related flag from the editor store into the modal. |
| packages/js/src/ai-content-planner/helpers/get-progress-color.js | Removes the now-obsolete local progress color helper. |
| packages/js/tests/ai-content-planner/components/feature-modal.test.js | Mocks the new @yoast/search-metadata-previews helper usage for tests. |
| packages/js/tests/ai-content-planner/components/content-outline-modal.test.js | Adds coverage for the meta description progress bar behavior and helper calls. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ecfa95e to
70fc5e9
Compare
|
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. |
…65-fix-discrepancy-of-the-progress-bar-of-the-meta-description-inside-content-planner-modal-and-inside-yoast-metabox
|
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. |
…65-fix-discrepancy-of-the-progress-bar-of-the-meta-description-inside-content-planner-modal-and-inside-yoast-metabox
Context
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
getProgressColorimplementation and an unused method from"@yoast/search-metadata-previews"packageTest instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
Non-cornerstone content, English
Cornerstone content, English
Non-cornerstone content, Japanese
Test progress bar height
Relevant test scenarios
Test instructions for QA when the code is in the RC
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:
Other environments
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.[yoast-doc-extension], added test instructions for Yoast SEO for Google Docs and attached theGoogle Docs Add-onlabel to this PR.Documentation
Quality assurance
grunt build:imagesand commited the results, if my PR introduces new images or SVGs.Innovation
innovationlabel.Fixes https://github.com/Yoast/reserved-tasks/issues/1165