-
Notifications
You must be signed in to change notification settings - Fork 2k
Hide FlyoutIcon when FlyoutBehavior set to disabled #20087
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
PureWeen
merged 8 commits into
dotnet:main
from
kubaflo:flyoutIcon-when-flyout-disabled-fix
Jul 17, 2024
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
87417f1
Hide FlyoutIcon when FlyoutBehavior set to disabled (#9037)
kubaflo 3aa222f
Added a UITest
kubaflo 4ca55a4
Revert "Hide FlyoutIcon when FlyoutBehavior set to disabled (#9037)"
kubaflo 203df93
Fixes
kubaflo 13dc911
Update Issue20166.cs
kubaflo 8c245bd
Added pending snapshots
jsuarezruiz c9ebc82
Added a test category
kubaflo 045f2f4
Renamed test
kubaflo 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 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
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
Binary file added
BIN
+22.1 KB
...ts/android/ShouldHideCustomFlyoutIconWhenNavigatingToPageWithDisabledFlyout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions
16
src/Controls/tests/TestCases.HostApp/Issues/Issue20166.xaml
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,16 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <Shell xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
| xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
| x:Class="Maui.Controls.Sample.Issues.Issue20166" | ||
| FlyoutIcon="groceries.png"> | ||
| <FlyoutItem> | ||
| <ShellContent Title="Page 1"> | ||
| <ContentPage Shell.FlyoutBehavior="Flyout"> | ||
| <Button Text="Switch to page 2" AutomationId="button1" Clicked="Button1_Clicked"/> | ||
| </ContentPage> | ||
| </ShellContent> | ||
| <ShellContent x:Name="shellTab2" Title="Page 2"> | ||
| <ContentPage Shell.FlyoutBehavior="Disabled"/> | ||
| </ShellContent> | ||
| </FlyoutItem> | ||
| </Shell> |
24 changes: 24 additions & 0 deletions
24
src/Controls/tests/TestCases.HostApp/Issues/Issue20166.xaml.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,24 @@ | ||
| using System; | ||
| using System.ComponentModel; | ||
| using Microsoft.Maui.Controls; | ||
| using Microsoft.Maui.Controls.Xaml; | ||
|
|
||
| namespace Maui.Controls.Sample.Issues | ||
| { | ||
| [XamlCompilation(XamlCompilationOptions.Compile)] | ||
| [Issue(IssueTracker.Github, 20166, "Custom FlyoutIcon visible although FlyoutBehavior set to disabled", PlatformAffected.Android | PlatformAffected.iOS)] | ||
| public partial class Issue20166 : Shell | ||
| { | ||
| public Issue20166() | ||
| { | ||
| InitializeComponent(); | ||
| } | ||
|
|
||
| void Button1_Clicked(System.Object sender, System.EventArgs e) | ||
| { | ||
| CurrentItem = shellTab2; | ||
| Current.FlyoutIcon = String.Empty; | ||
| } | ||
|
|
||
| } | ||
| } |
24 changes: 24 additions & 0 deletions
24
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue20166.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,24 @@ | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
| public class Issue20166 : _IssuesUITest | ||
| { | ||
| public Issue20166(TestDevice device) | ||
| : base(device) { } | ||
|
|
||
| public override string Issue => "Custom FlyoutIcon visible although FlyoutBehavior set to disabled"; | ||
|
|
||
| [Test] | ||
| [Category(UITestCategories.FlyoutPage)] | ||
| public void ShouldHideCustomFlyoutIconWhenNavigatingToPageWithDisabledFlyout() | ||
| { | ||
| // Click button 1 to switch to the page with disabled flyout | ||
| _ = App.WaitForElement("button1"); | ||
| App.Click("button1"); | ||
|
|
||
| // 2. Verify that the flyout icon is not rendered. | ||
| VerifyScreenshot(); | ||
| } | ||
| } | ||
Binary file added
BIN
+7.52 KB
...ts/windows/ShouldHideCustomFlyoutIconWhenNavigatingToPageWithDisabledFlyout.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
+22 KB
...pshots/ios/ShouldHideCustomFlyoutIconWhenNavigatingToPageWithDisabledFlyout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.