maui icon indicating copy to clipboard operation
maui copied to clipboard

Fix iOS ListView cell gone hidden (#11287)

Open ooikengsiang opened this issue 2 years ago • 8 comments

Description of Change

Workaround iOS / MacOS ListView cell disappear when user scroll back and DequeueReusableCell return a hidden cell. Force any hidden cell return by DequeueReusableCell which are hidden to create a new cell instead (set hidden to false doesn't work).

Issues Fixed

Fixes #11287

ooikengsiang avatar Mar 03 '23 08:03 ooikengsiang

Hey there @ooikengsiang! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

ghost avatar Mar 03 '23 08:03 ghost

@dotnet-policy-service agree

ooikengsiang avatar Mar 03 '23 08:03 ooikengsiang

@ooikengsiang please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@dotnet-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@dotnet-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@dotnet-policy-service agree company="Microsoft"

Contributor License Agreement

@dotnet-policy-service agree

ooikengsiang avatar Mar 03 '23 08:03 ooikengsiang

/azp run

jfversluis avatar Mar 03 '23 14:03 jfversluis

Azure Pipelines successfully started running 2 pipeline(s).

azure-pipelines[bot] avatar Mar 03 '23 14:03 azure-pipelines[bot]

Azure Pipelines successfully started running 2 pipeline(s).

azure-pipelines[bot] avatar Mar 08 '23 13:03 azure-pipelines[bot]

@PureWeen I have a repro here: https://github.com/dotnet/maui/issues/13633 which might be the same issue, it was also linked with the original issue. The only difference is that in my issue cells become hidden when app goes into background and come back while in the original issue its when scrolling through the list. But the result is the same, cells become hidden.

Symbai avatar Mar 10 '23 01:03 Symbai

@ooikengsiang Not sure if I'm missing something but I think the wrong reproduction was uploaded to the original issue? https://github.com/ooikengsiang/ListViewProblem ?

Can you point me to a reproduction of the issue so that I can test your fix?

Fixed, sorry for the mix up.

ooikengsiang avatar Mar 10 '23 04:03 ooikengsiang

👀

matmork avatar Apr 08 '23 16:04 matmork

I think the main problem here is that the viewhandler on the ViewCellRenderer is being completely disconnected.

I've checked in an alternate approach here https://github.com/dotnet/maui/tree/13669_testing

can you let me know how that works for you? if that seems to address the problem?

Let me check and will get back to you.

ooikengsiang avatar May 11 '23 14:05 ooikengsiang

I think the main problem here is that the viewhandler on the ViewCellRenderer isn't being completely disconnected.

FYI, I meant to say isn't being disconnected.

I think the main problem here is that the viewhandler on the ViewCellRenderer isn't being completely disconnected.

PureWeen avatar May 11 '23 14:05 PureWeen

I think the main problem here is that the viewhandler on the ViewCellRenderer isn't being completely disconnected.

FYI, I meant to say isn't being disconnected.

I think the main problem here is that the viewhandler on the ViewCellRenderer isn't being completely disconnected.

Test and it work! Awesome, never know that disconnect is required there. Thanks for spending extra time looking into this.

ooikengsiang avatar May 11 '23 15:05 ooikengsiang

Thank you for testing @ooikengsiang and narrowing down to where this was being quirky!

Closing this PR in favor of https://github.com/dotnet/maui/pull/15036

PureWeen avatar May 11 '23 17:05 PureWeen

Thank you for testing @ooikengsiang and narrowing down to where this was being quirky!

Closing this PR in favor of #15036

@ooikengsiang if you have time can you test my updates here?

https://github.com/dotnet/maui/pull/15036

I think I was also breaking recycling with my changes :-)

I tried your repro and a few of our samples and they seemed to work fine.

PureWeen avatar May 16 '23 01:05 PureWeen