[Android] Fixed incorrect tab content display in TabbedPage#27294
[Android] Fixed incorrect tab content display in TabbedPage#27294jfversluis merged 7 commits intodotnet:inflight/currentfrom
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Files not reviewed (1)
- src/Controls/tests/TestCases.HostApp/Issues/23732Page.xaml: Language not supported
Comments suppressed due to low confidence (1)
src/Controls/tests/TestCases.HostApp/Issues/23732Page.xaml.cs:5
- [nitpick] The class name '_23732Page' is unconventional. It should be renamed to 'Page23732'.
public partial class _23732Page : ContentPage
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
I think the failing test is actually valid in this case, please look into that @Vignesh-SF3580
@jfversluis I have validated the test case failure and corrected it by removing the DisconnectHandler call, as the latest code automatically calls previous page's DisconnectHandler during navigation. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
mattleibow
left a comment
There was a problem hiding this comment.
In the attached videos, I see the below had no animations but the after does have.
Is this a result of your fix or was the capture not correct?
| var nextPage = tabbedPage.Children[pageIndex]; | ||
| tabbedPage.CurrentPage = nextPage; | ||
| await OnNavigatedToAsync(nextPage); | ||
| previousPage.Handler.DisconnectHandler(); |
There was a problem hiding this comment.
Why was this removed, is something leaking?
There was a problem hiding this comment.
@mattleibow As mentioned earlier, this test fails with a timeout exception when using DisconnectHandler with the fix. Since the latest code automatically calls the previous page's DisconnectHandler during navigation, I have removed this code.
@mattleibow The issue occurs when navigating directly from the first to the fourth tab, where the content does not update properly, and animations are missing. However, animations work when switching between other tabs. My fix ensures the tab content updates correctly, and animations now work as expected when switching from the first to the fourth tab also. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
jfversluis
left a comment
There was a problem hiding this comment.
Still tests consistently failing here
@jfversluis I have checked the test case failures in this PR, and the only failing test is "GridCellsHonorMaxWidth", that failure is not related to the fix I have added. All other tests have passed without any issues. Most probably re triggering the CI will clear the test case failures. Could you please check and let me know if you have any concerns? |
Rebased to avoid the |
|
/rebase |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/rebase |
be39ba9 to
c928f36
Compare
|
/rebase |
c928f36 to
52c0de3
Compare
|
I have a workaround : #26014 (comment) |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/rebase |
52c0de3 to
0f67bd4
Compare
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run MAUI-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
issue fixed and testcases updated. updated Issue23732.cs updated testcases. updated the testcase by removing the DisconnectHandler. updated testcases. 21640 testcases added.
Issue Detail
When opening the app and clicking directly on the fourth tab, the fifth tab's content is displayed instead of the correct content.
Root Cause:
The OffscreenPageLimit mapping was missing in the source, leading to incorrect preloading of tab contents.
Description of Change
Mapped the OffscreenPageLimit property to ensure proper preloading of tab contents, resolving the issue.
Tested the behavior in the following platforms
Issues Fixed
Fixes #23732
Fixes #21640
Fixes #28933
Screenshots
TabBarBefore.mov
TabBarAfter.mov