dotnet/roslyn

Inheritance margin: Show direct inheritors first / list order

Open

#53,862 opened on Jun 3, 2021

View on GitHub
 (5 comments) (2 reactions) (1 assignee)C# (4,257 forks)batch import
Area-IDEConcept-Continuous ImprovementNavigation-Inheritance Marginhelp wanted

Repository metrics

Stars
 (20,414 stars)
PR merge metrics
 (Avg merge 6d 17h) (256 merged PRs in 30d)

Description

This issue has been moved from a ticket on Developer Community.


I just upgraded to version 16.10.0 of Visual Studio to try out the new Inheritance Margin feature. Overall, the feature is fantastic and is very helpful. Right now in Visual Studio, all of the implementing and implemented members are just shown in alphabetical order. This is fine for small inheritance hierarchies, but for really big inheritance hierarchies this is not that useful. I'd recommend the following changes (largely inspired by Rider/Resharper).

Implemented section:

  • Show direct subclasses first (in alphabetical order), then show non-direct subclasses (also in alphabetical order). This would be really helpful for tracing large inheritance hierarchies.
  • Visually indicate the direct subclasses in some way (maybe make them bold) to make the transition point clear.

Implementing section:

  • Show classes first, then show interfaces. Right now, with all the interfaces starting with I, with big hierarchies you can have a handful of classes, then many interfaces, and then some more classes, which is visually awkward and a bit hard to navigate.
  • Show classes in inheritance order. Rather than being shown alphabetically, it would be helpful to see the exact order of inheritance.
  • Though not essential, maybe consider also applying the suggestions above for the implemented section to sort the interfaces group by direct implementation first then indirect, as well as adding the same visual indicators for the direct implementing interfaces and base class.

Again, I think this feature is a really great addition to Visual Studio, and I think just a few ordering tweaks like the ones I suggested would make it even better.

Thanks!


Original Comments

Feedback Bot on 5/28/2021, 02:00 AM:

Thank you for taking the time to provide your suggestion. We will do some preliminary checks to make sure we can proceed further. We'll provide an update once the issue has been triaged by the product team.

Contributor guide