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

Refactoring to reorder tuple elements #52892

Open
jnm2 opened this issue Apr 24, 2021 · 1 comment
Open

Refactoring to reorder tuple elements #52892

jnm2 opened this issue Apr 24, 2021 · 1 comment
Labels
Area-IDE Feature Request IDE-CodeStyle Built-in analyzers, fixes, and refactorings
Milestone

Comments

@jnm2
Copy link
Contributor

jnm2 commented Apr 24, 2021

The scope of the change should be the same as the scope that a tuple element rename would have, whenever that is decided: #14115

Example

I have this code, with three callers. I decided it's confusing on the call side to have the URLs last, so I want to move each string Url tuple elements to be the first element. It would be nice to be able to invoke a refactoring for each of the two moves which would fix up the callers and also the tuple usages within this method:

public static void WriteLinkPanel(
    Action<string> writeLine,
    (string Display, string Url) fileLink,
    string webAccessUrl = null,
    (string Display, string Url, string AssemblyName)? projectLink = null)
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 24, 2021
@jinujoseph jinujoseph added Feature Request IDE-CodeStyle Built-in analyzers, fixes, and refactorings Need Design Review The end user experience design needs to be reviewed and approved. and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 28, 2021
@jinujoseph jinujoseph added this to In Queue in IDE: Design review via automation Apr 28, 2021
@jinujoseph jinujoseph moved this from In Queue to On deck in IDE: Design review Apr 28, 2021
@jinujoseph jinujoseph added this to the Backlog milestone Apr 28, 2021
@jasonmalinowski jasonmalinowski moved this from On deck to Next meeting in IDE: Design review May 21, 2021
@jasonmalinowski jasonmalinowski moved this from Next meeting to Need Update in IDE: Design review May 24, 2021
@JoeRobich
Copy link
Member

Proposal from design meeting:

  • Add new refactoring "Change Tuple Signature…" which will display a dialog similar to the Change Signature dialog.
  • Initially it may only allow elements to be reordered but we can see this dialog growing to expose add, remove, rename, and update modifiers for tuple elements.
  • Ability to specify scope like the convert tuple to struct refactoring.
  • Ability to require matching element names to further narrow scope.

@JoeRobich JoeRobich moved this from Need Update to Complete in IDE: Design review May 25, 2021
@jmarolf jmarolf removed the Need Design Review The end user experience design needs to be reviewed and approved. label Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Feature Request IDE-CodeStyle Built-in analyzers, fixes, and refactorings
Projects
Status: Complete
IDE: Design review
  
Complete
Development

No branches or pull requests

4 participants