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

SwipeView bug remains transparent with SwipeView.SwipeTransitionMode="Reveal" #21260

Closed
JohnDGuthmiller opened this issue Mar 18, 2024 · 2 comments
Labels
area-controls-swipeview SwipeView platform/iOS 🍎 potential-regression This issue described a possible regression on a currently supported version., verification pending s/needs-repro Attach a solution or code which reproduces the issue t/bug Something isn't working

Comments

@JohnDGuthmiller
Copy link

JohnDGuthmiller commented Mar 18, 2024

Description

SwipeView bug remains transparent with SwipeView.SwipeTransitionMode="Reveal"

Steps to Reproduce

  1. Create .NET MAUI app with SwipeView
  2. Add the following line to the import statements in the beginning of the XAML file that the bug will be reproduced on: xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
  3. Use the following XAML:
<?xml version="1.0" encoding="utf-8"?>
<CollectionView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:converters="clr-namespace:TRINVO.Converters"
             xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
             xmlns:android="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific;assembly=Microsoft.Maui.Controls"
             xmlns:viewModels="clr-namespace:TRINVO.ViewModels"
             x:Class="TRINVO.Views.BarcodeListView"
             ItemsSource="{Binding Barcodes}"
             BackgroundColor="LightGray">
    <CollectionView.Resources>
        <ResourceDictionary>
            <converters:QuantityToBoolConverter x:Key="QuantityToBoolConverter" />
        </ResourceDictionary>
    </CollectionView.Resources>

    <CollectionView.Header>
        <Grid Padding="5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="4*" />
                <ColumnDefinition Width="4*" />
            </Grid.ColumnDefinitions>

            <Label Grid.Column="1"
                   Text="Barcode"
                   VerticalOptions="Center"
                   HorizontalOptions="Start" />

            <Label Grid.Column="2"
                   Text="Qty."
                   VerticalOptions="Center"
                   HorizontalOptions="Center" />
        </Grid>
    </CollectionView.Header>
    <CollectionView.ItemTemplate>
        <DataTemplate x:DataType="viewModels:BarcodeViewModel">
            <Grid>
                <SwipeView ios:SwipeView.SwipeTransitionMode="Reveal">
                    <SwipeView.RightItems>
                        <SwipeItems>
                            <SwipeItemView Command="{Binding ZeroQuantityCommand}">
                                <Grid BackgroundColor="PaleVioletRed" 
                                      WidthRequest="75">
                                    <Image Source="trash_can.png"
                                           Scale=".55" />
                                </Grid>
                            </SwipeItemView>
                            <SwipeItemView BackgroundColor="DodgerBlue"
                                           Command="{Binding SubtractQuantityCommand}" 
                                           WidthRequest="75">
                                <Label Text="-1" FontSize="20" 
                                       VerticalOptions="Center" 
                                       HorizontalOptions="Center" 
                                       FontAttributes="Bold"/>
                            </SwipeItemView>
                        </SwipeItems>
                    </SwipeView.RightItems>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="4*" />
                            <ColumnDefinition Width="4*" />
                            <ColumnDefinition Width="*" />

                        </Grid.ColumnDefinitions>

                        <CheckBox IsChecked="{Binding Quantity, Converter={StaticResource QuantityToBoolConverter}}" IsEnabled="False" VerticalOptions="Center" HorizontalOptions="Start" />

                        <Label Text="{Binding Barcode}" Grid.Column="1" Margin="10, 0, 0, 0" VerticalOptions="Center" HorizontalOptions="Start" FontAttributes="Bold" />

                        <Label Text="{Binding Quantity}" Grid.Column="2" VerticalOptions="Center" HorizontalOptions="End" FontAttributes="Bold" />
                        
                        <BoxView Grid.Column="3" BackgroundColor="Transparent"/>   
                        
                    </Grid>
                </SwipeView>
            </Grid>
        </DataTemplate>
    </CollectionView.ItemTemplate>
</CollectionView>
  1. Observe that the items that overlap with the right swipe buttons remain visible even as as the swipe view is dragged over them.

Link to public reproduction project repository

No response

Version with bug

8.0.7 SR2

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No.

Relevant log output

No response

@JohnDGuthmiller JohnDGuthmiller added the t/bug Something isn't working label Mar 18, 2024
@PureWeen PureWeen added area-controls-swipeview SwipeView potential-regression This issue described a possible regression on a currently supported version., verification pending s/needs-repro Attach a solution or code which reproduces the issue labels Mar 18, 2024
Copy link
Contributor

Hi @JohnDGuthmiller. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

@dotnet-policy-service dotnet-policy-service bot added the s/no-recent-activity Issue has had no recent activity label Mar 28, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 1, 2024
@dotnet-policy-service dotnet-policy-service bot removed the s/no-recent-activity Issue has had no recent activity label May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-swipeview SwipeView platform/iOS 🍎 potential-regression This issue described a possible regression on a currently supported version., verification pending s/needs-repro Attach a solution or code which reproduces the issue t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants