Reported and marked by Razem to revise and remove other unused CSS/JS

Remove unused JavaScript
Remove unused CSS
Defining a library
Code coverage at Google

Contributed by Razem to feed the Drupal pack for Lighthouse Stack Packs

lighthouse-stack-packs drupal.js

Problem/Motivation

Having a performance coverage issue of 100% not used CSS from the

Varbase Media common library

varbase_media.common.css

Varbase Media common logged in users library

varbase_media.common_logged

Varbase Varbase Media Blazy Blurry behaviour

varbase-media-blazy-blurry.theme.css

Varbase Media Varbase Video Player library

varbase-video-player.theme.css
and Java Scripts 

On pages which do not have any media entities

Steps to reproduce

Switch off CSS and JavaScript aggregation and advanced aggregations
Find Unused JavaScript And CSS With The Coverage Tab
Visit any basic or landing pages but not having any media items in the page
The page should not load any Media Styling or behaviors

Proposed resolution

  • Not to attache on all pages with page attachments
  • Not to use every_page: 1

After the fix
After the fix

Blog site section with mixed types of media entities

Blog site section with mixed types of media entities

Blog post - Image media

Blog post - Image media

Blog post - Local Video with cover image

Blog post - Local Video with cover image

Blog post - Remote Video - YouTube video - no cover image

Blog post - Remote Video - YouTube video - no cover image

Blog post - Remote Video - YouTube video - with cover image

Blog post - Remote Video - YouTube video - with cover image

Blog post - Remote Video - Vimeo video - with cover image

Blog post - Remote Video - Vimeo video - with cover image

Blog post - Remote Video - Vimeo video - no cover image

Blog post - Remote Video - Vimeo video - no cover image

Remaining tasks

  • Fix
  • Performance coverage test
  • Functional test
  • Review
  • Release

User interface changes

  • None

API changes

  • None

Data model changes

  • None

Comments

RajabNatshah created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

  • RajabNatshah committed 4626509 on 9.0.x
    Issue #3210204: Fix Varbase Media performance coverage for common or...
rajab natshah’s picture

Assigned: rajab natshah » mohammed j. razem
Status: Active » Needs review
Issue tags: +varbase-9.0.0-rc3, +varbase-9.0.0
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

Status: Needs review » Fixed

  • RajabNatshah committed 81daf10 on 8.x-7.x
    Issue #3210204: Fix Varbase Media performance coverage for common or...
rajab natshah’s picture

Title: Fix Varbase Media performance coverage for common or common logged in, or video player libraries on pages with no media items » Fix Varbase Media performance code coverage for common or common logged in, or video player libraries on pages with no media items
Issue summary: View changes
Issue tags: +code-coverage
rajab natshah’s picture

Issue tags: +code coverage

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

rajab natshah’s picture

Issue tags: -varbase-9.0.0-rc3