codecadwallader / codemaid

CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
http://www.codemaid.net
GNU Lesser General Public License v3.0
1.89k stars 356 forks source link

[Feature] Group By Attribute on Sorting #938

Open scottkuhl opened 2 years ago

scottkuhl commented 2 years ago

Description

It will be helpful if there was an option to group by attribute on sorting. The place I see this being the most beneficial is on Blazor components which can frequently have [Parameter], [CascadingParameter] and [Inject] attributes. These would stay grouped together by type.

image

Current behavior

    [Inject] public AppState AppState { get; set; } = default!;
    [Parameter, EditorRequired] public int Id { get; set; }
    [Inject] public IJSRuntime JS { get; set; } = default!;
    [CascadingParameter] public Mode? Mode { get; set; }
    [Parameter] public Model? Model { get; set; }
    [CascadingParameter] public int ThemeId { get; set; }

Expected behavior

    [Inject] public AppState AppState { get; set; } = default!;
    [Inject] public IJSRuntime JS { get; set; } = default!;

    [CascadingParameter] public Mode? Mode { get; set; }
    [CascadingParameter] public int ThemeId { get; set; }

    [Parameter, EditorRequired] public int Id { get; set; }
    [Parameter] public Model? Model { get; set; }
codecadwallader commented 2 years ago

Thanks for the suggestion, makes sense!