Skip to content
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

ACF blocks support #243

Merged
merged 4 commits into from
Apr 30, 2020
Merged

ACF blocks support #243

merged 4 commits into from
Apr 30, 2020

Conversation

TimVevida
Copy link

@TimVevida TimVevida commented Mar 23, 2020

Summary

Proof of concept that ACF block previews can be passed to Yoast SEO.

This PR can be summarized in the following changelog entry:

  • Add support for ACF blocks. Props to TimVevida.

Relevant technical choices:

  • Passes the complete block preview to Yoast SEO.
    This means that in selected mode (when the preview is visible and the edit fields are visible in the sidebar), the content is passed twice to Yoast SEO. This needs a solution.

Test instructions

This PR can be tested by following these steps:

  • Create a custom Gutenberg block using ACF (See ACF blocks)
  • Add the custom block to a post
  • Check that content is being passed to Yoast SEO by watching the debug info or the changing Yoast recommendations.

Fixes #241

Tim Havinga added 2 commits March 26, 2020 12:32
Searches for custom fields in the metaboxes and post content, but not in
the rest of the sidebar. This would generate duplicate results when an
ACF block was selected and the preview as well as the fields in the
sidebar would be passed to Yoast.
Searching for ACF blocks is now performed using the WP block API,
passing more correct information to the analyzer.
@TimVevida
Copy link
Author

the content is passed twice to Yoast SEO.

This is fixed with commit 1e1a2df

The Travis CI is now failing because there are too many warnings, not something I should fix in this pull request IMHO.

Due to the Corona virus, I am bound to a Windows PC and could not perform the tests locally.

@TimVevida TimVevida changed the title wip: ACF blocks support ACF blocks support Mar 26, 2020
@TimVevida
Copy link
Author

@jrfnl Seems like you are the most frequent committer here, want to take a look at this PR?

@jrfnl
Copy link
Contributor

jrfnl commented Mar 26, 2020

Hi @TimVevida Thanks for this PR. I'm not the best person to review this, but I've checked and someone else will take a look at this PR in the near future.

Regarding the warnings you see in the CI: it's true that you don't need to fix (pre-)existing issues and shouldn't in this PR, but I would like to ask you to double-check that the code affected by this PR doesn't introduce any new issues. If it does, those would need to be fixed before the PR can get merged.

Includes changes in build of yoast-acf-analysis.js for commit 48ee009.
@TimVevida
Copy link
Author

I have fixed some lint issues related to this PR and the build now passes.

@jrfnl
Copy link
Contributor

jrfnl commented Mar 27, 2020

@TimVevida Excellent! Thank you.

@DB-Alex
Copy link

DB-Alex commented Apr 22, 2020

@jrfnl is there any timeframe when this will be merged?

And will it also work in Yoast Premium plugin?

@IreneStr
Copy link
Contributor

@TimVevida Thank you for your PR. My apologies for not having someone looking at it sooner. I'll make sure one of our devs will look at your PR this week. There is no need to make additional changes to make it work with Premium as well (as far as I can see).

@DB-Alex
Copy link

DB-Alex commented Apr 28, 2020

@IreneStr Thats great news!

@JesserH JesserH self-assigned this Apr 30, 2020
@JesserH JesserH added this to the 2.4.0 milestone Apr 30, 2020
@JesserH
Copy link
Contributor

JesserH commented Apr 30, 2020

CR and Acceptance ☑️ :)

@JesserH JesserH merged commit e957aee into Yoast:develop Apr 30, 2020
@andizer andizer added the changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog label May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog community-patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The plugin is not compatible with ACF gutenberg blocks
7 participants