Skip to content

Preview Async Images #70

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Preview Async Images #70

wants to merge 5 commits into from

Conversation

zachseidner1
Copy link
Collaborator

@zachseidner1 zachseidner1 commented Apr 10, 2025

Note: This PR was made for The Art of @Preview tech talk

Overview

Adds a preview for the ProfileHeader component by creating ResellAsyncImage, a wrapper around AsyncImage that allows the developer to pass in a previewImageResource to specify what the image should show in previews.

Changes Made

  • Adds preview to ProfileHeader
  • Use @PreviewParameter to make ResellTextButton previews more concise

Test Coverage

  • All previews show

Next Steps

  • Get rid of usages of AsyncImage and migrate to ResellAsyncImage
  • Add the previewImageResource parameter to AnimatedClampedAsyncImage and use similar logic to allow this component to work in previews.

Screenshots

image

@zachseidner1 zachseidner1 changed the title Zach/async image preview Preview Async Images Apr 10, 2025
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.

1 participant