DavidFeldhoff / al-codeactions

MIT License
17 stars 8 forks source link

Promote actions: new group should be surrounded with " #154

Closed fvet closed 1 year ago

fvet commented 1 year ago

First of all, I love the new "Promote Action" code action. I'll start using it right away ;)

When you create a new action group, you can fill the name / caption. However, if the caption contains a space, the name of the new group is invalid an needs to be surrounded with ". Could be an idea to by default surround it with " anyway, even if it has no spaces. Autoformat will probably remove the unneeded " afterwards

PromoteActions

DavidFeldhoff commented 1 year ago

Hi, thanks for your note and your videos. It's always totally clear what you asked for!

But now you probably will start to laugh : I just spent quite some time for this "easy" request, but I still haven't found a proper solution. The issue is that if I would put quotes around it and you select an item from the List (e.g. Category_Process) then something (Microsofts logic?) kicks in, removes the quotes and ends the snippet mode directly. So after that you aren't able to jump to the caption any more. See here:

https://user-images.githubusercontent.com/53570297/224335353-0e9a540e-6729-4cfc-9ecd-71c26740e595.mp4

One solution would be to have the first tabstop after the Category_ and then with the second tabstop select the CategoryName, so that you could decide to surround it with quotes. If not, you "tab it away". The third tabstop would then bring you to the caption. See here:

https://user-images.githubusercontent.com/53570297/224335687-fdb01083-a40c-4b60-8742-84530885ff74.mp4

Another solution would be to directly select with the first tabstop the Category_, so that you decide to include quotes before entering the name. If you don't want to add quotes, you'd have to first press the right arrow key to use intellisense or start typing.. Downside would be that the Category_ temporarily also stands in the caption, but that's going to be removed. See here (Ignore that the quotes are in the caption after the last tabstop, that should be possible to fix):

https://user-images.githubusercontent.com/53570297/224336083-f28735d6-a10b-4919-9f5f-12345e031239.mp4

To be honest I don't like both solutions too much :D What do you think/prefer?

DavidFeldhoff commented 1 year ago

This should be fixed with the latest version 1.0.28 as well