maui icon indicating copy to clipboard operation
maui copied to clipboard

Shell TitleView not reliable

Open williambuchanan2 opened this issue 1 year ago • 9 comments

Description

If you add content to a Shell.TitleView it sometimes (50%) doesn't display.

E.g.

<Shell.TitleView>
    <Image Source="edit.png" Aspect="AspectFit" HorizontalOptions="Start" VerticalOptions="Center" />
</Shell.TitleView>

As you navigate around, it will sometimes display ok and other times it won't show. It is random - even on the same page it will sometimes show or not show.

On iOS it is even worst - it just doesn't show at all.

Here it is working on page 1:

image

Here it is not working on page 2:

image

Back on page 2 and now it shows: image

Steps to Reproduce

Open app from repo below. Notice icon appears on top of page Switch to other tabs and notice it disappears occsaionally. Notice that switching back to tabs which didn't show the icon sometimes show it, and vice versa. In this app it seems to be every alternate click it switches, so to see the problem on page 2, follow this sequence:

  • Page 2 - not showing
  • Page 3 - showing
  • Tab 2 - Not showing
  • Page 2 - showing

Link to public reproduction project repository

https://github.com/williambuchanan2/MauiShell

Version with bug

7.0.86

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

Android 11 - 13, iOS 16

Did you find any workaround?

No

Relevant log output

No response

williambuchanan2 avatar Jul 06 '23 04:07 williambuchanan2

I'm facing a similar issue. If I navigate back and forth, some elements disappear from the Shell TitleView.

BrianEnee avatar Jul 06 '23 14:07 BrianEnee

Hi, I described the bug also here: [https://github.com/dotnet/maui/issues/13916]. I've been waitig for 2 months now with my updated app to .Net MAUI, but with this bug it is not possible. :-(

Grzesik avatar Jul 10 '23 13:07 Grzesik

Unfortunately there are a lot of more critical issues which have been reported over 2 years ago that haven't been addressed, so my only advice is look for a workaround because not much is getting fixed in Maui.

williambuchanan2 avatar Jul 11 '23 00:07 williambuchanan2

On iOS there's also a delay when using shell in showing the title. The animation first loads all the content and then updates the title of the page with a delay of approximately 500ms

UkeHa avatar Jul 25 '23 10:07 UkeHa

@williambuchanan2 The reproduction project doesn't build for me. Do you have a simpler sample? Thanks!

samhouts avatar Sep 13 '23 21:09 samhouts

Hi @williambuchanan2. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost avatar Sep 13 '23 21:09 ghost

I have updated the project. Can you pull the changes down and see if it builds now? The project is already a simple sample - there isn't much code in there. If you have problems building again can you let me know what error you are getting? Thanks

williambuchanan2 avatar Sep 14 '23 00:09 williambuchanan2

Im also experiencing this issue - on both iOS and android..there is definitely issues around shell.title view when you have shell tabs (in my case I have bottom and top tabs)

michaelonz avatar Sep 26 '23 23:09 michaelonz

Facing the same issue. We need a fix

SliemBeji-FBC avatar Nov 03 '23 09:11 SliemBeji-FBC

Verified this issue with Visual Studio Enterprise 17.9.0 Preview 4. Can repro on android and iOS platforms with sample project. https://github.com/williambuchanan2/MauiShell

Zhanglirong-Winnie avatar Jan 30 '24 06:01 Zhanglirong-Winnie

It's 2024 and it's still hard to understand these strange mistakes of the maui platform. The imagebuttons I put in Shell.TitleView on the Android platform work correctly, but not on iOS. When I change the theme of the app from dark to light, the buttons appear. It is very strange.

omer-ays avatar Jun 06 '24 06:06 omer-ays

@omer-ays - are you changing the icon color based on theme? (Are you sure you don't have a dark icon on a dark background or vica versa.) I have icons working in my app for light and dark themes.

michaelonz avatar Jun 06 '24 06:06 michaelonz

@omer-ays - are you changing the icon color based on theme? (Are you sure you don't have a dark icon on a dark background or vica versa.) I have icons working in my app for light and dark themes.

interestingly it started working smoothly. Strange.

omer-ays avatar Jun 13 '24 05:06 omer-ays