Add README section about Compose preview comment#647
Open
Conversation
Member
Author
|
@eneim @sobaya-0141 Could you look over this PR? |
eneim
reviewed
Sep 21, 2022
Co-authored-by: Nam Nguyen <1776230+eneim@users.noreply.github.com>
eneim
reviewed
Sep 21, 2022
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. |
Contributor
There was a problem hiding this comment.
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 permissionsis 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.
Member
Author
There was a problem hiding this comment.
Let me take a look at this 👀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Overview (Required)
Jetpack Compose preview in GitHub commentssection to README 📸Links
Screenshot