Skip to content

Reverts code that did not solve a highlighting issue with NBSP characters#22171

Merged
FAMarfuaty merged 1 commit intorelease/24.9from
revert/nbsp-highlighting
Apr 7, 2025
Merged

Reverts code that did not solve a highlighting issue with NBSP characters#22171
FAMarfuaty merged 1 commit intorelease/24.9from
revert/nbsp-highlighting

Conversation

@mhkuu
Copy link
Copy Markdown
Contributor

@mhkuu mhkuu commented Apr 4, 2025

Context

  • Parts of Converts the sentence beginnings assessment to use the HTML parser #21974 intended to solve an issue with the highlighting in case there were NBSP characters present. However, without Premium active, this turned out to be a regression. Therefore, in this PR, we want to revert that part of the PR. We also add one unit test to confirm the current behaviour works.

Summary

This PR can be summarized in the following changelog entry:

  • Reverts code that did not solve a highlighting issue with NBSP characters in the Gutenberg editor.

Relevant technical choices:

  • We here revert commits to packages/js/src/decorator/helpers/positionBasedAnnotationHelper.js and packages/js/tests/decorator/helpers/positionBasedAnnotationHelper.test.js.
  • The reason that the previous PR passed acceptance is that in Premium, we use the yoast.analysis.data filter to replace NBSP characters (see also https://github.com/Yoast/wordpress-seo-premium/pull/4606). With only Free active, we don't do that, and the previous changes did not fix that.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

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:

  • Highlighting in the block editor, but it's a revert to the previous situation.

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/plugins-automated-testing/issues/2226

@mhkuu mhkuu added innovation Innovative issue. Relating to performance, memory or data-flow. changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog labels Apr 4, 2025
@mhkuu mhkuu marked this pull request as ready for review April 7, 2025 07:31
@mhkuu
Copy link
Copy Markdown
Contributor Author

mhkuu commented Apr 7, 2025

@mykola confirmed this solution works 😄

@mhkuu mhkuu added this to the 24.9 milestone Apr 7, 2025
@FAMarfuaty FAMarfuaty merged commit 0bd6c28 into release/24.9 Apr 7, 2025
24 checks passed
@FAMarfuaty FAMarfuaty deleted the revert/nbsp-highlighting branch April 7, 2025 09:20
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 innovation Innovative issue. Relating to performance, memory or data-flow.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants