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

[regression/7.0.0-rc.2.6866] RadioButton template layout broken #10491

Closed
davidortinau opened this issue Oct 4, 2022 · 2 comments · Fixed by #10768
Closed

[regression/7.0.0-rc.2.6866] RadioButton template layout broken #10491

davidortinau opened this issue Oct 4, 2022 · 2 comments · Fixed by #10768
Assignees
Labels
area-controls-radiobutton RadioButton, RadioButtonGroup fixed-in-7.0.49 Look for this fix in 7.0.49 GA! fixed-in-7.0.100 fixed-in-7.0.101 i/regression This issue described a confirmed regression on a currently supported version p/0 Work that we can't release without t/bug Something isn't working
Milestone

Comments

@davidortinau
Copy link
Contributor

davidortinau commented Oct 4, 2022

Description

RC2 has changed how these radio button templates are laid out.

image

image

Screenshot 2022-10-04 at 10 58 08 AM

Should look like:

image

Steps to Reproduce

<ControlTemplate x:Key="ThemeRadioTemplate">
            <Frame
                          BorderColor="{StaticResource Gray100}"
                          BackgroundColor="Transparent"
                          HasShadow="False"
                          HeightRequest="120"
                          WidthRequest="100"
                          HorizontalOptions="Start"
                          VerticalOptions="Start"
                          Padding="0">

                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroupList>
                        <VisualStateGroup
                                        x:Name="CheckedStates">

                            <VisualState
                                            x:Name="Checked">
                                <VisualState.Setters>
                                    <Setter
                                                  Property="BorderColor"
                                                  Value="{StaticResource Primary}" />
                                    <Setter
                                                  TargetName="Check"
                                                  Property="Opacity"
                                                  Value="1" />
                                </VisualState.Setters>
                            </VisualState>

                            <VisualState
                                            x:Name="Unchecked">
                                <VisualState.Setters>
                                    <Setter
                                                    Property="BorderColor"
                                                    Value="{StaticResource Gray100}" />
                                    <Setter
                                                    TargetName="Check"
                                                    Property="Opacity"
                                                    Value="0" />
                                </VisualState.Setters>
                            </VisualState>

                        </VisualStateGroup>
                    </VisualStateGroupList>
                </VisualStateManager.VisualStateGroups>

                <Grid
                                Margin="8"
                                WidthRequest="100">
                    <Grid
                                      WidthRequest="18"
                                      HeightRequest="18"
                                      Margin="0,0,8,0"
                                      HorizontalOptions="End"
                                      VerticalOptions="Start">
                        <Ellipse
                                            Stroke="{StaticResource Gray900}"
                                            WidthRequest="16"
                                            HeightRequest="16"
                                            StrokeThickness="0.5"
                                            VerticalOptions="Center"
                                            HorizontalOptions="Center"
                                            Fill="White" />
                        <Ellipse
                                            x:Name="Check"
                                            WidthRequest="8"
                                            HeightRequest="8"
                                            Stroke="{StaticResource Primary}"
                                            Fill="{StaticResource Primary}"
                                            VerticalOptions="Center"
                                            HorizontalOptions="Center" />
                    </Grid>
                    <ContentPresenter></ContentPresenter>
                </Grid>
            </Frame>
        </ControlTemplate>

Link to public reproduction project repository

https://github.com/davidortinau/ControlGallery

Version with bug

Unknown/Other (please specify)

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, macOS, I was not able test on other platforms

Affected platform versions

iOS 16, android 30...all of them probably

Did you find any workaround?

I tried Border but that doesn't change anything. It's like the positioning for horizontal and maybe vertical within a Grid isn't working in the template.

Relevant log output

No response

@davidortinau davidortinau added the t/bug Something isn't working label Oct 4, 2022
@PureWeen
Copy link
Member

PureWeen commented Oct 4, 2022

Related #10301

@Eilon Eilon added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Oct 4, 2022
@Redth Redth added this to the 7.0 milestone Oct 4, 2022
@Redth Redth added i/regression This issue described a confirmed regression on a currently supported version p/0 Work that we can't release without labels Oct 4, 2022
@rmarinho rmarinho self-assigned this Oct 11, 2022
@rmarinho
Copy link
Member

@hartez this was regressed with this grid fix #10073

hartez added a commit that referenced this issue Oct 18, 2022
rmarinho pushed a commit that referenced this issue Oct 19, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Nov 18, 2022
@samhouts samhouts added the fixed-in-7.0.49 Look for this fix in 7.0.49 GA! label Feb 16, 2023
@samhouts samhouts changed the title RadioButton template layout broken [regression/7.0.0-rc.2.6866] RadioButton template layout broken Jun 28, 2023
@Eilon Eilon added area-controls-radiobutton RadioButton, RadioButtonGroup and removed legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor labels May 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-radiobutton RadioButton, RadioButtonGroup fixed-in-7.0.49 Look for this fix in 7.0.49 GA! fixed-in-7.0.100 fixed-in-7.0.101 i/regression This issue described a confirmed regression on a currently supported version p/0 Work that we can't release without t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants