-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Windows] Fixed Picker items width wont resize back #33042
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e3872bb
[Windows] Fixed picker resize on window changes
SubhikshaSf4851 b6729d5
Updated condition
SubhikshaSf4851 67a0400
Updated TestSample
SubhikshaSf4851 426c457
Modified TestSample
SubhikshaSf4851 07f402a
Updated copilot suggestion
SubhikshaSf4851 59f6be2
Updated snapshots
SubhikshaSf4851 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Binary file added
BIN
+45.7 KB
...ests/TestCases.Android.Tests/snapshots/android/Issue32984PickerShouldResize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| namespace Maui.Controls.Sample.Issues; | ||
|
|
||
| [Issue(IssueTracker.Github, "32984", "Picker on resize not working on Windows", PlatformAffected.UWP)] | ||
| public class Issue32984 : ContentPage | ||
| { | ||
| public Issue32984() | ||
| { | ||
| VerticalStackLayout layout = new VerticalStackLayout | ||
| { | ||
| WidthRequest = 600 | ||
| }; | ||
|
|
||
| Picker issue32984Picker = new Picker | ||
| { | ||
| AutomationId = "issue32984Picker", | ||
| Title = "Select an item", | ||
| HorizontalOptions = LayoutOptions.Fill, | ||
| ItemsSource = new List<string> { "Item1", "Item2", "Item3" } | ||
| }; | ||
|
|
||
| Button button = new Button | ||
| { | ||
| AutomationId = "issue32984Button", | ||
| Text = "Click me", | ||
| HorizontalOptions = LayoutOptions.Fill | ||
| }; | ||
|
|
||
| button.Clicked += (s, e) => { layout.WidthRequest = 200; }; | ||
|
|
||
| layout.Children.Add(issue32984Picker); | ||
| layout.Children.Add(button); | ||
|
|
||
| Content = layout; | ||
| } | ||
| } |
Binary file added
BIN
+18.8 KB
...ntrols/tests/TestCases.Mac.Tests/snapshots/mac/Issue32984PickerShouldResize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions
35
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32984.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
|
|
||
| public class Issue32984 : _IssuesUITest | ||
| { | ||
| public Issue32984(TestDevice device) | ||
| : base(device) | ||
| { | ||
| } | ||
|
|
||
| public override string Issue => "Picker on resize not working on Windows"; | ||
|
|
||
| [Test] | ||
| [Category(UITestCategories.Picker)] | ||
| public void Issue32984PickerShouldResize() | ||
| { | ||
| App.WaitForElement("issue32984Button"); | ||
| App.Tap("issue32984Picker"); | ||
| #if ANDROID | ||
| App.WaitForElement("Cancel"); | ||
| App.Tap("Cancel"); | ||
| #elif IOS || MACCATALYST | ||
| App.WaitForElement("Done"); | ||
| App.Tap("Done"); | ||
| #elif WINDOWS | ||
| App.TapCoordinates(10, 10); | ||
| #endif | ||
| App.Tap("issue32984Button"); | ||
| App.Tap("issue32984Picker"); | ||
| VerifyScreenshot(); | ||
| } | ||
| } | ||
Binary file added
BIN
+8.56 KB
.../tests/TestCases.WinUI.Tests/snapshots/windows/Issue32984PickerShouldResize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+48.2 KB
...ols/tests/TestCases.iOS.Tests/snapshots/ios-26/Issue32984PickerShouldResize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.