Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving a file in the project should offer to move the type #1035

Closed
333fred opened this issue Dec 23, 2016 · 3 comments
Closed

Moving a file in the project should offer to move the type #1035

333fred opened this issue Dec 23, 2016 · 3 comments
Assignees
Labels
Triage-Approved Reviewed and prioritized
Milestone

Comments

@333fred
Copy link
Member

333fred commented Dec 23, 2016

If the user drags and drops a file inside the project, we should offer to move the types in the file to the new namespace. Example:

Project/Foo/Bar.cs (contains type Foo.Bar) -> Project/Baz/Bar.cs (prompt to move Foo.Bar to Baz.Bar)

@ocallesp
Copy link
Contributor

ocallesp commented Aug 12, 2020

@jjmew
Similar issue #5372 In here there are some comments saying that in CPS we need some medatada in folders.

In CPS we handle part of the file move in:
namespace Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectNode
But this place looks generic for the specific case when FileMove to rename namespace.

Another place is DocumentManager.cs after RenameDocument()

@ryzngard What is expected in the Ux ?
should we ask the user if he wants to rename the namespace using a dialog box [yes/no] ?
The namespace rename should be something offered/handled by codefixes ?
There is already a dialog box, this is not handled by cps. Not sure about adding another dialog box to ask the namespace rename.
image

It seems this should be handled in Donet ProjectSystem, and get a notification after the move was successfully applied.

@ryzngard
Copy link
Contributor

If we add the option as a checkbox to this dialog (default checked) that might be good. The downside is I think we'd want to remove the "Never prompt before moving files to a new location" option in the dialog, since we're attaching some action to it now instead of just letting the user know information.

Maybe like this?

image

@jjmew
Copy link
Contributor

jjmew commented Aug 12, 2020

@ryzngard and @ocallesp take a look at this ticket. I think that should be considered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triage-Approved Reviewed and prioritized
Projects
None yet
Development

No branches or pull requests

7 participants