Bug 58285 (vs-504206) - XAML Intellisense lists element properties sorted by length of name
Summary: XAML Intellisense lists element properties sorted by length of name
Status: RESOLVED FIXED
Alias: vs-504206
Product: Xamarin Studio
Classification: Desktop
Component: XML Editor (show other bugs)
Version: 7.0 (VSforMac)
Hardware: Macintosh Mac OS
: Normal enhancement
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-07-20 23:24 UTC by David Ortinau [MSFT]
Modified: 2017-10-10 08:05 UTC (History)
5 users (show)

See Also:
Tags: vs-sync
Is this bug a regression?: ---
Last known good build:


Attachments
screenshot (192.79 KB, image/png)
2017-07-20 23:24 UTC, David Ortinau [MSFT]
Details
C# example (136.00 KB, image/png)
2017-08-24 09:43 UTC, David Karlaš
Details

Description David Ortinau [MSFT] 2017-07-20 23:24:44 UTC
Created attachment 23702 [details]
screenshot

When I get the popover of properties available for the element Grid in this screenshot, noticed the ordering is by length of the property name...this continues down the list.

I'm not sure what the next sorting rule is, I can't make sense of it.

I would expect the sorting to be alphabetical if not also more context aware (most common at the top).
Comment 1 David Karlaš 2017-08-24 09:43:33 UTC
Created attachment 24392 [details]
C# example

Unfortunately this is expected behaviour, but you found edge case that looks very weird... IDE Code Completion once something is typed(in your case g) it kicks from alphabet sorting to "fuzzy search" closest match... In your case a lot of matches are properties of Grid and non-alphabetical sort is very visible... Look at attached example in C#, where it's also not sorted alphabetically.
Comment 2 Mike Krüger 2017-08-24 10:05:20 UTC
Sooner or later we'll be getting the vs.net controllers for that layer then the behavior will be different.

The decision to implement it like that was because I sort it according to the match index so items upper in the list are more likely the right ones. Doesn't work in all cases but alphabetical sorting is probably wrong everytime :).

I took R# as exapmle for the sorting/filtering routines. I'm not sure if I matched it 100% but we're close.


In any case we'll be getting the vs.net controllers and the behavior will be defined by them in future releases. I do not plan to work or alter the current behavior.
Comment 3 Mikayla Hutchinson [MSFT] 2017-08-24 16:39:36 UTC
@Mike the Roslyn controller changes will only apply to Roslyn languages, of which XML is not currently one. Also, that's some ways off, and this is a pretty painful UX issue

That said... @David, I think that we should also change XAML completion to only list the part before the '.' and then implement completion for the '.' as well. This would match what VS does and would likely mitigate the impact of the sort issue.
Comment 4 David Karlaš 2017-10-10 08:05:07 UTC
This is now fixed. We don't show <Grid.Scale, <Grid.Style... anymore, instead
we do it same as VS2017, we show just <Grid, only after user types <Grid. we
should properties.

Note You need to log in before you can comment on or make changes to this bug.