-
Notifications
You must be signed in to change notification settings - Fork 189
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
base: main
Are you sure you want to change the base?
Conversation
@eneim @sobaya-0141 Could you look over this PR? |
Co-authored-by: Nam Nguyen <[email protected]>
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 👀
Issue
Overview (Required)
Jetpack Compose preview in GitHub comments
section to README 📸Links
Screenshot