Merged
Conversation
The registration after is too soon, the new render is not there right away like before: * the constructor now uses the file scope for the initial value of the state The setState in registerComponent was using stale state: * use the callback function with current state instead of relying on this.state
We call the renderRoot multiple times. Splitting the creation from the render to fix the following warning: Warning: You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it.
8b308a9 to
fe0d899
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
createRoot.Summary
This PR can be summarized in the following changelog entry:
createRootinstead ofrender.Relevant technical choices:
I divided the commits into 2: our own pages and the helpers that are used elsewhere too.
The latter did not work without fixing the state. Here is the commit message:
Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
define( 'SCRIPT_DEBUG', true );Do a smoke test on each page/location.
Here is a list following the touched code:
/wp-admin/admin.php?page=wpseo_page_academy/wp-admin/index.php/wp-admin/admin.php?page=wpseo_dashboard/wp-admin/admin.php?page=wpseo_toolsFREE webinar/Black Friday banners that can only be there when you don't have Premium_yoast_wpseo_introductionsdatabase row with your user ID in the user meta table/wp-admin/admin.php?page=wpseo_licenses/wp-admin/admin.php?page=wpseo_page_settings/wp-admin/admin.php?page=wpseo_page_supportNow for the roots commit, this is slightly more elaborate in what all is in there.
Specifically the thing that I had to fix here was the registration mechanism with which add-ons add things on top of Free.
Suggestion: check socials and/or other Premium content and upsells.
/wp-admin/admin.php?page=wpseo_integrations/wp-admin/admin.php?page=wpseo_workoutsRelevant 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:
UI changes
Other environments
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.Documentation
Quality assurance
Innovation
innovationlabel.Fixes https://github.com/Yoast/reserved-tasks/issues/649