-
Notifications
You must be signed in to change notification settings - Fork 730
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
[IOS16] CommandBar
title shortened to one letter + ... instead of full title.
#10207
Comments
I tried building the app on the latest pre-release, but I would get this error: 1> MSBUILD : error : Generation failed: System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Generation failed for Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator. System.NullReferenceException: Object reference not set to an instance of an object. |
For the latest pre-release you'll need to the latest uno-sourcegeneration tasks as well. Is the package installed explicitly in your app ? |
Apparently, yes. I will update it |
Also, can you try with iOS 16.1? I recall there was an issue with UINavigation and iOS 16, but I can't find the link anymore. |
I don't have access to an IOS 16.1 device/simulator. Is it easy to install one? |
now, even thought I get another error message when I try to build on the simulator even thought I put |
Can you tell what does not work? Are there errors ? Also, it's likely that you already have an MtouchExtraArgs entry in the file below. |
Yeah, you are correct, there was another MtouchExtraArgs entry below that. When I built it after that, it remained stuck in the splashscreen. So, I closed the app and reopened it and it closed itself almost instantly. I'm not sure if that's the navigation bug you were referring to? Actually, it was an exception I somehow missed, and the problem was the mergedDictionnary was not created when building the app. Now, I am building it again because I forgot to check the build/debugging logs. It might take a bit of time because it takes a while to build. |
So, I can confirm this bug also happens on the latest pre-release 4.6.0-dev.772 |
IOSNavBarTitle16.zip There's no ... in the title, but the root problem, which is that there's not enough space for a reasonable title to display is still very obviously there. |
CommandBar
title shortened to one letter + ... instead of full title.
Current behavior
On IOS 16, on pages where there is a (single) in the commandbar, the title is shortened to one letter + ...
example: Orders being shortened to O...
Expected behavior
I would expect the title to be fully shown, just like on previous IOS versions.
How to reproduce it (as minimally and precisely as possible)
IOSNavBarTitle16.zip
In a certain app, which uses NativeDefaultCommandBar, any page with a commandbar like this one has this issue with IOS 16. I am working right now on making a sample
Workaround
So far, I found 2:
1: If you put
<AppBarButton/>
(just like that, empty), above the real AppBarButton with an icon, it gives more space to the title.If you do it several times, it gives enough space for the whole title to show. I do not understand why it works.
2: You can also set the grid, which contains the title, to horizontalAlignment=Stretch, and then add some margin to manually center the title.
Works on UWP/WinUI
Yes
Environment
Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia
NuGet package version(s)
<PackageReference Include="Microsoft.UI.Xaml" Version="2.6.0-prerelease.210623001" /> <PackageReference Include="Serilog.Sinks.Xamarin" Version="0.1.37" /> <PackageReference Include="System.Memory" Version="4.5.4" /> <PackageReference Include="Uno.Microsoft.Toolkit.Uwp.DeveloperTools" Version="7.1.10" /> <PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI.Controls" Version="7.1.10" /> <PackageReference Include="Uno.Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.3.0-uno.12" /> <PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.5.14" /> <PackageReference Include="Uno.UI.RemoteControl" Version="4.5.14" /> <PackageReference Include="Uno.XamlMerge.Task">
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="6.0.0" /> <PackageReference Include="Uno.CodeGen" Version="2.0.0-dev.10" /> <PackageReference Include="Uno.Injectable" Version="2.0.0-dev.10" /> <PackageReference Include="Uno.Material" Version="2.0.0-dev.179" /> <PackageReference Include="Uno.SourceGenerationTasks" Version="4.1.0" /> <PackageReference Include="Uno.Toolkit.UI" Version="1.3.0-dev.11" /> <PackageReference Include="Uno.Toolkit.UI.Material" Version="1.3.0-dev.11" /> <PackageReference Include="Uno.UI" Version="4.5.14" /> <PackageReference Include="Xamarin.Essentials.Interfaces" Version="1.7.3.1" />
Affected platforms
iOS
IDE
Visual Studio 2022
IDE version
17.3.6
Relevant plugins
No response
Anything else we need to know?
I am working on making a sample.
The text was updated successfully, but these errors were encountered: