-
Notifications
You must be signed in to change notification settings - Fork 882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
21318 refactor seo data provision to script data #21339
21318 refactor seo data provision to script data #21339
Conversation
…-data # Conflicts: # composer.json
Pull Request Test Coverage Report for Build 6ebbfba6f3acb97e17911989012bcf63226e2de5Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR 🏗️
Looking nice! 🥳
Mostly naming questions and then some PHPStorm type declaration stuff
Missing test coverage though? Tests that you added also don't cover the constructors
/** | ||
* The term. | ||
* | ||
* @param WP_Post $post The post. | ||
* | ||
* @return void | ||
*/ | ||
public function set_post( WP_Post $post ) { | ||
$this->post = $post; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering why you would cache the post/term like this inside the repository.
Wouldn't it be nicer to just pass it to the get_seo_data
method?
} | ||
|
||
/** | ||
* The term. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* The term. | |
* The post. |
tests/Unit/Editors/Framework/Seo/Posts/Keywords_Data_Provider_Test.php
Outdated
Show resolved
Hide resolved
'isInsightsEnabled' => $this->is_insights_enabled(), | ||
]; | ||
|
||
$values = ( $values_to_set + $values ); | ||
$values = ( $repo->get_seo_data() + $values ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we write like this?:
$values = ( $values_to_set + $values + $repo->get_seo_data() );
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can, but I am kinda afraid to do so since it kind of seems confusing to me
… into 21318-refactor-seo-data-provision-to-script-data # Conflicts: # composer.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR && AC ✅
Context
Summary
This PR can be summarized in the following changelog entry:
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:
Do the following for both posts and terms.
Keyword usage:
the keyphrase
to it. Note down the post id.the keyphrase
to it aswell.wpseoScriptData.metabox.keyword_usage
Make sure the first post is there. Also addwpseoScriptData.metabox.keyword_usage_post_types
and make sure it says your keyphrase and your post type in there (Note: for terms it is always an empty array[]
).Meta description:
wpseoScriptData.metabox.metadesc_template
make sure the value is the same as your meta description.wpseoScriptData.metabox.metaDescriptionDate
and make sure it is either the current date or the date your post got changed the last time.wpseoScriptData.metabox.metadesc_template
changes accordingly.wpseoScriptData.metabox.metaDescriptionDate
is updated to the current date.Meta title:
wpseoScriptData.metabox.title_template
make sure the value is the same as your meta title. With the replacement variables unparsed.wpseoScriptData.metabox.title_template_no_fallback
and make sure it is the same.wpseoScriptData.metabox.title_template_no_fallback
is empty now.equals the hardcoded fallback:
%%title%% %%page%% %%sep%% %%sitename%%`.Social:
First content image:
Term
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:
UI changes
Other environments
[shopify-seo]
, added test instructions for Shopify and attached theShopify
label to this PR.Documentation
Quality assurance
Innovation
innovation
label.Fixes #