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

feat: add option for generic lazy-loading placeholder color #645

Merged
merged 2 commits into from
Aug 23, 2023

Conversation

abaicus
Copy link
Contributor

@abaicus abaicus commented Aug 22, 2023

All Submissions:

Changes proposed in this Pull Request:

  • Adds setting for generic lazyload placeholder color;
Screenshots

image

image

Closes #624.

How to test the changes in this Pull Request:

  1. Turn on Enable generic lazyload placeholder under Settings > Lazyload;
  2. The button for the placeholder color should appear under the setting, allowing you to select a color;
  3. This color will be empty by default - the placeholder being transparent;
  4. Create a page containing images - you can also lower the Exclude the first X images from lazyload to 0 so all images on the page get lazyloaded (this is not going to work with DAM images as they are not lazyloaded yet);
  5. You can enable network throttling under the browser inspector settings (Slow 3G) should be enough, so you have time to see the placeholders;
  6. The placeholder for the lazyloaded images should have the color you select in the color picker;
How the placeholders should look:

image

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

…eat/placeholder-color

� Conflicts:
�	inc/settings.php
@pirate-bot
Copy link
Collaborator

Plugin build for 227f6e7 is ready 🛎️!

@irinelenache
Copy link

@abaicus Nice work 🚀 Tested and found a single thing, don't know if it's an issue or it's expected:

  • If i'm using a slower network (slow 3G), refresh the page and wait for the entire page to load without scrolling, the placeholders will turn from blurry to straight color and then to the actual image. Here is a video with the behaviour https://vertis.d.pr/v/PQeeYF

@abaicus
Copy link
Contributor Author

abaicus commented Aug 23, 2023

@irinelenache yes, this would be expected. That's how it used to work with generic placeholder before as well.

@irinelenache
Copy link

@abaicus Thanks for letting me know, i'll move this to Ready to merge as there are no other issues ✔️

@abaicus abaicus merged commit 8e0a11a into next Aug 23, 2023
8 checks passed
@abaicus abaicus deleted the feat/placeholder-color branch August 23, 2023 13:49
@pirate-bot
Copy link
Collaborator

🎉 This PR is included in version 3.10.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants