Automattic / Automattic/jetpack
Carousel resources and inline code should only be included where needed
Open
[Feature] Carousel
[Focus] Performance
[Pri] Normal
Enhancement
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
The inline code, stylesheet and scripts required for carousels are included on every page, resulting in PageSpeed issues like "unused JavaScript" and "unused CSS".
Unless the page contains a gallery, there's no need to include these.
Contributor guide
Research direction
Start by locating where carousel inline code, stylesheets, and scripts are enqueued, then trace how the page can be identified as containing a gallery. Verify that carousel resources are omitted on pages without galleries while remaining available on gallery pages, and check the resulting asset usage with the relevant PageSpeed check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript, php, wordpress
- Domain
- frontend, performance, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100