-
Notifications
You must be signed in to change notification settings - Fork 720
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
MUX DropDownButton/SplitButton/ToggleSplitButton Don't Show Chevron Glyph #6638
Comments
Adding the missing glyph in https://github.com/unoplatform/uno.fonts is likely the way to fix this.
|
My assumption was the glyph was the same as is used in the ComboBox. However, I couldn't find the ComboBox style when I first looked (very quickly). For my own custom controls, I use the newer 0xE70D Unicode point which Uno includes in the default symbol font. The easiest would be to switch to this newer Unicode point as nearly all chevrons are the same. That would make it a XAML-only change but then any style updates from upstream would clear the change again. |
Here's the glyph used for combobox:
It's probably already modified somehow from the original version. We'll certainly need to readjust for the new WinUI 2.6 styles in #6374. |
Thanks for pointing me to the style. Both DropDownButton and ComboBox are using the same Unicode point. Reguardless, this proves it isnt a font issue. I'm going to try a few other things but someone hopefully can confirm they see the same issue. This may be a strange case on my end. |
I reproduced this issue with a brand-new, empty app so it's isn't something caused as a secondary issue. It really confuses me:
It's like the DropDownButton style can't find the SymbolThemeFontFamily resource. DropDownButton: uno/src/Uno.UI/UI/Xaml/Controls/DropDownButton/DropDownButton.xaml Lines 110 to 119 in e70c724
ComboBox: uno/src/Uno.UI/UI/Xaml/Style/Generic/Generic.xaml Lines 723 to 746 in 3bff347
|
@davidjohnoliver does this sound familiar ? |
Not really... I'm not sure what would be going wrong here. |
This affects MUX SplitButton and ToggleSplitButton as well, added to the description and title |
@robloo Which platform are you testing against? The glyph shows correctly for me in SamplesApp on Android. |
@Youssef1313 Thanks for taking a look. I've updated the environment section of the issue description adding more details. This is reproducible in a blank app. I never noticed this in the SamplesApp. |
@Youssef1313 I added a test application for this as well. See the issue description for the link. |
After spending the last 3 hours on this. I think I (partially) figured out things. (Looks a bit embarrassing to take that too much time for the small finding 😄 ):
The confusing part to me is that how using the MUXC.DropDownButton partially works in Android (ie, only the glyph doesn't show correctly) while it's completely not implemented. |
The MUX And no worries about the time ;)
|
@jeromelaban Then there is some gap I'm not understanding here. I thought it should be in |
By the way, here is a workaround (and weird behavior at the same time): @jeromelaban Does the behavior described in the above image points to any possibilities? |
Yea, it's always something seemingly simple that takes the most time. This one is really strange to me and it's entirely possible I'm overlooking something simple myself. Apologies for confusion about Windows.UI.Xaml vs Microsoft.UI.Xaml namespaces. (I had momentarily forgotten these were implemented in both). In this issue I am always referring to |
After looking at the code I agree this is very strange that it works anyway. DropDownButton is missing from the MUX controls. I thought for sure Martin ported this though. Perhaps he used the MUX source but put it in the WUX namespace? https://github.com/unoplatform/uno/tree/master/src/Uno.UI/Microsoft/UI/Xaml/Controls How does this work at all? Is code generation automatically adding it to the MUX namespace? All of this said, SplitButton has the same issue but is implemented as expected: https://github.com/unoplatform/uno/tree/master/src/Uno.UI/Microsoft/UI/Xaml/Controls/SplitButton
|
@robloo The repro app is and is not using Using Windows instead of Microsoft still reproduces the issue (which is expected since the generated code didn't change). |
Ok, that answers the big question of how this even works to begin with. DropDownButton is not implemented in Microsoft.UI.Xaml.Controls as we both noted. My guess is this is an intentional fallback though -- however unexpected it might be. I certainly think this needs to change long term: we should do what was finally decided for NavigationView and put it in the MUX directory (even though those same sources were used for WUX version). |
Yes it's very unexpected. At minimum, I think the generator should produce a warning. So the compilation doesn't fail but the developer is informed that the control doesn't exist in namespace X and we'll use namespace Y. This is, however, a little bit separate from the issue here. I think the questions are:
I was never able to debug an external app following these instructions, so it's hard to debug for me without reproducing in samples app 😕 |
I'm very suspicious about this: uno/src/Uno.UI.FluentTheme/Resources/PriorityDefault/DropDownButton.xaml Lines 107 to 116 in 39e3836
|
I haven't been able to build Uno for quite some time for some reason. So I won't be able to test this locally and step into Uno source. I've had the setup working in the past on some other issues though. When I finish work on performance and work-arounds I'll have bugs like this to address. So eventually I will circle back to issues I file and spend more time on them. I decided just to file them so they are known and discussed. That said, issues like this are outside my area of knowledge and I'm not sure where to start. |
@Youssef1313 That's almost certainly it! I was never sure about those styles and they are organized strangely to me. Note that all occurrences of microsoft/microsoft-ui-xaml#3745 That needs to be changed here as well to |
@robloo take a look at this video I made yesterday for building uno: https://www.twitch.tv/videos/1135290868
|
@jeromelaban Thanks, I did have the full setup working last year -- including debugging an app with Uno source. However, every few months the build breaks and I have to spend a lot of time figuring out what went wrong. Last time it broke I wasn't able to fix it within a few hours. It was at the time related to the VS issue you filed that would just silently refuse to build some projects. I'm not sure why it's so fragile. |
If you encounter this again, open an issue with the build errors, we can certainly enhance the build validations for the errors to be more explicit. |
Will do. In the issue I'm thinking of it was Visual Studio and there was nothing you could do. You filed an issue for it but I can't find it at the moment to see if it was closed. |
Confirmed to work in Uno.UI version 3.10.7! |
Current behavior
The Microsoft.UI.Xaml DropDownButton, SplitButton and ToggleSplitButton don't show the down chevron glyph.
It instead falls back to a font besides Segoe MDL2 Assets (the Uno Equivalent).I'm not sure where this issue happens as the code seems to be correct. This may be an issue with Resource lookup but then I wonder how any other controls work. Perhaps the glyph itself is missing from the Uno Font and we should change it to the ComboBox Unicode point.
uno/src/Uno.UI/UI/Xaml/Controls/DropDownButton/DropDownButton.xaml
Lines 113 to 115 in e70c724
Expected behavior
The chevron should be shown.
How to reproduce it (as minimally and precisely as possible) / Test App
See the following test application.
DropDownButtonTest.zip
Workaround
Works on UWP/WinUI
Yes
Environment
Nuget Package:
Nuget Package Version(s): 3.9.1
Affected platform(s):
IDE:
Relevant plugins:
Anything else we need to know?
The text was updated successfully, but these errors were encountered: