Commit 025161a
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]>1 parent 0365248 commit 025161a
1 file changed
+37
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
52 | 77 | | |
53 | 78 | | |
54 | 79 | | |
| |||
101 | 126 | | |
102 | 127 | | |
103 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
104 | 141 | | |
105 | 142 | | |
106 | 143 | | |
| |||
0 commit comments