Search
English

How to compare before and after Compose screen changes as images in a PR without Android Studio(zenn.dev)

startupxo Discuss

Writing language: KoreanRead in the original language

Plain summary

- Turn Compose Previews of Android app screen code into PNG images with a single android CLI command. You do not need to launch a development tool or a device, and no build.gradle changes are required. - The rule of creating a preview for each screen state is written in the docs, and the PR writing skill is instructed to attach before and after images as a table. Then every time an AI agent creates a PR, the screen differences get posted. - The same code produces the same image, so only screens that changed by byte comparison go into the table. On the author's personal verification repository, capturing before and after took 16 to 21 seconds. - It cannot replace screenshot tests. It captures only the previews written in the changed files, and the only comparison target is the image at the merge-base point, so unintended screen changes can be missed.

Read source ↗

Found on

Zenn ↗ / Published by source

Have you run into something like this? Tell us in a line or two what you did. You do not need to know the product.

Sign in to comment

Keyboard shortcuts

Choose a post with J and K or the arrow keys, then press Enter.

K ↑ / J ↓
Previous post / next post
Enter C
Open summary and comments for the selected post
O
Open the original link of the selected post
/
Search
?
Show this help
Tab
Move to the submit or comment button, then press Enter

Type normally in text fields. Tab and Enter are always available.