You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There was some feedback on Reddit this morning about code action
ordering and Extract to Component being a little "in your face". See
https://www.reddit.com/r/Blazor/comments/1jjg3bh/am_i_doing_something_wrong_or_is_intellisense_and/mjq7jp3/?context=3
and the rest of the thread in general.
This PR:
* Makes sure Extract to Component always last, since it is offered
basically everywhere
* Makes sure Add Using and Fully Qualify are always first, since they're
the most likely code actions people want
* Ensures Extract to Code Behind is offered at `$$@code` since
previously there would be no light bulb in that situation, but now there
is and muscle-memory makes people hit it, which extract the code block
to a new component, which is not what they want.
Note that the ordering here is only among the Razor code actions. All C#
and Html code actions are always still after the Razor code actions,
even Extract to Component.
Copy file name to clipboardExpand all lines: src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/CodeActions/Razor/ExtractToCodeBehindCodeActionProvider.cs
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,9 @@ public Task<ImmutableArray<RazorVSInternalCodeAction>> ProvideAsync(RazorCodeAct
57
57
// When the caret is '@$$code' or '@c$$ode' or '@co$$de' or '@cod$$e' then tree is:
0 commit comments