Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Shell.TitleView no longer displays a title view on a ContentPage #13310

Closed
eddieyanez opened this issue Jan 6, 2021 · 12 comments · Fixed by #13319
Closed

[Bug] Shell.TitleView no longer displays a title view on a ContentPage #13310

eddieyanez opened this issue Jan 6, 2021 · 12 comments · Fixed by #13319
Labels
blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. p/iOS 🍎 t/bug 🐛
Milestone

Comments

@eddieyanez
Copy link

Description

Since the update to Xamarin.Forms 5, the TitleView has disappeared

Steps to Reproduce

  1. Add Nuget package 5.0.0.1874
  2. Inside
<ContentPage ...  />

add:

    <Shell.TitleView>
        <Label Text="Something"
               HorizontalOptions="StartAndExpand"
               VerticalOptions="StartAndExpand"
               HeightRequest="40"
               WidthRequest="100"
               BackgroundColor="Red"
               TextColor="White"
               />
    </Shell.TitleView>

Expected Behaviour

Simulator Screen Shot - iPhone 12 Pro - 2021-01-06 at 14 02 21

Works on 4.8.0.18.21.

Actual Behavior

Simulator Screen Shot - iPhone 12 Pro - 2021-01-06 at 14 06 10

Does not work on 5.0.0.1874.

Basic Information

  • Version with issue:
  • Last known good version: 4.8.0.18.21
  • Platform Target Frameworks:
    • iOS: Latest
    • Android: Not tried
  • Android Support Library / AndroidX Version: Not tried
  • NuGet Packages: Xamarin.Forms
  • Affected Devices: Simulator

Environment

Show/Hide Visual Studio info
=== Visual Studio Community 2019 for Mac ===

Version 8.8.4 (build 30)
Installation UUID: c3a0e221-47dc-43d0-8307-4a48c218643f
	GTK+ 2.24.23 (Raleigh theme)
	Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

	Package version: 612000113

=== Mono Framework MDK ===

Runtime:
	Mono 6.12.0.113 (2020-02/4fdfb5b1fd5) (64-bit)
	Package version: 612000113

=== Roslyn (Language Service) ===

3.8.0-5.20519.18+4c195c3ac1974edcefa76774d7a59a2350ec55fa

=== NuGet ===

Version: 5.8.0.6860

=== .NET Core SDK ===

SDK: /usr/local/share/dotnet/sdk/5.0.101/Sdks
SDK Versions:
	5.0.101
	3.1.404
MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	5.0.1
	3.1.10

=== .NET Core 3.1 SDK ===

SDK: 3.1.404

=== Xamarin.Profiler ===

Version: 1.6.15.68
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Apple Developer Tools ===

Xcode 12.3 (17715)
Build 12C33

=== Xamarin.Mac ===

Version: 7.0.0.15 (Visual Studio Community)
Hash: 87a1b18d8
Branch: d16-8
Build date: 2020-11-16 21:39:40-0500

=== Xamarin.iOS ===

Version: 14.6.0.15 (Visual Studio Community)
Hash: 87a1b18d8
Branch: d16-8
Build date: 2020-11-16 21:39:41-0500

=== Xamarin Designer ===

Version: 16.8.0.510
Hash: 44e3f3ce9
Branch: remotes/origin/d16-8
Build date: 2020-12-10 00:06:14 UTC

=== Xamarin.Android ===

Version: 11.1.0.17 (Visual Studio Community)
Commit: xamarin-android/d16-8/c0e2b8e
Android SDK: /Users/eddieyanez/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		None installed

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 30.0.4
SDK Build Tools Version: 29.0.3

Build Information: 
Mono: be2226b
Java.Interop: xamarin/java.interop/d16-8@79d9533
ProGuard: Guardsquare/proguard/proguard6.2.2@ebe9000
SQLite: xamarin/sqlite/3.32.1@1a3276b
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-8@2fb1cbc

=== Microsoft OpenJDK for Mobile ===

Java SDK: /Users/eddieyanez/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 16.8.0.32
Hash: 01a7774
Branch: remotes/origin/d16-8
Build date: 2020-12-10 00:32:24 UTC

=== Android Device Manager ===

Version: 16.8.0.46
Hash: 0a81419
Branch: remotes/origin/d16-8
Build date: 2020-12-10 00:32:44 UTC

=== Build Information ===

