Skip to content

Conversation

matthew-carroll
Copy link
Contributor

@matthew-carroll matthew-carroll commented Jun 17, 2025

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:

  • "film strips" are now "timelines"
  • 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.

@matthew-carroll matthew-carroll changed the title Create theming system for Golden Scenes (Resolves #16) Marketing goldens, some theming, API refactor Jun 24, 2025
@matthew-carroll matthew-carroll marked this pull request as ready for review June 24, 2025 15:43
@matthew-carroll matthew-carroll merged commit bae23b3 into main Jun 24, 2025
1 check passed
@matthew-carroll matthew-carroll deleted the 16_create-theme-for-scenes branch June 24, 2025 16:53
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 this pull request may close these issues.

1 participant