docs icon indicating copy to clipboard operation
docs copied to clipboard

Add Lazy Loading for Homepage Images and Check script

Open shivamgupta2020 opened this issue 1 year ago • 8 comments

Fixes #5981

Proposed Changes

  • added lazy load in homepage images

shivamgupta2020 avatar May 28 '24 23:05 shivamgupta2020

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: shivamgupta2020 Once this PR has been reviewed and has the lgtm label, please assign dsimansk for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

knative-prow[bot] avatar May 28 '24 23:05 knative-prow[bot]

Deploy Preview for knative ready!

Built without sensitive environment variables

Name Link
Latest commit 34b7d52bc9de7edb86dc16482a260403e145b337
Latest deploy log https://app.netlify.com/sites/knative/deploys/6668bf5c7f3a05000946eb2f
Deploy Preview https://deploy-preview-5998--knative.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar May 28 '24 23:05 netlify[bot]

@shivamgupta2020

The check script should do these:

  • Build the website
  • Parse HTML pages that are built
  • Check for img tags without lazy
  • Report the locations (file, line number) of the tags w/o lazy attribute in the script logs (stdout)
  • Fail (by exiting with a code that's not zero)

This script should be running in a Github action.

I would recommend this approach:

  1. Write that script (can be a Python script)
  2. Include it in the PR, with documentation and dependencies (requirements.txt that can be used by pip)
  3. Get feedback, make sure it works
  4. Then create a GitHub action that runs the script

aliok avatar May 29 '24 09:05 aliok

Thanks, @aliok , for the suggestions. I’m currently working on the script part and will include all your suggestions in a new commit as soon as possible.

shivamgupta2020 avatar May 29 '24 10:05 shivamgupta2020

@shivamgupta2020

The check script should do these:

  • Build the website
  • Parse HTML pages that are built
  • Check for img tags without lazy
  • Report the locations (file, line number) of the tags w/o lazy attribute in the script logs (stdout)
  • Fail (by exiting with a code that's not zero)

This script should be running in a Github action.

I would recommend this approach:

  1. Write that script (can be a Python script)
  2. Include it in the PR, with documentation and dependencies (requirements.txt that can be used by pip)
  3. Get feedback, make sure it works
  4. Then create a GitHub action that runs the script

Should the script also run for v1.13, v1.12, and the development folder present in the "site" folder?

shivamgupta2020 avatar May 31 '24 05:05 shivamgupta2020

I've created the workflow file as @aliok suggested. Currently, most of the images on the website are not lazy-loaded, resulting in many errors. Could you please check the script output on your local machine to verify it's working as expected? Also, please review the workflow code to ensure it's implemented correctly. Thank you!

shivamgupta2020 avatar Jun 11 '24 21:06 shivamgupta2020

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

knative-prow-robot avatar Jul 13 '24 06:07 knative-prow-robot

This Pull Request is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen with /reopen. Mark as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Oct 12 '24 01:10 github-actions[bot]