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

Drag folder/file to '+' button to open new tab in directory #10073

Closed
TomByrne opened this issue May 11, 2021 · 4 comments · Fixed by #10160
Closed

Drag folder/file to '+' button to open new tab in directory #10073

TomByrne opened this issue May 11, 2021 · 4 comments · Fixed by #10160
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@TomByrne
Copy link

Description of the new feature/enhancement

Would be nice if dragging and dropping a folder from explorer onto the plus button created a new shell within that directory.
If a file is dropped, then the parent folder should be used.

As a bonus it would be nice if dragging onto an existing tab set the CWD of that shell to the directory, but I believe this would require more configuration per shell-type (i.e. would need to know how to navigate to the folder, and in the case of unix-like shells how to transform the path).

Note: Currently dragging a file/folder into an existing shell (i.e. not the tab) pastes the path into that shell; I'm not suggesting that this change at all (although if the path-transformation issue mentioned above is solved then maybe it could be re-used here, as windows-format paths are fairly useless in a unix-like shell).

@TomByrne TomByrne added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label May 11, 2021
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels May 11, 2021
@zadjii-msft
Copy link
Member

This is a neat idea, thanks!

As a bonus it would be nice if dragging onto an existing tab set the CWD of that shell to the directory, but I believe this would require more configuration per shell-type (i.e. would need to know how to navigate to the folder, and in the case of unix-like shells how to transform the path).

Yea, you've pretty much laid out why that wouldn't work. What if you dragged a file into vim? You'd almost expect vim to open up the file, but there's no real way to tell vim "Hey the user drag-dropped {this path} onto the terminal"

We have a totally other issue on the repro tracking "drag drop for WSL should use WSL paths", but I'm too lazy to link that right now 😛

@zadjii-msft zadjii-msft added Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels May 11, 2021
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 11, 2021
@zadjii-msft zadjii-msft added this to the Icebox ❄ milestone May 11, 2021
@zadjii-msft zadjii-msft added the Help Wanted We encourage anyone to jump in on these. label May 11, 2021
@DHowett DHowett removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label May 13, 2021
@skyline75489
Copy link
Collaborator

Here, #1772. I think this is what you looking for 😄

@ghost ghost added the In-PR This issue has a related PR label May 23, 2021
@ghost ghost closed this as completed in #10160 Jul 20, 2021
@ghost ghost removed the In-PR This issue has a related PR label Jul 20, 2021
ghost pushed a commit that referenced this issue Jul 20, 2021
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
## Summary of the Pull Request
This PR implements the ability to drop directories/files on the '+' button which in turn will open the tab/pane/window in the given starting path.
In order to do this, I refactored the click's lambda into a method and re-used it
Sadly I wasn't able to add note about the alt/shift feature (any ideas how to do this?)
Also most of the code is "look-a-like" from other places within the project, as I don't have much experience in windows development.
 
<!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
## References
implements #10073

## PR Checklist
* [ ] Closes #10073
* [ ] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
** tests were done manually both of the old feature (alt/shift+click) on the '+' and on the profiles
* [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
** no idea what to add there, if any.
* [ ] Schema updated.
* [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

## Detailed Description of the Pull Request / Additional comments

## Validation Steps Performed
tested manually.
@ghost ghost added the Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. label Jul 20, 2021
@ghost
Copy link

ghost commented Aug 31, 2021

🎉This issue was addressed in #10160, which has now been successfully released as Windows Terminal Preview v1.11.2421.0.:tada:

Handy links:

@ghost
Copy link

ghost commented Aug 31, 2021

🎉Windows Terminal Preview v1.11.2421.0 has been released which incorporates this pull request.:tada:

Handy links:

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants