Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Comment Likes: do not load on AMP views (#14840)
* Prevent noticons from being enqueued in AMP mode Summary: This patch disables enqueuing of assets for some non-functional features when in AMP mode. Noticons is a very large CSS asset, and so it prevents a lot of other CSS from being enqueued. A review of the places we use it showed that it was not actually being used by any functionality that works in AMP mode. Affected features: - Comment Likes (non-functional in AMP) - Geo Location (not used on most pages - might be useful to port `wpcom_vip_load_geolocation_styles_only_when_needed()` to all sites) - Notifications UI (non-functional in AMP) - admin-bar - (non-functional in AMP) Test Plan: Load a page in Transitional mode Ensure that noticons-css is not enqueued, and that little or no CSS is blocked by AMP due to being over the 50kb max [x] - ensure that features whose CSS is not being enqueued are not actually used Reviewers: josephscott, #devops_team, davidbinovec, goldsounds Subscribers: davidbinovec Tags: #touches_jetpack_files Differential Revision: D38340-code This commit syncs r203534-wpcom. * AMP: fix linting issues introduced in D38340 Summary: The file is synced with Jetpack, and D38340 cannot be merged into Jetpack as is as it introduces changes that will not pass our pre-commit hook. This diff fixes all PHPCS warnings. Test Plan: * Not much to test here, this only impacts documentation / comments. Reviewers: goldsounds Tags: #touches_jetpack_files Differential Revision: D39590 This commit syncs r r203555-wpcom. Co-authored-by: Daniel Walmsley <[email protected]>
- Loading branch information