Skip to content

fix: MinWidth and MinHeight should not be applied by default on TextBox - #17807

Merged
MartinZikmund merged 6 commits into
masterfrom
dev/mazi/default-textbox-minwidth
Aug 22, 2024
Merged

MartinZikmund merged 6 commits into
masterfrom
dev/mazi/default-textbox-minwidth

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Aug 2, 2024 •

Copy link
Copy Markdown
Member

GitHub Issue (If applicable): part of #9063

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

Our generic.xaml applies MinWidth and MinHeight in the default style

What is the new behavior?

As per WinUI sources, MinWidth and MinHeight should only be applied to the border inside of the control, not as properties on the control directly. This way, setting 0 width and height should make the TextBox invisible. On the other hand, the default fluent text box style should apply these properties directly.

PR Checklist

Please check if your PR fulfills the following requirements:

@MartinZikmund MartinZikmund self-assigned this Aug 2, 2024
@MartinZikmund MartinZikmund linked an issue Aug 2, 2024 that may be closed by this pull request
@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot added the area/skia ✏️ Categorizes an issue or PR as relevant to Skia label Aug 19, 2024
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/default-textbox-minwidth branch from 19e6618 to b401ff9 Compare August 19, 2024 13:27
@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

@MartinZikmund
MartinZikmund force-pushed the dev/mazi/default-textbox-minwidth branch from 1b286a4 to 53499cd Compare August 22, 2024 11:25
@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 137131 found UI Test snapshots differences: android-28-net8: 25, android-28-net8-Snap: 33, ios: 11, ios-Snap: 47, skia-gtk-screenshots: 47, skia-linux-screenshots: 33, skia-windows-screenshots: 39, wasm: 321, wasm-automated-net8.0-UWP-Default-automated: 33, wasm-automated-net8.0-UWP-RuntimeTests-0: 0, wasm-automated-net8.0-UWP-RuntimeTests-1: 0, wasm-automated-net8.0-UWP-RuntimeTests-2: 0, wasm-automated-net8.0-WinUI-Benchmarks-automated: 0, wasm-automated-net8.0-WinUI-RuntimeTests-0: 0, wasm-automated-net8.0-WinUI-RuntimeTests-1: 0, wasm-automated-net8.0-WinUI-RuntimeTests-2: 0

