-
Notifications
You must be signed in to change notification settings - Fork 590
fix: improve InteractiveViewer programmatic transformations
#5775
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
Deploying flet-docs with
|
| Latest commit: |
7d75e70
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fabd5111.flet-docs.pages.dev |
| Branch Preview URL: | https://fix-interactive-viewer.flet-docs.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances documentation across several Flet controls, particularly focusing on the InteractiveViewer control. The changes include improved docstrings with more detailed explanations, formatting improvements, and a new example demonstrating programmatic transformations.
- Enhanced documentation for
InteractiveViewerproperties with expanded explanations and usage notes - Added documentation for enum values in
ImageRepeatand improved formatting inVisualDensityand other types - Created a new example showcasing programmatic transformations in
InteractiveViewer - Implemented boundary-aware transformation logic in the Dart implementation
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/python/packages/flet/src/flet/controls/types.py | Updated docstrings for UrlTarget, ClipBehavior, ImageRepeat, and VisualDensity enums with improved formatting and descriptions |
| sdk/python/packages/flet/src/flet/controls/core/interactive_viewer.py | Enhanced documentation for InteractiveViewer properties with detailed explanations, changed default value of boundary_margin to use factory function |
| sdk/python/packages/flet/docs/controls/interactiveviewer.md | Added new section for programmatic transformations example |
| sdk/python/examples/controls/interactive_viewer/transformations.py | New example file demonstrating zoom, pan, reset, and state save/restore operations |
| packages/flet/lib/src/controls/interactive_viewer.dart | Implemented boundary-aware transformation logic with helper methods for scaling and panning operations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sdk/python/packages/flet/src/flet/controls/core/reorderable_draggable.py
Outdated
Show resolved
Hide resolved
sdk/python/packages/flet/integration_tests/controls/material/test_markdown.py
Outdated
Show resolved
Hide resolved
Replaces the shared 'md' Markdown instance with local instances in each test, and renames sample variables for clarity. This improves test isolation and readability.
Fix #4642
Fix #5728
Example
Summary by Sourcery
Enable robust programmatic zooming, panning, resetting, and state management on InteractiveViewer while enforcing boundary and scale constraints and enrich the Python API with more descriptive properties and examples.
Bug Fixes:
Enhancements:
Documentation: