-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[iOS] Use updated APIs for the button with images #20953
Closed
Closed
Changes from 14 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
e01061e
Move the iOS code and implement the changes for iOS15 plus.
tj-devel709 a0b1e73
more ios 15 plus api work
tj-devel709 c4af554
See if we need to resize the buttons in top and bottom placements
tj-devel709 f1bb457
Merge branch 'main' into dev/TJ/iOS18242
tj-devel709 fbb83a8
apply the correct image spacing
tj-devel709 62d01be
Merge remote-tracking branch 'origin/dev/TJ/iOS18242' into dev/TJ/iOS…
tj-devel709 d6e7f52
Adjust the padding code for 15 plus
tj-devel709 e9e4d2b
remove unused code
tj-devel709 331cb66
set the configs more consistently
tj-devel709 7d435fa
revert imagebutton changes and allow imagebutton to use deprecated ap…
tj-devel709 a0e0b0e
Add the resizing code for iOS 15 plus
tj-devel709 20f286a
move the UpdateContentLayout to the handler
tj-devel709 f80c0cb
Revert "Add the resizing code for iOS 15 plus"
tj-devel709 141c364
add a UITest with Screenshot
tj-devel709 bafa5c4
add ios and android images and change test conditional
tj-devel709 df9a1f6
remove windows from test and use core UpdateText
tj-devel709 2b6f230
ignore test on windows
tj-devel709 e70269c
- CS fixes
PureWeen 3297c57
- small fix
PureWeen e4eb827
character spacing and font mostly working
tj-devel709 07b157c
add the ios screenshot
tj-devel709 efed01c
add compatibility for ios 14 and below and do resizing for both
tj-devel709 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
There are no files selected for viewing
This file contains 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
This file contains 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
46 changes: 46 additions & 0 deletions
46
src/Controls/samples/Controls.Sample.UITests/Issues/Issue21394.xaml
This file contains 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,46 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Maui.Controls.Sample.Issues.Issue21394" | ||
Title="Issue21394"> | ||
<VerticalStackLayout> | ||
<Button Background="Lightgray" ContentLayout="Right, 20" ImageSource="dotnet_bot_resized.png" Text="Button Title" AutomationId="WaitForStubControl"/> | ||
<BoxView HeightRequest="5" /> | ||
|
||
<Button Background="Lightgray" ContentLayout="Top, 20" ImageSource="dotnet_bot_resized.png" Text="Button Title"/> | ||
<BoxView HeightRequest="5" /> | ||
|
||
<Button Background="Lightgray" ContentLayout="Left, 20" ImageSource="dotnet_bot_resized.png" Text="Button Title"/> | ||
<BoxView HeightRequest="5" /> | ||
|
||
<Button Background="Lightgray" ContentLayout="Bottom, 20" ImageSource="dotnet_bot_resized.png" Text="Button Title"/> | ||
<BoxView HeightRequest="5" /> | ||
|
||
<Button Background="Lightgray" ContentLayout="20" ImageSource="dotnet_bot_resized.png" Text="Button Title"/> | ||
<BoxView HeightRequest="5" /> | ||
|
||
<Button Background="Lightgray" ContentLayout="Right, 0" ImageSource="dotnet_bot_resized.png" Text="Button Title"/> | ||
<BoxView HeightRequest="5" /> | ||
|
||
<Button Background="Lightgray" ContentLayout="Top, 20" ImageSource="dotnet_bot_resized.png" Text="Button Title"/> | ||
<BoxView HeightRequest="5" /> | ||
|
||
<Button Background="Lightgray" ContentLayout="Left, 30" ImageSource="dotnet_bot_resized.png" Text="Button Title"/> | ||
<BoxView HeightRequest="5" /> | ||
|
||
<Button Background="Lightgray" ContentLayout="Bottom, 0" ImageSource="dotnet_bot_resized.png" Text="Button Title"/> | ||
<BoxView HeightRequest="5" /> | ||
|
||
<Button Background="Lightgray" ContentLayout="Right, 10" ImageSource="dotnet_bot_resized.png" Text="Button Title" HeightRequest="60"/> | ||
<BoxView HeightRequest="5" /> | ||
|
||
<Button Background="Lightgray" ContentLayout="Top, 10" ImageSource="dotnet_bot_resized.png" Text="Button Title" HeightRequest="60"/> | ||
<BoxView HeightRequest="5" /> | ||
|
||
<Button Background="Lightgray" ContentLayout="Left, 10" ImageSource="dotnet_bot_resized.png" Text="Button Title" HeightRequest="60"/> | ||
<BoxView HeightRequest="5" /> | ||
|
||
<Button Background="Lightgray" ContentLayout="Bottom, 10" ImageSource="dotnet_bot_resized.png" Text="Button Title" HeightRequest="60"/> | ||
<BoxView HeightRequest="5" /> | ||
</VerticalStackLayout> | ||
</ContentPage> |
14 changes: 14 additions & 0 deletions
14
src/Controls/samples/Controls.Sample.UITests/Issues/Issue21394.xaml.cs
This file contains 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,14 @@ | ||
using Microsoft.Maui.Controls; | ||
using Microsoft.Maui.Controls.Xaml; | ||
|
||
namespace Maui.Controls.Sample.Issues; | ||
|
||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[Issue(IssueTracker.Github, 21394, "Buttons with Images layouts", PlatformAffected.iOS)] | ||
public partial class Issue21394 : ContentPage | ||
{ | ||
public Issue21394() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} |
694 changes: 694 additions & 0 deletions
694
...ontrols/samples/Controls.Sample.UITests/Resources/Images/dotnet_bot_resized.svg
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 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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,29 @@ | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.AppiumTests.Issues | ||
{ | ||
public class Issue21394 : _IssuesUITest | ||
{ | ||
public Issue21394(TestDevice device) | ||
: base(device) | ||
{ } | ||
|
||
public override string Issue => "Buttons with Images layouts"; | ||
|
||
[Test] | ||
public void Issue21394Test() | ||
{ | ||
this.Ignore(TestDevice.iOS, () => { | ||
if (!OperatingSystem.IsIOSVersionAtLeast(15)) | ||
return true; | ||
return false; | ||
}, "iOS 14 and below sizes button images differently."); | ||
|
||
App.WaitForElement("WaitForStubControl"); | ||
|
||
VerifyScreenshot(); | ||
} | ||
} | ||
} |
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 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
This file contains 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.
The snapshots for Android and Windows are pending.
![image](https://private-user-images.githubusercontent.com/6755973/316462856-2d50cf7d-6293-46c8-b44c-5ca708c2e768.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5OTA2ODgsIm5iZiI6MTczODk5MDM4OCwicGF0aCI6Ii82NzU1OTczLzMxNjQ2Mjg1Ni0yZDUwY2Y3ZC02MjkzLTQ2YzgtYjQ0Yy01Y2E3MDhjMmU3NjgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDhUMDQ1MzA4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZTNjMDlhZTc3NWFkNjIxNmJiOGZhNDJmYzA5MjgwODFiZmFkYTc2MGU1NTQwOWY2NTFhOTg2MjBkYmZkYTI4NSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.kHHL0N3hsVMXvkT2hucgrnWzJxTxFStuW9BOk8tqUOM)