Release ID: 808040030
Git revision: eaa21a8983aa5c4bcf6a665892478b4f3d413418
Build date: 2020-12-10 11:06:12-05
Build branch: release-8.8
Xamarin extensions: eaa21a8983aa5c4bcf6a665892478b4f3d413418

=== Operating System ===

Mac OS X 10.16.0
Darwin 20.2.0 Darwin Kernel Version 20.2.0
    Wed Dec  2 20:39:59 PST 2020
    root:xnu-7195.60.75~1/RELEASE_X86_64 x86_64

=== Enabled user installed extensions ===

MFractor 4.4.6


Build Logs

Screenshots

As above.

Reproduction Link

As above.

Workaround

No.

@eddieyanez eddieyanez added s/unverified New report that has yet to be verified t/bug 🐛 labels Jan 6, 2021
@rachelkang
Copy link
Contributor

Hi, @eddieyanez - thank you for sharing! I tried to reproduce this issue, but unfortunately wasn't able to.

Would you mind sharing your project or a sample project that reproduces the issue? Or if it's easier, could you edit this project?
Issue13310.zip Thanks :)

This is what I see on 5.0.0.1874:
Simulator Screen Shot - iPod touch (7th generation) - 2021-01-06 at 12 26 40

@rachelkang rachelkang added s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. labels Jan 6, 2021
@rachelkang
Copy link
Contributor

rachelkang commented Jan 6, 2021

@eddieyanez Could you try running on Android and let us know how similar/different the behavior is?
Seems like this might be related to #13306

@eddieyanez
Copy link
Author

Hey, absolutely. Give me an hour or so and I’ll let you know. I’ll try with a new project + yours too. Thanks for looking into this so quickly.

@eddieyanez
Copy link
Author

@eddieyanez Could you try running on Android and let us know how similar/different the behavior is?
Seems like this might be related to #13306

Works on Android. I'll try your project next.

Screenshot 2021-01-06 at 19 05 04

@eddieyanez
Copy link
Author

I've tried your project and it works fine on Android, but not on iOS.

Let me know if there's anything else I can do to help investigate.

Screenshot 2021-01-06 at 19 12 35

Screenshot 2021-01-06 at 19 13 35

@PureWeen
Copy link
Contributor

PureWeen commented Jan 6, 2021

@eddieyanez @rachelkang This looks like it's a "notch" specific bug

I tested on iPhone SE and it works fine
iPhone 12 it does not work fine

@PureWeen PureWeen removed s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. s/unverified New report that has yet to be verified labels Jan 6, 2021
@PureWeen PureWeen added this to the 5.0.0 milestone Jan 6, 2021
@PureWeen PureWeen added the blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. label Jan 6, 2021
@elicul
Copy link

elicul commented Jan 13, 2021

Is there any workaround for this issue?

@eddieyanez
Copy link
Author

Is there any workaround for this issue?

Not that I’m aware of, sadly.

rmarinho pushed a commit that referenced this issue Jan 15, 2021
* Fix margin on Shell.TitleView

* - fix ui test
@fhintsch
Copy link

Must go back to Forms 4! Annoying.

@douglassimaodev
Copy link

douglassimaodev commented Jul 2, 2021

How can I get the current title style to apply in Shell.TitleView? I noticed when I use it and add a label to display the title, it is not possible to replicate the titles style from the other pages, how to get the current title font size, color, and font family?

<Shell.TitleView>
<StackLayout Orientation="Horizontal">
        <Label VerticalOptions="Center" 
                   FontSize="**HOW_DO_I_GET_THE_DEVICE_CURRENT_FONT_SIZE?**"
                   FontFamily="**HOW_DO_I_GET_THE_DEVICE_CURRENT_FONT_FAMILY?**"                   
                   Text="My Title"></Label>
        <Button Margin="10,10,0,10" Padding="0,0,0,5"  CornerRadius="10" 
                    BackgroundColor="Orange" 
                    HorizontalOptions="End" 
                    TextTransform="None"  
                    Text="Go"  
                    Command="{Binding NextCommand}" />
    </StackLayout>
</Shell.TitleView>

@SakthivelCapgemini
Copy link

Why we have margin in both left and right side, when use Shell.Titleview

@SakthivelCapgemini
Copy link

This occurs only when i disabling the flyout Behavior feature

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. p/iOS 🍎 t/bug 🐛
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants