-
Notifications
You must be signed in to change notification settings - Fork 592
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
Improvements to the PR flow #2293
Comments
Had a great meeting with @eamodio, here are some notes: Finishing a PRThinking about codespaces, when a user finishes reviewing a PR, they may want to reuse the codespace to continue reviewing other PRs, or to delete the codespace. A codespace is loosely associated with a branch - from the repo page, the codespaces shown are those created for the currently selected branch. From a PR page, codespaces are also filtered to those that are associated with the branch for the PR. However, the codespace's tie to the branch seems to only matter for the initial state it opens in. If you delete the branch, the codespace remains, and if you open the codespace and switch branches, opening the codespace again doesn't cause you to switch back. So the current model leans towards "create a codespace specifically for reviewing this PR" rather than "create a codespace I will use to review all PRs", but both actions still seem useful, especially given how long it can take to initialize a codespace. Continue reviewing other PRsTo checkout a different pull request from the list, the "focused mode" view could be changed to:
For any of these, the experience could be the same in a codespace or on desktop. One thing to think about in the future is how "focused mode" interacts with multi-root workspaces, how it should display when you have multiple checked out branches in different folders. (Also, one edge case we don't handle is if a branch is associated with multiple PRs.) Deleting the codespaceAfter merging a PR, the merge button is replaced with a "Delete Branch" button. Deleting the codespace is very similar to this, it's also cleaning up resources for the PR. So one option for this is to leverage the current delete flow. If we detect that we are in a codespace based on the remote authority, we could add another entry in the quickpick to delete the codespace. At this point we talked a lot about the relationship between codespaces and branches - does it make sense to delete a branch but not a codespace, or vice versa? If the branch gets deleted but the codespace doesn't, the codespace is sort of orphaned in the GitHub web UI, you would have to go back to the deleted branch to find it. But I might want to keep the codespace around to continue to review or do other work, but clean up the branch immediately. So, forcing you to delete the codespace and branch at the same time might be too restrictive. Creating a PRCreate PR flowThe series of quick picks we use right now makes it hard to have a holistic view of what you're creating. In the past we explored using a webview to do this, if we use the new "WebviewView"s in the activity bar, we could have one view for inputting the PR details, target branch, title, and description, and a tree view of the changes between the source branch and target branch. Codestream already has an experience like this. If we go with these new views, we should match whatever approach we take with "focused mode", either entirely replace the lists, collapsing them, or showing the views in their own transient viewlet. Right now with the quick pick experience, if your local branch doesn't have an upstream, one of the quick picks asks you what name you want to publish the branch with. Instead of trying to capture this rename ability, we can still have the automatic publish using the local branch name. The create experience should be the same in codespaces or desktop. Automatic draft PRsThe problem we would have to work around with automatically creating a draft PR when you create a new branch is that there needs to be some diff between the source and target. Assuming this is a commit diff and not a literal diff, a possible hack would be to push an empty commit to the branch. (Further hack would be to then reset HEAD back after creating the PR and delete the commit.) Would be good to check in with GitHub about removing this limitation. Some other miscellaneous thoughts about improving PR create:
|
Some more good discussion today with Eric! Entrypoints to create
Finishing create
Focused mode
Open PR
Finishing a PR
|
Closing in favor of #2372, which tracks any remaining work and polish |
Create a PR
Opening a PR
Finish a PR
The text was updated successfully, but these errors were encountered: