fix: enforce disabled state across Tabs, TabBar, Tab and TabBarView#6224
Open
ndonkoHenri wants to merge 3 commits intomainfrom
Open
fix: enforce disabled state across Tabs, TabBar, Tab and TabBarView#6224ndonkoHenri wants to merge 3 commits intomainfrom
Tabs, TabBar, Tab and TabBarView#6224ndonkoHenri wants to merge 3 commits intomainfrom
Conversation
Deploying flet-examples with
|
| Latest commit: |
16fd873
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://79663b13.flet-examples.pages.dev |
| Branch Preview URL: | https://disabled-tab.flet-examples.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a regression bug (#6220) where disabling tab buttons in Flet 0.80.*/0.81.0 did not work as expected. The fix enforces the disabled state across the entire Tabs component hierarchy (Tabs, TabBar, Tab, and TabBarView).
Changes:
- Added comprehensive disabled state handling in Dart implementation for TabBar, individual Tabs, and TabBarView
- Added three new integration tests to verify disabled state behavior at different levels
- Updated existing tests to use function-scoped fixtures for better test isolation
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| sdk/python/packages/flet/integration_tests/controls/material/test_tabs.py | Added function-scoped fixture override and three comprehensive tests for disabled state (individual tab, TabBar, and Tabs control) |
| packages/flet/lib/src/controls/tabs.dart | Implemented disabled state enforcement: TabBarView prevents scrolling, TabBar uses IgnorePointer wrapper, and onTap/onHover handlers check individual tab disabled states |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Deploying flet-docs with
|
| Latest commit: |
16fd873
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://54548dca.flet-docs.pages.dev |
| Branch Preview URL: | https://disabled-tab.flet-docs.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #6220
Summary by Sourcery
Enforce disabled state behavior across Tabs, TabBar, Tab, and TabBarView and add coverage for these scenarios.
Bug Fixes:
Tests: