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

✨ Support loading lazy attribute #1265

Merged
merged 4 commits into from
Jun 2, 2023
Merged

Conversation

ninadbstack
Copy link
Contributor

Context:

  • We currently did not drop loading="lazy" attribute while serialising dom
  • We do not scroll in discovery phase

Issue:

  • We do not capture resources, especially img src where loading="lazy" attr is present and image is out of viewport
  • So when we render it on percy, the full page screenshot shows broken images [ for out of first viewport images ]

Fix:

  • We now drop loading attribute for img and iframe element

@ninadbstack ninadbstack force-pushed the support-loading-lazy-attribute branch from 06e68a6 to e27d45b Compare May 22, 2023 14:26
@ninadbstack ninadbstack force-pushed the support-loading-lazy-attribute branch from be3e067 to 86def86 Compare May 23, 2023 08:58
@ninadbstack ninadbstack force-pushed the support-loading-lazy-attribute branch from 86def86 to 261d51d Compare May 23, 2023 10:00
@ninadbstack ninadbstack added the ✨ enhancement New feature or request label May 23, 2023
@ninadbstack ninadbstack changed the title Support loading lazy attribute ✨ Support loading lazy attribute May 23, 2023
Copy link
Contributor

@samarsault samarsault left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@itsjwala itsjwala merged commit 77fc43b into master Jun 2, 2023
30 of 32 checks passed
@itsjwala itsjwala deleted the support-loading-lazy-attribute branch June 2, 2023 08:04
shahidk8 pushed a commit that referenced this pull request Jun 29, 2023
* Drop loading attr to fix resource discovery imgs

* Renamed maybeTranformElement

* Added tests to transform-dom.test.js

* Added shadow dom tests
samarsault pushed a commit that referenced this pull request Jun 29, 2023
* Drop loading attr to fix resource discovery imgs

* Renamed maybeTranformElement

* Added tests to transform-dom.test.js

* Added shadow dom tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants