Skip to content
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

Cast to a less derived type on TabbedPageManager #13689

Merged
merged 8 commits into from
Mar 7, 2023

Conversation

PureWeen
Copy link
Member

@PureWeen PureWeen commented Mar 3, 2023

Description of Change

Currently inside TabbedPageManager we are forcing the adapter type to be of type MultiPageFragmentStateAdapter when we don't really need it to be. This is making it so it's not possible to swap out the Adapter on the ViewPager.

For .NET8 we'll make TabbedPageManager public so users can more easily swap the Adapter, for now, this lets users apply changes themselves in .NET7. This PR takes a step in the right direction of making TabbedPageManager just generically work with any FragmentStateAdapter

@PureWeen PureWeen added the backport/suggested The PR author or issue review has suggested that the change should be backported. label Mar 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2023

Thank you for your pull request. We are auto-formating your source code to follow our code guidelines.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2023

Thank you for your pull request. We are auto-formating your source code to follow our code guidelines.

@Eilon Eilon added the area-controls-tabbedpage TabbedPage label Mar 6, 2023
@mattleibow mattleibow merged commit 73098ab into main Mar 7, 2023
@mattleibow mattleibow deleted the cast_to_better_adapter_types branch March 7, 2023 17:14
@PureWeen
Copy link
Member Author

/backport to net7.0

@github-actions
Copy link
Contributor

Started backporting to net7.0: https://github.com/dotnet/maui/actions/runs/4439997678

@github-actions
Copy link
Contributor

@PureWeen backporting to net7.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Cast to a less derived type on TabbedPageManager
Using index info to reconstruct a base tree...
M	src/Controls/src/Core/Platform/Android/TabbedPageManager.cs
M	src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.Android.cs
M	src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.cs
CONFLICT (content): Merge conflict in src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.cs
Auto-merging src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.Android.cs
CONFLICT (content): Merge conflict in src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.Android.cs
Auto-merging src/Controls/src/Core/Platform/Android/TabbedPageManager.cs
CONFLICT (content): Merge conflict in src/Controls/src/Core/Platform/Android/TabbedPageManager.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Cast to a less derived type on TabbedPageManager
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@github-actions
Copy link
Contributor

@PureWeen an error occurred while backporting to net7.0, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

PureWeen added a commit that referenced this pull request Mar 16, 2023
# Conflicts:
#	src/Controls/src/Core/Platform/Android/TabbedPageManager.cs
#	src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.Android.cs
#	src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.cs
PureWeen added a commit that referenced this pull request Mar 17, 2023
…13998)

* Cast to a less derived type on TabbedPageManager (#13689)

# Conflicts:
#	src/Controls/src/Core/Platform/Android/TabbedPageManager.cs
#	src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.Android.cs
#	src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.cs

* Update TabbedPageManager.cs

* - fix namespaces for tests
github-actions bot pushed a commit that referenced this pull request Mar 20, 2023
# Conflicts:
#	src/Controls/src/Core/Platform/Android/TabbedPageManager.cs
#	src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.Android.cs
#	src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.cs
rmarinho pushed a commit that referenced this pull request Mar 20, 2023
…anager (#13689) (#14068)

* Cast to a less derived type on TabbedPageManager (#13689)

# Conflicts:
#	src/Controls/src/Core/Platform/Android/TabbedPageManager.cs
#	src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.Android.cs
#	src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.cs

* Update TabbedPageManager.cs

* - fix namespaces for tests

---------

Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
@PureWeen PureWeen added the backport/approved After some discussion or review, this PR or change was approved to be backported. label Mar 23, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2023
@samhouts samhouts added the fixed-in-8.0.0-preview.3.8149 Look for this fix in 8.0.0-preview.3.8149! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-tabbedpage TabbedPage backport/approved After some discussion or review, this PR or change was approved to be backported. backport/suggested The PR author or issue review has suggested that the change should be backported. fixed-in-8.0.0-preview.3.8149 Look for this fix in 8.0.0-preview.3.8149!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants