razor icon indicating copy to clipboard operation
razor copied to clipboard

Rename doesn't properly work for component's parameters

Open DoctorKrolic opened this issue 2 years ago • 1 comments

Version used: VS 17.4 Preview 2.1

To reproduce:

  1. Create blazor server app
  2. Create component Component.razor with this code:
@code {
    [Parameter]
    public string Parameter { get; set; }
}
  1. Use this component in another component with parameter Parameter set via tag, e.g. <Component Parameter="whatever" />
  2. In original component rename Parameter -> AnotherParameter

Expected behavior: Name changed in all usages, including those made via tag in markup

Actual behavior: Name doesn't changes in usages in markup

Demo: devenv_s91WQeVg5z

DoctorKrolic avatar Oct 02 '22 19:10 DoctorKrolic

I'm also here because of this issue and I'm trying to find another IDE because of it. It is so annoying. It seems to not be supported as of yet, and it has been on the backlog for a year: https://github.com/dotnet/razor-tooling/issues/4444

PLEASE fix this.

Albiniivari avatar Oct 03 '22 12:10 Albiniivari

I've been following this issue, are you not gonna fix this? :/ Feelsbadman. Its so weird to not be able to use something as simple as a refactor. Will for sure gun for our company to switch away from visual studio as it is a buggy mess that misses so many simple things. We even have an vs-icon in our chat to describe when a feature is riddled of bugs

Albiniivari avatar Nov 04 '22 11:11 Albiniivari

This is definitely not on the "not gonna fix this" list, we just didn't get to it this sprint, so have moved it to the next. Sadly I can't promise it won't get moved to the one after that either - we are a very small team with lots of shifting priorities. Unfortunately due to various technical considerations, this issue is probably not as simple as it seems, and could require work from razor tooling, razor compiler, and roslyn, to coordinate things.

We even have an vs-icon in our chat to describe when a feature is riddled of bugs

If you can be bothered, we'd love for you to create issues for those bugs, or report them through VS "Report a Problem". We really do want you to have the best Razor editing experience possible, though I understand the frustration. We feel it too from our side.

davidwengier avatar Nov 04 '22 21:11 davidwengier

I understand, I apologize for sounding a bit annoyed. I've sent in a report and will try to do it more often when something weird occurs.

Albiniivari avatar Nov 14 '22 07:11 Albiniivari

@davidwengier should we close https://github.com/dotnet/razor/issues/4444 as a dupe of this?

maryamariyan avatar Nov 30 '22 22:11 maryamariyan

Strictly speaking they're different, as this one is a rename originating from us, and the other is originating from Roslyn, but I should have a PR up today to fix both anyway :)

davidwengier avatar Nov 30 '22 22:11 davidwengier