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

In Likes and Comment Likes modules, prevent blocking page load with 2 scripts #14841

Merged
merged 4 commits into from
Mar 5, 2020

Commits on Feb 28, 2020

  1. Prevent blocking page load with 2 scripts in Like module

    These both depend on jquery,
    so this could remove even another script
    from blocking rendering.
    kienstra committed Feb 28, 2020
    Configuration menu
    Copy the full SHA
    dfdc2c0 View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2020

  1. Don't enqueue script if the Likes module isn't visible

    As Dan raised,
    this should not enqueue this JS if this
    isn't in the document.
    kienstra committed Mar 3, 2020
    Configuration menu
    Copy the full SHA
    716e19d View commit details
    Browse the repository at this point in the history
  2. [not verified] Apply a similar change to the Comment Likes module

    Don't enqueue scripts if likes aren't enabled,
    and move the dependencies to the footer,
    as the script that depends on them,
    'jetpack_likes_queuehandler',
    is in the footer.
    It doesn't seem necessary for these to be above
    the footer.
    kienstra committed Mar 3, 2020
    Configuration menu
    Copy the full SHA
    196c776 View commit details
    Browse the repository at this point in the history
  3. Fix a unit test that asserted the opposite

    It should ensure that the styles are present,
    not that they aren't.
    kienstra committed Mar 3, 2020
    Configuration menu
    Copy the full SHA
    65471ed View commit details
    Browse the repository at this point in the history