Skip to content

Conversation

@InesaFitsner
Copy link
Contributor

@InesaFitsner InesaFitsner commented Aug 20, 2025

Description

Test Code

# Test code for the review of this PR

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • I signed the CLA.
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing tests pass locally with my changes
  • I have made corresponding changes to the documentation (if applicable)

Screenshots

Additional details

Summary by Sourcery

Remove deprecated surfaceTintColor support, introduce new Material 3 color roles, refine theme parsing, and update integration tests for screenshot assertions

New Features:

  • Add surface_container_highest to ColorScheme and expose new Material 3 fixed and container color roles in Python Colors enum and Dart theme mapping

Enhancements:

  • Remove surface_tint_color properties from controls and theme parsers in both Python and Dart to simplify styling
  • Refactor docstrings formatting across material control classes for better readability

Tests:

  • Revamp PopupMenuButton and Checkbox integration tests: introduce pytest_asyncio fixtures, rename tests, and switch to assert_control_screenshot with multiple state captures

FeodorFitsner and others added 14 commits August 19, 2025 15:18
Renamed and replaced golden screenshot files for macOS checkbox tests to use a consistent naming scheme. Refactored test_checkbox.py to simplify screenshot assertions and update test logic to use new screenshot names and methods.
Introduces labelTextStyle property for PopupMenuItem and updates PopupMenuButtonControl to apply labelTextStyle. Removes deprecated textStyle from PopupMenuTheme and updates documentation to reflect the new styling approach for menu item labels.
remove default value from shape for PopupMenuTheme.shape to have effect
Renamed and updated golden image files for the popup menu button tests to use 'basic' and 'basic_opened' naming. Updated the test to match new asset names and switched to function-scoped async fixtures for improved isolation.
Introduces a new integration test for PopupMenuButton with custom theme settings on macOS, including golden images for normal and opened states. This enhances coverage for themed appearance and behavior.
Eliminates the surface_tint_color property from various Material controls, styles, and theme classes in the Flet SDK. It is not recommended to use in Flutter: "This is not recommended for use. Material 3 spec introduced a set of tone-based surfaces and surface containers in its ColorScheme, which provide more flexibility. The intention is to eventually remove surface tint color from the framework."
Eliminated usage and parsing of the surfaceTintColor property from multiple controls and theme data files. This simplifies the codebase and removes support for a property that is no longer needed or relevant.
Replaces usage of surface_variant with surface_container_highest in both Dart and Python implementations of ColorScheme. Removes background, on_background, and surface_variant properties from Python ColorScheme to align with updated theme structure.
Extended color handling in both Dart and Python to support new Material 3 color scheme properties such as primaryFixed, secondaryFixed, tertiaryFixed, and related variants. This improves theme compatibility and enables usage of the latest Material color system features.
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've reviewed this pull request using the Sourcery rules engine

@FeodorFitsner FeodorFitsner changed the title Inesa/v1 tests p3 v1: Remove surface_tint_color, update Colors and add some more tests Aug 21, 2025
@FeodorFitsner FeodorFitsner merged commit 833c67c into main Aug 21, 2025
5 of 6 checks passed
@FeodorFitsner FeodorFitsner deleted the inesa/v1-tests-p3 branch August 21, 2025 16:42
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.

3 participants