-
Notifications
You must be signed in to change notification settings - Fork 734
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
[Gallery][WASM]AutoSuggestBox- In the 'Autosuggest Box with Search Box experience' section, the descriptions of the controls are not displaying on multiple lines. #15967
Comments
@kazo0 could it be a material style issue? |
@jeromelaban |
@jeromelaban @kazo0 AutosuggestBox shows more than one line. If you keep scrolling, you may get an item with 2 lines. Maybe the visual appearance can be improved by adding margin on the right and left. Problem, when you resize the browser window, AutosuggestBox size doesn't change and some parts become hidden. May I send a PR to this repo? |
@kazo0 I think you are maybe right here, as I am noticing some purple for the hover state here |
So @mcNets I think we are maybe just missing
at this level for the AutoSuggestBoxSamplePage |
@agneszitte I've added the code you posted, but I'm not sure this is the issue. Initially flyout has a Desktop project behaves the same way. When NavigationView is in compact mode, the FlyOut is then resized again and wrap the content. flyout.mp4 |
Thanks for giving it a try @mcNets. Maybe I am mistaken but I think it is still taking the Material theme here visually and for that reason not using the fluent theme properly (which hopefully could normally resolve the main issue here in terms of padding, wrapping, etc...) |
Related issue: unoplatform/Uno.Gallery#1069 (comment) |
@agneszitte I tried to apply the same approach as @morning4coffe-dev did on unoplatform/Uno.Gallery#1123, but it still seems a bit purple. public AutoSuggestBoxSamplePage()
{
this.InitializeComponent();
Loaded += AutoSuggestBoxSamplePage_Loaded;
}
private void AutoSuggestBoxSamplePage_Loaded(object sender, RoutedEventArgs e)
{
var boxes = VisualTreeHelperEx.GetDescendants(this)
.OfType<AutoSuggestBox>()
.ToList();
foreach (var box in boxes)
{
box.EnsureXamlControlsResources();
}
Loaded -= AutoSuggestBoxSamplePage_Loaded;
} |
I have an ongoing PR for fixing this issue unoplatform/Uno.Gallery#1134, but I haven't been able to prioritize. Thank you for looking into this @mcNets. On the image you shared, it is purple as the individual items are still material. We can discuss further, if you want to continue with this issue. |
No thank you @morning4coffe-dev , go ahead. I'll take another one. Are you changing the style everytime a new popup appears? |
As far as I remember, the solution I worked on only functioned after opening the popup for the second time, which is why it hasn't been merged yet. If you'd like, you can take a look at my PR and maybe pick it up if you get any ideas from it. |
@morning4coffe-dev If I am not wrong if (sender.IsSuggestionListOpen)
{
var popup = VisualTreeHelper.GetOpenPopupsForXamlRoot(XamlRoot).FirstOrDefault();
popup.EnsureXamlControlsResources(true);
(popup.Child as Border).EnsureXamlControlsResources(true);
} So until TextChanged event is fired again, for example when you add another character or select one option or you clear the TextBox, the style is no applied. Try by press 'b' and when the popup is visible, click 'o', it will change to Fluent. Set a breakpoint inside the if condition and you'll see it. |
@morning4coffe-dev would you mind if I make a modification in your code? |
@mcNets Not at all, I am happy to collab with you this way! Thank you 😇 |
@morning4coffe-dev Your PR was created with the previous multi-project version, and I'm not sure to be able to send a PR to your PR, do you mind if I generate a new PR? Besides, UWP project where the changes are applied, is not loading. |
@mcNets For sure, no problem, you can create a new PR and we can close off mine, after merging. Hmm... interesting, I am happy to take a look, after you make the PR on why it might not be loading. |
@morning4coffe-dev I don't know if mine will load.... |
This issue should be fixed now via unoplatform/Uno.Gallery#1173. |
Thank you so much again, @mcNets, for your valuable contribution to this issue! It's greatly appreciated ❣️ |
@jhanvi03 I will let you do some final tests please |
The issue Still persist with Versions: Package Referenced version Updated version
|
Current behavior
Expected behavior
How to reproduce it (as minimally and precisely as possible)
Workaround
No response
Works on UWP/WinUI
None
Environment
No response
NuGet package version(s)
No response
Affected platforms
WebAssembly
IDE
No response
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: