-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Making Move To File
Action appear less often
#57080
Conversation
Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page. Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up. |
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We generally expect a test to exhibit new behavior. Language service tests should be placed in tests/cases/fourslash/
and you can take a look at existing refactoring tests.
Hi thank you for the review comments. I have been working on the changes, and was looking at adding a test. More specifically I talked to one of your colleagues about how tests work in the TypeScript repo and this person recommended to add a test of the following type:
I was debugging this test and I noticed that due to the current structure of the code, the |
You're right about the interactiveActions always being undefined in this test case and so |
Is there any reason not to have |
So if that suits everyone, could we just set the boolean |
Seeing as there is a thumbs up on my last message I will make the boolean true. I am trying to construct a test that will make the condition
Upon testing however the token at the start of the selection was evaluated to be kind As a small note, we would like to merge this PR this week if possible, as it is part of the VS Code iteration plan for the month of February. In light of this, I was wondering if we could schedule a meeting this week to discuss the PR in more detail |
I looked at extractSymbol for some reference and one simple example for this case would be :
In here, I believe you will have to change |
So I implemented the idea you mentioned in your last message. I created two tests, one with the text you suggested, where no |
Hi @navya9singh thank you for the review comments. I made the changes requested. |
Hi @andrewbranch @navya9singh if the code looks good, would it be possible to receive an approval for merging the code? On the VS Code side, we would like to get this PR merged by the end of this week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, just a few nits. Thanks!
Hi thank you for all your review comments, I have made the latest changes requested. |
Hi @DanielRosenwasser to merge this PR, it appears that I may need your approval on the changes you requested. I have made the changes you mentioned. |
@mu578 I've never seen you on this repository, but here you must adhere to the code of conduct. You must keep feedback respectful and objective. |
Fixes #56416
This work is done in relation to conversation with @navya9singh. From the conversation, the following PR aims to do the following:
Add a condition in getAvailableActions() to decide when you want the refactor to not show up. The strategy to follow for now is to not offer the refactor if both ends of the initial selection range are inside a BlockLike node type (other than the source file).