-
Notifications
You must be signed in to change notification settings - Fork 798
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
gravatar-hovercards: Only load when gravatars are on the page #14922
gravatar-hovercards: Only load when gravatars are on the page #14922
Conversation
@kienstra Could you please review this PR? Thanks. |
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: April 7, 2020. |
Flyby thought - I'm trying to think of if there any situations with Infinite Scroll where the first load would have no gravatars, but the second load would. A theme with gravatars in the comments only? |
@kraftbj That's a good point. I've tested that scenario and I don't think the existing scripts take dynamically loaded markup into account either:
A quick scan of the JS sources also indicates the feature is only initialized once on top of the markup present on page at that point. I don't think this PR introduces a regression. |
Looks great! Hi @dero, The 'hovercard' still works fine when there is a gravatar on the page: And as expected, the Sorry for the delay. |
Hi @dero , I didn't manage to test the infinite scroll scenario to assure there is no regression. Twenty sixteen will only display gravatars on Do you have any tips on how to test it? Thanks |
Sure, @leogermani, I'd suggest two different ways:
<?php echo get_avatar( get_the_author_meta( 'ID' ) ); ?> It won't be pretty, but it will get the job done. |
Hi @dero, Thanks for the detailed instructions. I saw your comment only mentioning activating the Just confirmed the bug is already there before this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes work as expected.
I can confirm that the infinite scroll issue is not a regression and I've opened another issue to document this -> #15012
@leogermani Gotcha. I think I just forgot that I've updated the theme to be able to test in the first place. Thanks for the review and testing here! |
* Initial changelog entry * Changelog: add #14904 * Changelog: add #14910 * Changelog: add #14913 * Changelog: add #14916 * Changelog: add #14922 * Changelog: add #14924 * Changelog: add #14925 * Changelog: add #14928 * Changelog: add #14840 * Changelog: add #14841 * Changelog: add #14842 * Changelog: add #14826 * Changelog: add #14835 * Changelog: add #14859 * Changelog: add #14884 * Changelog: add #14888 * Changelog: add #14817 * Changelog: add #14814 * Changelog: add #14819 * Changelog;: add #14797 * Changelog: add #14798 * Changelog: add #14802 * Changelog: add #13676 * Changelog: add #13744 * Changelog: add #13777 * Changelog: add #14446 * Changelog: add #14739 * Changelog: add #14770 * Changelog: add #14784 * Changelog: add #14897 * Changelog: add #14898 * Changelog: add #14968 * Changelog: add #14985 * Changelog: add #15044 * Changelog: add #15052 * Update to remove Podcast since it remains in Beta * Changelog: add #14803 * Changelog: add #15028 * Changelog: add #15065 * Changelog:add #14886 * Changelog: add #15118 * Changelog: add #14990 * Changelog: add #14528 * Changelog: add #15120 * Changelog: add #15126 * Changelog: add #15049 * Chanegelog: add #14852 * Changelog: add #15090 * Changelog: add #15138 * Changelog: add #15124 * Changelog:add #15055 * Changelog: add #15017 * Changelog: add #15109 * Changelog: add #15145 * Changelog:add #15096 * Changelog:add #15153 * Changelog: add #15133 * Changelog: add #14960 * Changelog: add #15127 * Changelog: add #15056 * Copy current changelog to changelog archive. * Clarify changelog description
Fixes #14860
Changes proposed in this Pull Request:
Is this a new feature or does it add/remove features to an existing part of Jetpack?
gravatar-hovercards
module.Testing instructions:
twentysixteen
.https://secure.gravatar.com/js/gprofiles.js
andwpgroho.js
assets are loaded.page
post type) and observe no gravatars on the page.https://secure.gravatar.com/js/gprofiles.js
andwpgroho.js
assets are NOT loaded.Proposed changelog entry for your changes: