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

Add README section about Compose preview comment #647

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

takahirom
Copy link
Member

Issue

  • close #ISSUE_NUMBER

Overview (Required)

  • Add Jetpack Compose preview in GitHub comments section to README 📸

Links

Screenshot

Before After

@takahirom
Copy link
Member Author

@eneim @sobaya-0141 Could you look over this PR?

@github-actions github-actions bot temporarily deployed to deploygate-distribution September 21, 2022 11:48 Inactive
README.md Outdated Show resolved Hide resolved
Co-authored-by: Nam Nguyen <[email protected]>
Comment on lines +281 to +286
For the DroidKaigi app, we have addressed several issues in addition to the existing Paparazzi + Showkase approach.

* Committing Preview images to the GitHub repository increases the GitHub repository size.
* When uploading preview images to the cloud, the images may not be viewable depending on their permissions.

In the DroidKaigi app, you can use GitHub Actions to save a golden snapshot of the main branch using GitHub Actions Artifacts, create a companion branch for the pull request, upload the preview image there, and commit the image to GitHub. Comment the URL of the image.
Copy link
Contributor

@eneim eneim Sep 21, 2022

Choose a reason for hiding this comment

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

If I understand correctly, you want to mention what we have tried to adding the images to the PR comments? If so, how about the following change:


There are different options we have considered to add the delta images to the pull-request comments, but each of them has some challenges:

  • Committing images to the main branch: this option increases the GitHub repository size unnecessarily. Once we resolve the preview issue, the delta images are no longer needed. // Review note: my understanding is that you want to explain why we don't want to store the delta screenshots in the repository permanently. So it should be about the main branch. But this is just my guess, please feel free to express your intent about this part.
  • Uploading images to the cloud: the snapshot may contains sensitive information that we should not upload them elsewhere. And also, the cost to maintain an additional image storage is not trivial. // Reviewer note: I think the images may not be viewable depending on their permissions is not a strong reason, because most of the cloud allows granular access control. But again, this change is just my guess from your texts, so feel free to change it your way.

In the DroidKaigi app, we use GitHub Actions to handle this effectively:

  • The golden snapshots are stored on the main branch using GitHub Actions Artifacts.
  • For the pull-request, we use GitHub Actions to create a companion branch and upload the delta images there. The image URLs are used to comment on the pull-request's branch.
  • Once the preview issues are resolved, we can delete the companion branch. (Currently this step is not automated).

Just a comment from my understanding, it may not reflect what you have in mind correctly, so feel free to discard it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me take a look at this 👀

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.

2 participants