Marketing goldens, some theming, API refactor #55
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.
Marketing goldens, some theming, API refactor.
This work began as theming, but due to presentation requirements, and things found along the way, it became mostly an API rework. I did add various things along the way. This PR also creates marketing goldens.
One thing I realized while working on this PR, which may conflict with some of the failure scene work, is that I noticed I was laying out the scene even when comparing goldens. This shouldn't be necessary. Each golden fundamentally only cares about itself. Therefore, when comparing goldens, we should be able to extract each golden from the existing scene file, and compare it against new candidate screenshots that are taken in isolation. I made that change in this PR.
Here are some highlights:
test_goldens_known_failures
is a directory to accumulate things that are currently failing, which shouldn't fail, but we don't have time at the moment to fix. I placed one item in there which demonstrates a fundamental issue with our approach, where we generate a golden at an integer offset, like 28px, but due to the scene layout, we end up extracting it from a partial pixel boundary at something like 586.3px. This does a bunch of anti-aliasing to the pixels that we extract, which then don't match the pixels we paint in the candidate comparison.test_golden_references
is a directory for golden tests that are meant as examples of various behaviors, e.g., regular Flutter goldens, intentionally failing tests, error reporting. This directory may have some tests we want to run in CI, but generally shouldn't be. Therefore this directory should be treated as one that requires specific intent to regenerate goldens, and also to run the golden tests.test_goldens
remains the place for actual golden tests that we want to run in CI without any deeper considerations. All tests in that directory should pass at all times.