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

Generate side-by-side sample clips of PR changes #958

Closed
ZeLonewolf opened this issue Oct 8, 2023 · 0 comments · Fixed by #956
Closed

Generate side-by-side sample clips of PR changes #958

ZeLonewolf opened this issue Oct 8, 2023 · 0 comments · Fixed by #956

Comments

@ZeLonewolf
Copy link
Member

ZeLonewolf commented Oct 8, 2023

Proposal:

GitHub actions should generate side-by-side images of PR changes, for example:

Sample Name Before After
historic_us66_oklahoma historic_us66_oklahoma_before historic_us66_oklahoma_after

For demonstration purposes, the banner on the Historic US 66 shield has been changed to a nonsense value. Also note for the real implementation, I intend to include the attribution notice in the sample clip as there's a strong likelihood that they get copied around.

Design:

The repository will hold a configuration file which contains a list of "interesting" locations which will be used by a GitHub action to generate screenshots of that location on the map. The action will generate screenshots for both the main branch and the PR branch and collect a set of images which have differences between the two branches. The action will use the PR version of the screenshot configuration so that it's the same one-to-one comparison.

Then, only those locations which have differences will be added to the "PR Preview" check after the existing content:

image

Process Changes:

Once we have this functionality in place, we should encourage PR creators to add sample locations to the file when new features are added. This will help us visually catch regressions in future PRs and simplify the process of showing changes. I anticipate adding instructions to this effect in our contributor guide.

Implementation:

#942 and #945 added the ability to render samples from a script, at the command line. I intend to use this functionality along with additional scripting to run the comparisons and update the appropriate GitHub action. Since this will require changes to the "privileged" GitHub action, a portion of the implementation will need to include un-previewable changes to main that I will commit separate from the in-progress PR #956 that's implementing this capability.

I'm looking for concurrence on this approach given that I'll need to push a change to main to enable the changes to the privileged action script.

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 a pull request may close this issue.

1 participant