-
Notifications
You must be signed in to change notification settings - Fork 607
Improve handling of SearchBar suggestions + SemanticsService.get_accessibility_features
#5733
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
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
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 improves the SearchBar control's handling of dynamic suggestion lists and adds a new method to retrieve accessibility features from the platform. The key changes include refactoring the SearchBar's suggestions rendering mechanism and extending the SemanticsService API.
- Refactored SearchBar suggestions to use a stateful widget that properly responds to control updates
- Added
SemanticsService.get_accessibility_features()method to query platform accessibility settings - Enhanced documentation across multiple controls and updated examples
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
sdk/python/packages/flet/src/flet/controls/services/semantics_service.py |
Added AccessibilityFeatures dataclass and get_accessibility_features() method with comprehensive documentation |
sdk/python/packages/flet/src/flet/controls/material/search_bar.py |
Improved documentation formatting, clarified event handler descriptions, and removed unused blur() method |
sdk/python/packages/flet/docs/publish/index.md |
Reorganized documentation sections, moving build configuration topics and adding product metadata sections |
sdk/python/packages/flet/docs/controls/semanticsservice.md |
Enhanced documentation structure with examples and proper member listings |
sdk/python/examples/controls/semantics_service/accessibility_features.py |
Added new example demonstrating accessibility features retrieval |
sdk/python/examples/controls/search_bar/basic.py |
Updated to demonstrate dynamic filtering of SearchBar suggestions |
packages/flet/lib/src/services/semantics_service.dart |
Implemented get_accessibility_features method and improved message variable scoping |
packages/flet/lib/src/controls/search_bar.dart |
Introduced _SearchBarSuggestionsHost stateful widget for proper suggestion list updates and removed unused blur method |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
sdk/python/packages/flet/src/flet/controls/services/semantics_service.py
Outdated
Show resolved
Hide resolved
sdk/python/packages/flet/src/flet/controls/services/semantics_service.py
Outdated
Show resolved
Hide resolved
SemanticsService.get_accessibility_featuresSearchBar suggestions + SemanticsService.get_accessibility_features
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Deploying flet-docs with
|
| Latest commit: |
ed241dd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://25449de8.flet-docs.pages.dev |
| Branch Preview URL: | https://fix-searchbar-updates.flet-docs.pages.dev |
Fix #2874
Example code
Summary by Sourcery
Introduce platform accessibility feature retrieval to SemanticsService and enhance SearchBar suggestion handling, complemented by updated documentation and examples.
New Features:
Enhancements:
Documentation: