Skip to content
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

[net8.0] Merge main to net8.0 #22219

Merged
merged 55 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
7f85d2a
[iOS] Fix crash closing Popup with WebView (#21718)
jsuarezruiz Apr 15, 2024
f99ab4b
Update dependencies from https://github.com/dotnet/xharness build 202…
dotnet-maestro[bot] Apr 16, 2024
e2dd6a4
[Android] Fix crash navigating back (#20420)
jsuarezruiz Apr 16, 2024
a7aeade
[XC] Fix x:DataType resolution for BindingContext (#21454)
simonrozsival Apr 16, 2024
df8aa54
[X] Fix TargetType simplification bug (#21764)
simonrozsival Apr 16, 2024
d6a3c50
fix: Use AppContext.BaseDirectory instead of Environment.CurrentDirec…
PreciousNyasulu Apr 17, 2024
3006205
Remove 2nd webview2 used to add `base` tag to passed html
Apr 17, 2024
c0f393a
Revert script to OG version
Apr 17, 2024
d3335ad
[ios/catalyst] fix memory leak with CollectionView (#21850)
jonathanpeppers Apr 18, 2024
8e4450c
[tests] add `SourceGen.UnitTests` to CI (#21889)
jonathanpeppers Apr 18, 2024
9fd58d7
[C] Propagate resources when reparenting (#21879)
StephaneDelcroix Apr 18, 2024
94d4aa2
[iOS] Fix crash closing Popup with WebView (#21923)
PureWeen Apr 18, 2024
345bb16
Update locker.yml (#21894)
RussKie Apr 18, 2024
6487271
do not scroll if the view is in the navbar (#21806)
tj-devel709 Apr 18, 2024
e94eec6
Merge branch 'release/8.0.1xx-sr4' into merge_sr4
PureWeen Apr 18, 2024
ebd35ca
[main] Merge SR4 to main (#21936)
PureWeen Apr 19, 2024
1d635bb
[windows] less interops in calling `get_Children` (#21792)
MartyIX Apr 19, 2024
4cfdc90
[controls] fix leak in ImageSource, caused by Task that never complet…
jonathanpeppers Apr 19, 2024
f73fcc6
More IndexOf() optimization (#20083)
symbiogenesis Apr 19, 2024
b0e562e
Go back to ignoring ExpectingPageNotToBreak (#21940)
PureWeen Apr 19, 2024
be17057
[ios/catalyst] fix memory leak in gestures (#21887)
jonathanpeppers Apr 20, 2024
632080a
Setup scaffolding for legacy test runner (#21423)
jsuarezruiz Apr 22, 2024
7ba723c
[WinUI] `GesturePlatformManager.Windows.cs` - unused variable (#21953)
MartyIX Apr 22, 2024
86e22dd
IndexOf() stackOverflow fix (#20083) (#21965)
kubaflo Apr 22, 2024
143550b
Add visual test for webview2 on windows
Apr 22, 2024
3f9472b
add EnumerableTests (#21978)
symbiogenesis Apr 22, 2024
994117b
Re-generate template localization (#21988)
mattleibow Apr 23, 2024
17b05bc
Add s/triaged label for issues opened by (core) team (#22006)
jfversluis Apr 23, 2024
440fa7f
[Windows] Remove 2nd WebView used to add `base` tag when using HtmlWe…
PureWeen Apr 23, 2024
c1912df
Add latest .NET9 and .NET8 (#22034)
PureWeen Apr 24, 2024
a0abfd0
[iOS] Add UITest for #21806 (#21951)
tj-devel709 Apr 24, 2024
d92bebd
[ios/catalyst] fix memory leaks in ListView (#22007)
jonathanpeppers Apr 24, 2024
abada83
[UI Testing] Split mouse and touch Appium actions and added pending o…
jsuarezruiz Apr 25, 2024
c1aabfe
[Windows] Use correct build version check (#22013)
Foda Apr 25, 2024
218a9de
Navigate Directly to Test (#22019)
PureWeen Apr 25, 2024
adbc760
Fix main (#22065)
mattleibow Apr 26, 2024
409c620
[iOS] Implemented PrefersHomeIndicatorAutoHidden, PrefersStatusBarHid…
kubaflo Apr 26, 2024
70c2903
Reenabled ReturnsNonEmptyNativeBoundingBox tests on Windows (#20238)
jsuarezruiz Apr 26, 2024
63eb6b6
[iOS] Allow compat iOS buttons to resize image and to respect spacing…
tj-devel709 Apr 26, 2024
7a37ebf
Fix null reference exception in KeyboardAutoManagerScroll when UIWind…
Axemasta Apr 26, 2024
0117681
Fix screenshot for 18242 for new test behavior (#22081)
PureWeen Apr 26, 2024
48d5ebf
[android] use Java primitive `boolean` for `UriImageSource` (#22040)
jonathanpeppers Apr 27, 2024
944f085
Fix (#22033)
MartyIX Apr 27, 2024
6654fac
fix CA1864 (#22092)
symbiogenesis Apr 27, 2024
e33d176
Improve error logging for failed resizetizering (#22064)
mattleibow Apr 28, 2024
8a54162
[UI Testing] Implement PressEnter method (#22112)
jsuarezruiz Apr 29, 2024
6328b76
Fix TabbedPage title displaying incorrectly (#17039)
Adam-- Apr 29, 2024
7d9fb20
Update dependencies from https://github.com/dotnet/xharness build 202…
dotnet-maestro[bot] Apr 30, 2024
05e72cf
[Android] Crash removing item from CarouselView - fix (#22107)
kubaflo May 1, 2024
a2f1a89
[iOS] Shell page title fix (#20575)
kubaflo May 1, 2024
ab80939
Add VS Code Extension to move-to-vs-feedback label (#22152)
jfversluis May 1, 2024
ff5f3f0
Android mipmap/appicon failing with "APT2260" (#21838)
dellis1972 May 2, 2024
2fc4774
Create similarIssues.yml (#22170)
craigloewen-msft May 2, 2024
222ca3c
Support manual triggering of similar issues (#22176)
mattleibow May 2, 2024
b119c08
Merge branch 'main' into merge-main-net80
rmarinho May 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix TabbedPage title displaying incorrectly (#17039)
* Fix TabbedPage title displaying incorrectly

Presently, when a navigation page is created and a tabbed page is added to it with children, the navigation page uses the tabbed page's selected child title as its title. This behavior is unexpected when using standard tabs (tabs on the top) in a navigation page on Android.

Without a custom tabbed page, this behavior makes sense, especially for bottom tabs; however, when a custom tabbed page is defined, it seems that the title should not be overridden.

Fixes #8577

* Add device tests

* Add unit tests

* Updated test

* More tests

* Fixed test not being able to fail

* Changed GetTitle to work with more than just TabbedPages

* Removed tests that deal with Child page titles replacing the Toolbar title

---------

Co-authored-by: Javier Suárez <javiersuarezruiz@hotmail.com>
Co-authored-by: Dustin Wojciechowski <dustin.wojciechowski@microsoft.com>
Co-authored-by: Dustin Wojciechowski <dustinwo@microsoft.com>
  • Loading branch information
4 people authored Apr 29, 2024
commit 6328b76174302f2829980e2825cab5444854c6b6
15 changes: 12 additions & 3 deletions src/Controls/src/Core/NavigationPage/NavigationPageToolbar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ void UpdateBackButton()

// Once we have better logic inside core to handle backbutton visiblity this
// code should all go away.
// Windows currently doesn't have logic in core to handle back button visibility
// Windows currently doesn't have logic in core to handle back button visibility
// Android just handles it as part of core which means you get cool animations
// that we don't want to interrupt here.
// that we don't want to interrupt here.
// Once it's all built into core we can remove this code and simplify visibility logic
if (_currentPage.IsSet(NavigationPage.HasBackButtonProperty))
{
Expand Down Expand Up @@ -273,7 +273,16 @@ void OnPropertyChanged(object sender, System.ComponentModel.PropertyChangedEvent

Color GetBarTextColor() => _currentNavigationPage?.BarTextColor;
Color GetIconColor() => (_currentPage != null) ? NavigationPage.GetIconColor(_currentPage) : null;
string GetTitle() => GetTitleView() != null ? String.Empty : _currentPage?.Title;

string GetTitle()
{
if (GetTitleView() != null)
{
return string.Empty;
}

return _currentNavigationPage?.CurrentPage?.Title;
}

VisualElement GetTitleView()
{
Expand Down
16 changes: 16 additions & 0 deletions src/Controls/tests/Core.UnitTests/ToolbarTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@ public async Task TitleAndTitleViewAreMutuallyExclusive()
Assert.Equal("Test Title", toolbar.Title);
}

[Fact]
public void ToolbarTitle_UsesTabbedPageTitleWhenSet()
{
var window = new TestWindow();
IToolbarElement toolbarElement = window;
var tabbedPage = new TabbedPage
{
Title = "Test Title",
Children = { new ContentPage { Title = "Child Test Title" } },
};
window.Page = new NavigationPage(tabbedPage);

var toolbar = (Toolbar)toolbarElement.Toolbar;
Assert.Equal(tabbedPage.Title, toolbar.Title);
}

[Fact]
public async Task InsertPageBeforeRootPageShowsBackButton()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#if IOS || MACCATALYST
using FlyoutViewHandler = Microsoft.Maui.Controls.Handlers.Compatibility.PhoneFlyoutPageRenderer;
using NavigationViewHandler = Microsoft.Maui.Controls.Handlers.Compatibility.NavigationRenderer;
using TabbedRenderer = Microsoft.Maui.Controls.Handlers.Compatibility.TabbedRenderer;
#endif

namespace Microsoft.Maui.DeviceTests
Expand All @@ -38,7 +39,11 @@ void SetupBuilder()
handlers.AddHandler(typeof(Controls.NavigationPage), typeof(NavigationViewHandler));
handlers.AddHandler<Page, PageHandler>();
handlers.AddHandler<Controls.Window, WindowHandlerStub>();
handlers.AddHandler(typeof(TabbedPage), typeof(TabbedViewHandler));
#if IOS || MACCATALYST
handlers.AddHandler(typeof(TabbedPage), typeof(TabbedRenderer));
#else
handlers.AddHandler(typeof(TabbedPage), typeof(TabbedViewHandler));
#endif

SetupShellHandlers(handlers);
});
Expand Down
Loading