Thanks to visit codestin.com
Credit goes to github.com

Skip to content

More control images for docs, create_gif helper method#5717

Merged
FeodorFitsner merged 11 commits intomainfrom
inesa/docs-control-images-P4
Oct 17, 2025
Merged

More control images for docs, create_gif helper method#5717
FeodorFitsner merged 11 commits intomainfrom
inesa/docs-control-images-P4

Conversation

@InesaFitsner
Copy link
Contributor

@InesaFitsner InesaFitsner commented Oct 16, 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

Provide a new helper for generating GIF animations from test screenshots, enrich control docs with code snippets and refer to golden images, and add integration tests for control snapshots and dialog flows.

New Features:

  • Add create_gif method to FletTestApp for assembling animated GIFs from screenshot sequences

Enhancements:

  • Embed Python usage examples in control class docstrings across canvas, CupertinoActionSheet, BottomSheet, BottomAppBar, and CupertinoActivityIndicator
  • Revise documentation markdown to reference golden test-images directories, include captions, and separate example_media paths
  • Wrap example scripts with a main guard

Tests:

  • Add image snapshot integration tests for Canvas, CupertinoActionSheet, BottomSheet, BottomAppBar, and CupertinoActivityIndicator
  • Extend alert dialog integration test to use create_gif for capturing dialog interaction flows

Updated documentation to include a new example image and code snippet for BottomAppBar. Added an integration test and corresponding golden image for visual regression testing of the BottomAppBar control.
Updated Canvas documentation to include a basic example image and code snippet. Added a corresponding integration test and golden image for screenshot validation. Adjusted image references in docs to use new example image and media paths.
Updated documentation to include a new example image and code snippet for CupertinoActionSheet. Added an integration test and corresponding golden image for documentation purposes.
Updated documentation for CupertinoActivityIndicator to include a new example image and improved example references. Added a golden image and an integration test for the control to ensure visual consistency. Also enhanced the docstring with a usage example.
Updated documentation for BottomSheet with a new example image and code snippet. Added an integration test and corresponding screenshot for the BottomSheet control to improve test coverage and documentation clarity.
Introduced integration tests and golden images for alert dialog examples, covering both modal and non-modal dialogs. Updated documentation to use new screenshots instead of GIFs, and improved the example code to use a main guard. Added an empty __init__.py for the alert_dialog example package.
Introduces a create_gif method to FletTestApp for generating animated GIFs from a sequence of PNG images. Integration test for alert dialog now uses this method to create a GIF of the dialog flow when golden images are enabled.
Added the 'duration=500' parameter to the create_gif call in test_alert_dialog.py to control the frame duration. Updated the corresponding golden GIF to reflect this change.
Adjusted the sequence and duration of frames in the alert dialog test GIF for improved clarity. Default GIF frame duration in FletTestApp was increased to 1000ms, and the test now uses a longer duration and an updated frame sequence.
Replaced three static images with a single GIF to better illustrate modal and non-modal dialog flows in the alertdialog documentation.
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

@cloudflare-workers-and-pages
Copy link

Deploying flet-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4057c41
Status: ✅  Deploy successful!
Preview URL: https://84e781e0.flet-docs.pages.dev
Branch Preview URL: https://inesa-docs-control-images-p4.flet-docs.pages.dev

View logs

@FeodorFitsner FeodorFitsner merged commit 321c28b into main Oct 17, 2025
42 of 51 checks passed
@FeodorFitsner FeodorFitsner deleted the inesa/docs-control-images-P4 branch October 17, 2025 15:50
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.

2 participants