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

Fix Expander in CollectionView on Apple #751

Merged
merged 28 commits into from
Feb 1, 2023

Conversation

VladislavAntonyuk
Copy link
Collaborator

Description of Change

Set valid size and invalidate layout of CollectionView

Linked Issues

PR Checklist

Additional information

@VladislavAntonyuk VladislavAntonyuk added the needs discussion Discuss it on the next Monthly standup label Nov 29, 2022
@VladislavAntonyuk VladislavAntonyuk removed the needs discussion Discuss it on the next Monthly standup label Dec 4, 2022
@pictos
Copy link
Member

pictos commented Dec 23, 2022

I tried on my end, and that didn't fix for maccatalyst, as you can see in the video below

Expander_Workaround.mp4

@VladislavAntonyuk
Copy link
Collaborator Author

Thank you @pictos. Seems like Task.Delay before InvalidateLayout was not a good solution, that works on all devices. I reworked it. Please check if it works for you

@rmarinho
Copy link
Contributor

rmarinho commented Jan 2, 2023

We merged the change on MAUI

@VladislavAntonyuk
Copy link
Collaborator Author

We merged the change on MAUI

Thank you @rmarinho! Will it be included in the next release?

@rmarinho
Copy link
Contributor

rmarinho commented Jan 2, 2023

I don't think so, unless we backport the fix to net7

@pictos
Copy link
Member

pictos commented Jan 12, 2023

@VladislavAntonyuk before moving with this and the other PR that I opened, the fix didn't work well for ListView on maccatalyst

@VladislavAntonyuk
Copy link
Collaborator Author

@pictos the fix is only for CollectionView. I also saw back merge of .NET MAUI to avoid reflection.
I believe we should wait for that release to avoid the workarounds

pictos and others added 3 commits January 12, 2023 21:13
* added a extensibility point

* applied the workaround to the samples

* fixed windows overload
…apped`, Execute `OnHeaderTapped` by default, Throw `NotSupportedException` when `Expander` is used in a `ListView` on iOS + MacCatalyst
Copy link
Member

@pictos pictos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've two suggestions. I just focused on the Expander related changed

@VladislavAntonyuk VladislavAntonyuk merged commit 4adb6c9 into main Feb 1, 2023
@VladislavAntonyuk VladislavAntonyuk deleted the expander-collectionview branch February 1, 2023 19:21
@brminnick
Copy link
Collaborator

brminnick commented Feb 1, 2023

@VladislavAntonyuk Can you update the docs, changing it to "Expander is not supported inside ListView" now that only ListView is not supported?

image

@AnthonyNjuguna
Copy link

This doesn't work if the collection has a header view.

var clickedCell = GetCellByPoint(cells, new CGPoint(tapLocation.Value.X, tapLocation.Value.Y));

the clickedCell always returns null.

@pictos
Copy link
Member

pictos commented Feb 9, 2023

@AnthonyNjuguna can you please open a new bug issue?

@CommunityToolkit CommunityToolkit locked as resolved and limited conversation to collaborators Feb 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Add CollectionView and ListView Support to Expander
7 participants