Skip to content

Add Customizer support to Infinite Scroll#3542

Merged
zinigor merged 4 commits intoAutomattic:masterfrom
xwp:feature/customize-infinite-scroll
Mar 22, 2016
Merged

Add Customizer support to Infinite Scroll#3542
zinigor merged 4 commits intoAutomattic:masterfrom
xwp:feature/customize-infinite-scroll

Conversation

@westonruter
Copy link
Copy Markdown
Contributor

  • Fix sending back infinite scroll responses to be proper JSON.
  • When infinite scroll Ajax request happens in Customizer preview, include Customizer state so that any previewed changes will apply in the response.
  • Add support for Selective Refresh in WP 4.5, ensuring that dynamically-constructed elements (e.g. ME.js audio/video elements) get constructed in any refreshed partials by leveraging the existing post-load event. This includes some code from the Customize Partial Refresh feature plugin which was not included in the core merge (since it was specific for Jetpack): https://github.com/xwp/wp-customize-partial-refresh/blob/master/js/plugin-support/jetpack.js#L178-L227

@kraftbj kraftbj added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Infinite Scroll labels Mar 13, 2016
@kraftbj kraftbj added this to the 3.10 milestone Mar 13, 2016
@eliorivero
Copy link
Copy Markdown
Contributor

Hi @westonruter, thanks for the PR! I'm getting this error in JS console:

Uncaught SyntaxError: Unexpected token o
n.parseJSON @ jquery.js?ver=1.12.1:4
a.parseJSON @ infinity.js?ver=20141016:240

pointing this line

response = $.parseJSON( response );

and posts aren't loaded.

I tried reverting the changes to infinity.php in 473f1c9 and it worked.

FWIW, I tested this in TwentySixteen with no other plugins enabled. I didn't actually got to customize it, this happened right when I loaded customizer and started scrolling down. One of the posts loaded by IS had a few embedded Vimeo videos and another one had a couple of embedded gists.

@jeherve jeherve added [Status] Needs Review This PR is ready for review. [Team] tdiv labels Mar 14, 2016
@eliorivero eliorivero added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Mar 14, 2016
@westonruter
Copy link
Copy Markdown
Contributor Author

Hi @eliorivero. I'm trying to reproduce the issue but I'm not seeing it. I'm also testing in Twenty Sixteen, and I checked with all other plugins deactivated and in both 4.4 and 4.5-beta3.

You say the error is coming from:

response = $.parseJSON( response );

Note, however, that this line was removed in the PR. I think you might need to clear your cache. I also just bumped the version number in a87768e which should also eliminate this issue.

@eliorivero eliorivero removed the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Mar 14, 2016
@eliorivero
Copy link
Copy Markdown
Contributor

Sorry, my bad! I overlooked that I had unchecked Disable Cache in Dev Tools. It's working fine 👍

Tested JSON response, customizer state injection sending customized settings and partial render with reinitialization of dynamic js-based elements like different embeds and slideshow shortcode. It all looks good 💯

@eliorivero eliorivero added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Mar 14, 2016
@kraftbj kraftbj modified the milestones: 3.9.5, 3.10 Mar 18, 2016
zinigor added a commit that referenced this pull request Mar 22, 2016
Add Customizer support to Infinite Scroll
@zinigor zinigor merged commit e8a186b into Automattic:master Mar 22, 2016
@zinigor zinigor removed the [Status] Ready to Merge Go ahead, you can push that green button! label Mar 22, 2016
tbradsha added a commit that referenced this pull request Jul 3, 2025
…triggered too early. #3542 (#44109)

* new activation redirect and translation loading

* Changelog

* removing translation loading from class

* removing translation loading from class

* reapply core changes

* fix the bootstrap test

* manually defining the test again

* show wizard if activating mulitple plugins - for unit test testing

* wizard and tests

* improving activation tests

* firming up tests

* change test to allow for redirection

* more tests

* fixing the bulk activation test for wizard not shown

* fixing plugin name in activation test

* fixing plugin name in activation test

* making it so the jpcrm_database_engine does not rely on

* removing wait

* no wizard on upgrade

* upgrade test

* Skip feedback on bulk deactivation

* Reshuffle activation redirect logic

* some tidy

* more tidy

* tidy acceptance

* tidy acceptance with jetpack-crm slug

* Remove unneeded check

* Chop bulk activation wizard skip test

This won't fire regardless since the `jpcrm_wizard_completed` option is already set at this point.

Also, we now only skip the wizard if more than one plugin is activated via this method.

* Another try

* Fine, let's go with this

---------

Co-authored-by: tbradsha <32492176+tbradsha@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Infinite Scroll Touches WP.com Files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants