sapling
sapling copied to clipboard
Various ISL Improvements
I've been using this for the past few weeks and it's been working pretty well, but I feel like the ISL is missing a few usability features that prevent me from fully switching. I'm sure there's ways to do a lot of these in the command line but for me, I think the biggest feature when I was using internal stacking mechanism was the ISL. A few things I wish we had are:
A way to revert a file to the last commit.
I think this is one of the biggest issues I have with using this. I don't feel like there's an easy way to undo a file to the previous commit. I usually go to the previous commit, copy the file, and then go to the next commit and copy it back in. I might be able to do this with one of the uncommit/rm/undo/revert commands but I have a hard time remembering/understanding which one does. Also some of these are kinda dangerous like uncommit which uncommits it and amends the previous commit which is kinda surprising.
Better integration with the side by side diff viewer.
When I click on a file from the ISL or Source Control Tab, it just takes me to the file itself. There's an option to open the change from the Command Palette but it's not super discoverable.
Better support for Combine/Split Commits
I sometimes make a bunch of commits and then want to combine a bunch of them so I can split them by files. This is kinda painful cause I first need to uncommit everything until I get to the base and then split them out by selecting the files and commiting them.
Submit as Draft
I usually can't click the submit button since it'll just submit them as open PRs. Instead, I have to use the CLI. It'd be nice if we were given a dialog to submit them as drafts or just another button for submitting as draft.
Button for opening the ISL
I usually have to use the Command Palette to reach the ISL or remember that I bound the opening on a keybind. I'd prefer if the Source Control tab just opened it directly since there's not much I can do from that small window.
Thanks for all this great feedback! Each of these are indeed features/fixes we plan on adding. Splitting is probably the furthest away, since it requires a whole UX, but we have specific plans for it. The other things you've mentioned are things we will likely add much sooner.
@zengk95
Revert a file to the last commit
You should be able to do this by clicking the backwards arrow next to a file
better integration with side-by-side diff viewer
Support for this will be in the next VS Code extension release!
Button for opening the ISL
We do already have a button for this in the SCM sidebar which looks like the sapling logo, but it's a little hard to tell that that's what you want to click. We might be able to use the VS Code api to auto-open and hide the ISL webview whenever you open the SCM sidebar, but that's a little hacky.

Thanks for taking a look!
- Revert a file to the last commit
My main use case would be once I've already commited the file, I need to uncommit it and then undo it. From the UI, there's no way to do this. I can maybe do a uncommit and then revert but it's not possible to uncommit in the middle of a stack and it gets rid of your text in the description.
Looking forward to the side by side viewer though! I hope it'll be supported in the Commit Sidebar as well!
As for the source control sidebar, it's fine. I can get used to opening it through a keyboard shortcut.
I started using sapling this week on a personal project, and I'm loving it.
Split is definitely the only feature missing for me.
Any contribution wanted there? (I work at Meta too, so maybe i can do it during work hours :) )
@zengk95 I forgot to update here but I added this (revert from other commits) in f5c443d6f6e95f5a7642c361d490f128bd6cd3a3 and it should be in the latest vscode extension version.
@randallb Glad you're finding it useful! We're working on interactive split, as well as several related features (histedit, edit stack). We hope to have something useable soon!