AiForms.SettingsView icon indicating copy to clipboard operation
AiForms.SettingsView copied to clipboard

Possibility To Hide a Cell / Cell ReadOnly

Open AmauryBJ opened this issue 5 years ago • 9 comments

First, this SettingsView is awesome, but is there a way to hide some cell without hiding all the section, also i wanted to have a readonly mode to be able to disable a cell without making it light gray. Thank you.

AmauryBJ avatar Aug 02 '18 17:08 AmauryBJ

@AmauryBJ

Thank you for using this library.

For now, there aren't the functions you want. But I accept these as a request.

Please wait without expecting😃

muak avatar Aug 29 '18 03:08 muak

It would be awesome to have a IsVisible-Property for each cell. My current project has some permissions for users and for now I'm helping me out with switching between multiple Sections. But this feels kind of nasty.

gerricom avatar Mar 04 '20 09:03 gerricom

Added pull request https://github.com/muak/AiForms.SettingsView/pull/161 for this feature :-)

akaegi avatar Apr 26 '21 12:04 akaegi

I tried the merged PR for this feature, but it does not work as expected. As you can see in the attached screenshot a CustomCell is not fully hidden when IsVisible is set to false. This applies at least to CustomCells, CommandCells and ButtonCells with iOS.

2021-06-16_10-28-03

With Android the contents of a cell is fully hidden but if you look closely you can see that the dividing line has doubled in size because those borders collapse. Each hidden cell adds up to this line.

gerricom avatar Jun 16 '21 08:06 gerricom

Thanks @gerricom for checking this out! I'll try to fix it when time is available. I also noticed the border issue... Maybe @muak can point me to the point where to fix this?

akaegi avatar Jun 16 '21 09:06 akaegi

@muak I added PR #173 to fix the issue of borders on Android. However on iOS I cannot reproduce the issue reported by @gerricom.

It looks fine when I tested the following example on iPhone8/11 simulators (see below). @gerricom Maybe you can provide me an example that fails together?

<sv:EntryCell Title="Test" />
<sv:ButtonCell Title="Visible button" />
<sv:ButtonCell Title="Invisible button" IsVisible="False" />
<sv:CommandCell Title="Visible command" IsVisible="True" />
<sv:CommandCell Title="Invisible command" IsVisible="False" />
<sv:CustomCell>
    <Label Text="Visible custom"></Label>
</sv:CustomCell>

<sv:CustomCell IsVisible="False">
    <Label Text="Invisible custom"></Label>
</sv:CustomCell>

Output is: image

akaegi avatar Sep 01 '21 08:09 akaegi

Thanks so far! I had not yet the time to test this, but your screenshots are showing a glitch, too:

131637925-91f5805c-f302-4f0b-a663-dd612e6cbdd7

I will test this myself next week!

gerricom avatar Sep 02 '21 19:09 gerricom

@akaegi I merged it. Thank you for your PR.

@gerricom Thank you for you report. I will confirm it.

muak avatar Sep 04 '21 04:09 muak

Thanks @gerricom - seems I was really blindsighted when looking on the iPhone screen hoping that it is ok ;-) Will look back into it when time allows - but if one of you two can solve it I'd be more than happy.

akaegi avatar Sep 06 '21 06:09 akaegi