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

DSD-1630: Adding and passing down isLazy from Card to its Image component #1462

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

EdwinGuzman
Copy link
Member

@EdwinGuzman EdwinGuzman commented Nov 16, 2023

Fixes JIRA ticket DSD-1630

This PR does the following:

  • Adds and passes down the isLazy image prop from the Card component down to its own Image component. This way, an image-heavy page that uses the Card to render images can lazy load images.
  • @7emansell this should be turned on in DC homepage once this update is released. It may help render the page faster.

How has this been tested?

Locally and in Storybook. To test, open up the "Network" tab in chrome's console, load the page, and scroll down to see images fetched as you scroll.

Accessibility concerns or updates

  • N/A

Checklist:

  • I have updated the Storybook documentation accordingly.
  • I have added relevant accessibility documentation for this pull request.
  • All new and existing tests passed.

Front End Review:

  • Review the Vercel preview deployment once it is ready.

@EdwinGuzman EdwinGuzman added the Needs Review Pull requests that are ready for peer review. label Nov 16, 2023
Copy link

vercel bot commented Nov 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nypl-design-system ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 27, 2023 9:58pm

Copy link
Collaborator

@bigfishdesign13 bigfishdesign13 left a comment

Choose a reason for hiding this comment

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

Code looks good and the images are now lazy loading on the Card story page.

@bigfishdesign13 bigfishdesign13 added Ship It Pull requests that have been reviewed and approved. and removed Needs Review Pull requests that are ready for peer review. labels Nov 27, 2023
Copy link
Collaborator

@7emansell 7emansell left a comment

Choose a reason for hiding this comment

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

Looks good to me!

* development:
  NYPL color design tokens in DC logo
  changelog for Text component
  updated font weight for subtitle styles
  Merges in development
  Updates per PR feedback
  More cleanup
  Cleans up theme file, updates changelog
  Adds hasVisitedState prop to Link and updates documentation
  Updates CHANGELOG
  Updates zIndex for searchbar select icon
@EdwinGuzman EdwinGuzman merged commit 599ac49 into development Nov 27, 2023
5 checks passed
@EdwinGuzman EdwinGuzman deleted the DSD-1630/card-image-props branch December 1, 2023 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ship It Pull requests that have been reviewed and approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants