Skip to content

Conversation

Soare-Robert-Daniel
Copy link
Contributor

@Soare-Robert-Daniel Soare-Robert-Daniel commented Sep 17, 2025

All Submissions:

Changes proposed in this Pull Request:

Reorganize the lazy load and scaling settings:

Current status

CleanShot 2025-09-17 at 18 07 23@2x

Closes https://github.com/Codeinwp/optimole-service/issues/1559

How to test the changes in this Pull Request:

  1. Check if the changed settings are still working

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?

@Soare-Robert-Daniel
Copy link
Contributor Author

Soare-Robert-Daniel commented Sep 22, 2025

@selul @ineagu, here is how it looks for the Formbricks survey integration with the modal notice when a user tries to disable an important lazy load option.

Issue Reference: https://github.com/Codeinwp/optimole-service/issues/1551
Development Mode Survey: https://app.formbricks.com/environments/clo8wxwy044olpm0gn83ihta6/surveys/cmfv2kgzt0o2lvq019y7vh9y4/responses?referer=true

2025-09-22_15-38-15.mp4

@ineagu
Copy link
Contributor

ineagu commented Sep 22, 2025

@Soare-Robert-Daniel can't we embed somehow the survey in the popup? if not it's fine

  1. The Keep enabled button, should be " keep enabled and get help" which would open in a new tab : https://optimole.com/contact/, prefilled with user site + subject : [Lazy load issue] which "lazy load" is the setting he is trying to disable.

What do you think?


// // If the image is between the first images we add the fetchpriority attribute to improve the LCP.
if (
$this->settings->is_lazyload_type_fixed() &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should call this if viewport is enabled + optimization is not done for the current url || viewport is disabled.

@Soare-Robert-Daniel
Copy link
Contributor Author

@Soare-Robert-Daniel can't we embed somehow the survey in the popup? if not it's fine

I tried to use the embedded form of Formbricks, but it's pretty wacky. I do not recommend.

CleanShot 2025-09-22 at 17 19 40@2x
  1. The Keep enabled button, should be " keep enabled and get help" which would open in a new tab : https://optimole.com/contact/, prefilled with user site + subject : [Lazy load issue] which "lazy load" is the setting he is trying to disable.

I see Gravity Forms has a nice feature in which we can prefill with just the URL: https://docs.gravityforms.com/allow-field-to-be-populated-dynamically/

@ineagu
Copy link
Contributor

ineagu commented Sep 22, 2025

okay, we can keep it as you are doing now.

@Soare-Robert-Daniel
Copy link
Contributor Author

@ineagu, here are the interactions with the new changes (including the notice with prefilling)

2025-09-23_16-39-37.mp4

For the skip lazy load number input selector, I had to put it separately from the text since the embedding was creating a weird focus issue.

CleanShot 2025-09-23 at 16 42 01@2x

@Soare-Robert-Daniel Soare-Robert-Daniel marked this pull request as ready for review September 23, 2025 14:26
@pirate-bot
Copy link
Collaborator

pirate-bot commented Sep 23, 2025

Plugin build for 8c9de99 is ready 🛎️!

@rodica-andronache
Copy link

rodica-andronache commented Sep 24, 2025

  • from what I understand, Smart Image Scaling should be removed from the Resize panel, as right now it's duplicated, both in Resize and Lazyload
image image

@rodica-andronache
Copy link

rodica-andronache commented Sep 26, 2025

@Soare-Robert-Daniel

  • there are some small differences from the suggested texts
image image
  • on smaller screens, the notice looks like this, not sure if it's ok
image

@Soare-Robert-Daniel
Copy link
Contributor Author

  • there are some small differences from the suggested texts

Fixed

  • on smaller screens, the notice looks like this, not sure if it's ok

Yes. This is how the Gutenberg component behaves, which can also be verified in https://wordpress.github.io/gutenberg/?path=/docs/components-modal--docs, like in the screenshot below:

CleanShot 2025-09-30 at 17 25 13@2x

@Soare-Robert-Daniel
Copy link
Contributor Author

I added the Lear Mode link for https://github.com/Codeinwp/optimole-service/issues/1515 as part of the toggle description.

CleanShot 2025-10-01 at 15 32 24@2x

@rodica-andronache
Copy link

from what I've tested, it's working well

@selul selul merged commit a6ebbed into development Oct 1, 2025
11 checks passed
@selul selul deleted the refactor/lazy-scaling-ui branch October 1, 2025 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants