-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS & Mac] Fixed IndicatorView Size doesnt update dynamically #31129
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
7 commits
Select commit
Hold shift + click to select a range
37f3727
[iOS , Mac] Fix for Indicator size not updated dynamically
SubhikshaSf4851 9df9f94
Fixed updating default size
SubhikshaSf4851 681bc8f
Test sample for indicator view
SubhikshaSf4851 3a655c5
Fixed using invalidateMeasure
SubhikshaSf4851 a32eba7
Updated unnecessary changes
SubhikshaSf4851 3f5f828
Updates Snapshots for android mac and ios
SubhikshaSf4851 489c244
Updated windows snapshot
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
+35.4 KB
...droid.Tests/snapshots/android/Issue31064IndicatorViewSizeUpdatesDynamically.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,54 @@ | ||
| namespace Controls.TestCases.HostApp.Issues; | ||
|
|
||
| [Issue(IssueTracker.Github, "31064", "Indicator view size should update dynamically", PlatformAffected.iOS)] | ||
|
|
||
| public class Issue31064 : ContentPage | ||
| { | ||
| IndicatorView _indicator; | ||
|
|
||
| public Issue31064() | ||
| { | ||
| var carousel = new CarouselView | ||
| { | ||
| ItemsSource = new[] { "Item 1", "Item 2", "Item 3" }, | ||
| HeightRequest = 250, | ||
| HorizontalScrollBarVisibility = ScrollBarVisibility.Never, | ||
| }; | ||
|
|
||
| _indicator = new IndicatorView | ||
| { | ||
| HorizontalOptions = LayoutOptions.Center | ||
| }; | ||
|
|
||
| carousel.IndicatorView = _indicator; | ||
|
|
||
| var button = new Button | ||
| { | ||
| AutomationId = "Issue31064Button", | ||
| Text = "Increase Indicator Size", | ||
| HorizontalOptions = LayoutOptions.Center | ||
| }; | ||
| button.Clicked += (s, e) => | ||
| { | ||
| _indicator.IndicatorSize = 20; | ||
| }; | ||
|
|
||
| Content = new VerticalStackLayout | ||
| { | ||
| Spacing = 20, | ||
| Padding = 20, | ||
| Children = | ||
| { | ||
| new Label | ||
| { | ||
| HorizontalOptions = LayoutOptions.Center, | ||
| VerticalOptions = LayoutOptions.Center, | ||
| Text = "Test passes if IndicatorView size updates dynamically" | ||
| }, | ||
| carousel, | ||
| _indicator, | ||
| button | ||
| } | ||
| }; | ||
| } | ||
| } |
Binary file added
BIN
+16.5 KB
...Cases.Mac.Tests/snapshots/mac/Issue31064IndicatorViewSizeUpdatesDynamically.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue31064.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,23 @@ | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
|
|
||
| public class Issue31064 : _IssuesUITest | ||
| { | ||
| public Issue31064(TestDevice testDevice) : base(testDevice) | ||
| { | ||
| } | ||
|
|
||
| public override string Issue => "Indicator view size should update dynamically"; | ||
|
|
||
| [Test] | ||
| [Category(UITestCategories.IndicatorView)] | ||
| public void Issue31064IndicatorViewSizeUpdatesDynamically() | ||
| { | ||
| App.WaitForElement("Issue31064Button"); | ||
| App.Tap("Issue31064Button"); | ||
| VerifyScreenshot(); | ||
| } | ||
| } | ||
Binary file added
BIN
+9.98 KB
...WinUI.Tests/snapshots/windows/Issue31064IndicatorViewSizeUpdatesDynamically.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
+43.5 KB
...Cases.iOS.Tests/snapshots/ios/Issue31064IndicatorViewSizeUpdatesDynamically.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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending snapshot on Windows:

Could you commit it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsuarezruiz I have committed the snapshot