Details
  • android-28-net8: 25 changed over 832

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • NativeCommandBar_Size_Uno_UI_Samples_Content_UITests_CommandBar_CommandBar_Dynamic
    • TextBox_Foreground_Uno_UI_Samples_Content_UITests_TextBoxControl_TextBox_Foreground
    • WebView_NavigateToLongString_AfterSuccess
    • When_Parent_PointerMoved_After_drag_on_non-scrolling_ScrollViewer
    • FocusManager_GetFocusedElement_ListViewItem_LostFocus_Validation_FocusManager_-_LostFocus_-_ListViewItem_-_1_-_Initial_State
    • MinMaxTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • TestTextBoxTap_UITests_Shared_Windows_UI_Input_VisualStatesTests_TextBox_VisualStates
    • CommandBar_LongTitle_Validation_Uno_UI_Samples_Content_UITests_CommandBar_CommandBar_LongTitle
    • Detereminate_ProgressRing_Validation50_[#FF0000_#008000_#008000_#FF0000]_Progress-Ring-Value-50
    • Detereminate_ProgressRing_Validation25_[#FF0000_#008000_#FF0000_#FF0000]_Progress-Ring-Value-25
    • FocusManager_GetFocusedElement_ListViewItem_LostFocus_Validation_FocusManager_-_LostFocus_-_ListViewItem_-_2_-_Click_outside
    • FocusManager_GetFocusedElement_ListViewItem_LostFocus_Validation_Uno_UI_Samples_Content_UITests_FocusTests_FocusManager_GetFocus_Automated
    • NavigateBackAndForthBetweenMenuItemsAndSettings_Fluent_SamplesApp_Samples_Microsoft_UI_Xaml_Controls_NavigationViewTests_FluentStyle_FluentStyle_NavigationViewSample
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • TextBox_CharacterCasingLower_ShouldBeAllLower_Test_UITests_Shared_Windows_UI_Xaml_Controls_TextBoxTests_TextBox_CharacterCasing
    • DecimalFormatterTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • PasswordBox_AutoGrow_Horizontally_Test_Uno_UI_Samples_Content_UITests_TextBoxControl_PasswordBox_Simple
    • Detereminate_ProgressRing_Validation75_[#FF0000_#008000_#008000_#008000]_Progress-Ring-Value-75
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
  • android-28-net8-Snap: 33 changed over 1065

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • BreadcrumbBar_MUXControlsTestApp_BreadcrumbBarPage_MUXControlsTestApp_BreadcrumbBarPage
    • Default_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected
    • Gesture_Recognizer_Pointer_Events_test_bench_UITests_Shared_Windows_UI_Input_GestureRecognizer_PointersEvents
    • Icons_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Generic_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Generic
    • MediaPlayerElement_Mini_player_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Minimal
    • RatingControl_UITests_Microsoft_UI_Xaml_Controls_RatingControlTests_RatingControlPage_UITests_Microsoft_UI_Xaml_Controls_RatingControlTests_RatingControlPage
    • TextBox_TextBox_Padding_Unused_In_Style_Uno_UI_Samples_Content_UITests_TextBoxControl_TextBox_Padding_Unused_In_Style
    • ListView_HorizontalListView_Templates_SamplesApp_Windows_UI_Xaml_Controls_ListView_HorizontalListView_Templates
    • Transform_TextBox_With_RotateTransform_SamplesApp_Wasm_Windows_UI_Xaml_Media_Transform_TextBox_With_RotateTransform
    • Transform_Basics_UITests_Shared_Windows_UI_Xaml_Media_Transform_Basics
    • Transform_TransformToVisual_Translate2d_SamplesApp_Wasm_Windows_UI_Xaml_Media_Transform_TransformToVisual_Translate2d
    • NavigationView_MUXControlsTestApp_NavigationViewRS4Page_MUXControlsTestApp_NavigationViewRS4Page
    • Scrolling_MUXControlsTestApp_ScrollViewWithScrollControllersPage_MUXControlsTestApp_ScrollViewWithScrollControllersPage
    • WebView_UITests_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_NavigationProperties_UITests_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_NavigationProperties
    • WebView_WebView2_WithHeaders_SamplesApp_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_WithHeaders
    • Default_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_Margin_On_Container_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_Margin_On_Container
    • MUX_NumberBox_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • TextBox_TextBox_Foreground_Uno_UI_Samples_Content_UITests_TextBoxControl_TextBox_Foreground
    • WebView_WebView2_Mailto_SamplesApp_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_Mailto
    • Windows_Media_MediaPlayer_UITests_Windows_Media_MediaPlayerTests
  • ios: 11 changed over 268

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • When_NoSelection_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • Check_ListView_Swallows_Measure_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_With_ListViews_Count_Measure
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • MinMaxTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • TextBox_UpdatedBinding_On_OneWay_Mode_UITests_Windows_UI_Xaml_Controls_TextBox_TextBox_Bindings
    • DecimalFormatterTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • UpDownEnabledTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • UpDownTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • TextBox_Foreground_Uno_UI_Samples_Content_UITests_TextBoxControl_TextBox_Foreground
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
  • ios-Snap: 47 changed over 1056

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Brushes_ImageBrushStretch2_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushStretch2
    • Path_FixedWidthUniform_SamplesApp_Windows_UI_Xaml_Shapes_PathTestsControl_FixedWidthUniform
    • Brushes_Uno_UI_Samples_UITests_ImageBrushTestControl_DoubleImageBrushInList_Uno_UI_Samples_UITests_ImageBrushTestControl_DoubleImageBrushInList
    • ColorPicker_WinUIColorPickerPage_UITests_Shared_Microsoft_UI_Xaml_Controls_ColorPickerTests_WinUIColorPickerPage
    • Image_Image_Stretch_None_ScrollViewer_Uno_UI_Samples_UITests_ImageTestsControl_Image_Stretch_None_Containers
    • NavigationView_FluentStyle_NavigationViewSample_SamplesApp_Samples_Microsoft_UI_Xaml_Controls_NavigationViewTests_FluentStyle_FluentStyle_NavigationViewSample
    • Buttons_Custom_Button_With_ContentTemplate_Uno_UI_Samples_Content_UITests_ButtonTestsControl_Custom_Button_With_ContentTemplate
    • Default_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected
    • Brushes_ImageBrushChangingCornerRadius_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushChangingCornerRadius
    • Brushes_ImageBrushWithCompositeTransform_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushWithCompositeTransform
    • Brushes_ImageBrushWithScaleTransform_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushWithScaleTransform
    • Brushes_Uno_UI_Samples_Samples_Shared_Content_UITests_ImageBrushInList_Uno_UI_Samples_Samples_Shared_Content_UITests_ImageBrushInList
    • Default_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Vertical_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Vertical
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Alignment_SizeOnControl_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Alignment_SizeOnControl
    • Brushes_GenericApp_Views_Content_UITests_ImageBrushTestControl_BorderImageBrushRelativeTransform_GenericApp_Views_Content_UITests_ImageBrushTestControl_BorderImageBrushRelativeTransform
    • Brushes_PanelImageBrush_Uno_UI_Samples_UITests_ImageBrushTestControl_PanelImageBrush
    • Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Bigger_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Bigger
    • Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Equal_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Equal
  • skia-gtk-screenshots: 47 changed over 2216

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • UIElement_ContextFlyout.png-dark
    • UIElement_ContextFlyout.png
    • TextBox_Padding_Unused_In_Style.png-dark
    • TextBox_Padding_Unused_In_Style.png
    • TextBox_With_RotateTransform.png-dark
    • TextBox_With_RotateTransform.png
    • SelectorBarSamplePage.png-dark
    • SelectorBarSamplePage.png
    • SvgImageSource_FromStream.png-dark
    • SvgImageSource_FromStream.png
    • TransformToVisual_Simple.png-dark
    • TransformToVisual_Simple.png
    • ImageBrushStretch2.png
    • UniformToFill100x100.png-dark
    • UniformToFill100x100.png
    • Image_Stretch_None_ScrollViewer.png-dark
    • Image_Stretch_None_ScrollViewer.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ColorPickerSample.png-dark
  • skia-linux-screenshots: 33 changed over 2216

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • BorderImageBrushRelativeTransform.png-dark
    • BorderImageBrushRelativeTransform.png
    • ImageBrushAlignmentXY2.png-dark
    • ImageBrushAlignmentXY2.png
    • DragDrop_TestPage.png-dark
    • DragDrop_TestPage.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • ImageWithLateSourceUniformToFill.png-dark
    • ImageWithLateSourceUniformToFill.png
    • Image_UseTargetSize.png-dark
    • Image_UseTargetSize.png
    • PathImageBrushfill.png-dark
    • PathImageBrushfill.png
    • Mini player.png-dark
    • Mini player.png
    • TextBox_Padding_Unused_In_Style.png-dark
    • TextBox_Padding_Unused_In_Style.png
  • skia-windows-screenshots: 39 changed over 2216

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AppWindowPositionAndSize.png
    • BorderImageBrushRelativeTransform.png-dark
    • BorderImageBrushRelativeTransform.png
    • AppWindowPositionAndSize.png-dark
    • CalendarView_Theming.png-dark
    • ImageInStackPanel.png-dark
    • ImageInStackPanel.png
    • ImagesInlineInFlipView.png-dark
    • ImagesInlineInFlipView.png
    • CalendarView_Theming.png
    • Image_UseTargetSize.png-dark
    • Image_UseTargetSize.png
    • ImageBrush_UniformToFill.png-dark
    • ImageBrush_UniformToFill.png
    • ImageWithLateSourceUniformToFill.png-dark
    • ImageWithLateSourceUniformToFill.png
    • Ellipse.png-dark
    • Ellipse.png
    • ImageBrushAlignmentXY2.png-dark
    • ImageBrushAlignmentXY2.png
  • wasm: 321 changed over 1043

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • GenericApp.Views.Content.UITests.Animations.DoubleAnimation_RenderTransformOrigin
    • GenericApp.Views.Samples.Shared.Content.UITests.GridViewGrouped
    • MUXControlsTestApp.DropDownButtonPage
    • nVentive.Umbrella.Views.UI.Samples.Content.UITests.ButtonTestsControl.Hyperlink_Disabled
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_AnchorNavigation
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_ChromeClient
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ComboBox.ComboBox_Legacy
    • SamplesApp.Wasm.Windows_UI_Xaml_Media.Transform.TransformToVisual_Simple
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ScrollIntoViewTest
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.UndefinedHeightListView
    • UITests.Microsoft_UI_Xaml_Controls.ImageIconTests.ImageIconPage
    • UITests.Microsoft_UI_Xaml_Controls.TeachingTipTests.TeachingTipBasicPage
    • UITests.Shared.Windows_ApplicationModel_Resources_ResourceLoader.ResourceLoader_Simple
    • UITests.Shared.Windows_Devices.Midi.MidiDeviceEnumerationTests
    • UITests.Shared.Windows_UI_Xaml_Controls.ComboBox.ComboBox_MaxDropdownHeight
    • UITests.Shared.Windows_UI_Xaml_Controls.ComboBox.ComboBox_SelectedIndex
    • UITests.Shared.Windows_UI_Xaml_Controls.TextBlockControl.TextBlock_Decorations
    • UITests.Shared.Windows_UI_Xaml_Controls.TextBlockControl.TextBlock_Foreground_While_Collapsed
    • UITests.Shared.Windows_UI_Xaml_Controls.ScrollViewerTests.ScrollViewer_Simple
    • UITests.Windows_Media.SpeechRecognizerTests
  • wasm-automated-net8.0-UWP-Default-automated: 33 changed over 1952

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Gesture_Recognizer_VisualStates_TextBox_UITests_Shared_Windows_UI_Input_VisualStatesTests_TextBox_VisualStates
    • ListView_ListViewSelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • MinMaxTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • Brushes_PanelImageBrush_Uno_UI_Samples_UITests_ImageBrushTestControl_PanelImageBrush
    • ListView_ListView_With_ListViews_Count_Measure_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_With_ListViews_Count_Measure
    • Automation_UITests_Shared_Windows_UI_Xaml_Automation_AutomationProperties_Name_UITests_Shared_Windows_UI_Xaml_Automation_AutomationProperties_Name
    • MediaPlayerElement_Using_ogg_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Ogg_Extension
    • Brushes_BorderImageBrush_Uno_UI_Samples_UITests_ImageBrushTestControl_BorderImageBrush
    • Brushes_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrush_StreamSource_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrush_StreamSource
    • DecimalFormatterTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • Default_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected
    • MediaPlayerElement_Mini_player_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Minimal
    • MediaPlayerElement_Sources_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Sources
    • MediaPlayerElement_Using_3gp_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_3gp_Extension
    • MediaPlayerElement_Using_mp3_Audio_only_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Mp3_Extension
    • TestProgressRing_InitialState_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_Features
    • When_ExtendedSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_SingleSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
  • wasm-automated-net8.0-UWP-RuntimeTests-0: 0 changed over 1

  • wasm-automated-net8.0-UWP-RuntimeTests-1: 0 changed over 1

  • wasm-automated-net8.0-UWP-RuntimeTests-2: 0 changed over 1

  • wasm-automated-net8.0-WinUI-Benchmarks-automated: 0 changed over 1

  • wasm-automated-net8.0-WinUI-RuntimeTests-0: 0 changed over 1

  • wasm-automated-net8.0-WinUI-RuntimeTests-1: 0 changed over 1

  • wasm-automated-net8.0-WinUI-RuntimeTests-2: 0 changed over 1

@MartinZikmund
MartinZikmund merged commit b2d4d18 into master Aug 22, 2024
@MartinZikmund
MartinZikmund deleted the dev/mazi/default-textbox-minwidth branch August 22, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/skia ✏️ Categorizes an issue or PR as relevant to Skia

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ComboBox.IsEditable is not implemented

4 participants