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

3rd party tools: update the way the files are required #12026

Merged
merged 2 commits into from
Apr 15, 2019

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented Apr 11, 2019

Changes proposed in this Pull Request:

This change:

  • makes it easier to add new files to that list in the future.
  • allows us to sync that file with WordPress.com. On WordPress.com, since some of the compat files do not exist, they just won't be required.
  • orders the list alphabetically
  • fixes all phpcs warnings

Syncing that file with WordPress.com will be useful from now on since we now have more and more AMP functions (provided by one of the third-party compat files on our list) across different synced files in the plugin.

Related: D26814-code

Testing instructions:

  • Install the AMP plugin
  • Add sharing buttons to your site.
  • Load a page from your site in an AMP view (add amp to the URL)
  • Make sure the sharing buttons have the custom AMP style and markup, thus confirming that the compat files are loaded.

Proposed changelog entry for your changes:

  • None

jeherve added 2 commits April 11, 2019 19:11
This change:

- makes it easier to add new files to that list in the future.
- allows us to sync that file with WordPress.com. On WordPress.com, since some of the compat files do not exist, they just won't be required.
- orders the list alphabetically
- fixes all phpcs warnings
@jeherve jeherve added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. [Type] Janitorial [Pri] Normal labels Apr 11, 2019
@jeherve jeherve added this to the 7.3 milestone Apr 11, 2019
@jeherve jeherve requested a review from a team April 11, 2019 17:18
@jeherve jeherve self-assigned this Apr 11, 2019
@jetpackbot
Copy link

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Scheduled Jetpack release: April 29, 2019.
Scheduled code freeze: April 22, 2019

Generated by 🚫 dangerJS against 3e95dcc

@kraftbj kraftbj added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Apr 12, 2019
@jeherve jeherve merged commit 08a66d7 into master Apr 15, 2019
@jeherve jeherve deleted the update/3rd-party-loading branch April 15, 2019 09:51
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Apr 15, 2019
jeherve added a commit that referenced this pull request Apr 24, 2019
Summary:
After adding the AMP compat file that ships with Jetpack (this was done in D22313, D26814, D26819, D26921, and D26928), let's start using this class.

This replaces D22154 and D23501, and allows us to start syncing any future changes that would rely on the Jetpack_AMP_Support class.

Related Jetpack PRs:
- #10945
- #11195, which reverted some of the changes in the PR above.
- #12054
- #12053
- #12026

Discussion:
- https://[private link]

We'll need to test for issues like the ones that popped up on Jetpack at the time:
#11169

We will also need to account for the fact that WordPress.com does not run the latest version of the AMP plugin. It runs an old version (0.6.2 vs. the current version on W.org 1.0.2), with its own version of some of the compatibility fixes that come with the class we've added (see [[ https://[private link].php | here ]]) and needs to be updated as per the discussions here:
- https://[private link] (D14521)
- https://[private link]

Test Plan:
* Create a post with a gallery
* Add a Facebook sharing button to that post.
* Try Liking that post.
* Comment on one of the images in the gallery.
* Load the post in an AMP view, and repeat the steps below.

In all cases:
- You should not see any js errors in the browser console.
- You should not get any PHP notices in your debug log.

Reviewers: zinigor

Tags: #touches_jetpack_files

Differential Revision: D26821-code

This commit syncs r190790-wpcom.
jeherve added a commit that referenced this pull request Apr 24, 2019
Summary:
After adding the AMP compat file that ships with Jetpack (this was done in D22313, D26814, D26819, D26921, and D26928), let's start using this class.

This replaces D22154 and D23501, and allows us to start syncing any future changes that would rely on the Jetpack_AMP_Support class.

Related Jetpack PRs:
- #10945
- #11195, which reverted some of the changes in the PR above.
- #12054
- #12053
- #12026

Discussion:
- https://[private link]

We'll need to test for issues like the ones that popped up on Jetpack at the time:
#11169

We will also need to account for the fact that WordPress.com does not run the latest version of the AMP plugin. It runs an old version (0.6.2 vs. the current version on W.org 1.0.2), with its own version of some of the compatibility fixes that come with the class we've added (see [[ https://[private link].php | here ]]) and needs to be updated as per the discussions here:
- https://[private link] (D14521)
- https://[private link]

Test Plan:
* Create a post with a gallery
* Add a Facebook sharing button to that post.
* Try Liking that post.
* Comment on one of the images in the gallery.
* Load the post in an AMP view, and repeat the steps below.

In all cases:
- You should not see any js errors in the browser console.
- You should not get any PHP notices in your debug log.

Reviewers: zinigor

Tags: #touches_jetpack_files

Differential Revision: D26821-code

This commit syncs r190790-wpcom.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants