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

Implement react-visual #30

Closed
13 of 14 tasks
weotch opened this issue Oct 25, 2023 · 0 comments · Fixed by #31
Closed
13 of 14 tasks

Implement react-visual #30

weotch opened this issue Oct 25, 2023 · 0 comments · Fixed by #31

Comments

@weotch
Copy link
Member

weotch commented Oct 25, 2023

  • Basic image rendering
    • What should the image component be named? SomethingImage... maybe AutoSrcSetImage or PictureImage
  • Wrap image in picture by default and add srcset to a source rather than on the img
    • Implement srcset
    • Match the default srcset widths of nextjs ... I don't think I need to make this an explicit prop even though it could be nice in tests
  • Add mimeTypes prop that will get passed to imgLoader for rendering source tags targeting different mime types (like by Contentful)
  • Add responsive image props that generate additional sources as well
  • Support image fit and position
  • Support priority
  • Support placeholderData
    • Not that I can generate from Contentful at the moment. Maybe I use https://plaiceholder.co/docs?
    • Maybe this shouldn't be the concern of this component? Or it has as different prop for rendering just a flat color value?
  • Support imageLoader prop which generates the srcset when provided.
    • Use next/image default sizes
    • This loops through the various mimeTypes and responsive asset types to generate all combinations of each with the same srcset values but different CDN rules for the mime format and source asset
  • Update docs that mention no react-visual component
  • DRY up the custom Cypress commands #27
    • DRY up testing of stuff that is the concern of the VisualWrapper, like all the expanding / fixed size stuff, into it's own test file
@weotch weotch changed the title Fully implement react-visual Implement react-visual Oct 25, 2023
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 a pull request may close this issue.

1 participant