-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Branch checkout after cloning #460
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
Conversation
Basics of cloning repository implemented. Pressing clone on welcome view now opens simple window with url input with clone and close buttons For now it clones the repositories in to your home dir. Error handling for now is nada and should be implemented in later commits
Now you can select the folder to which you want to clone the repository. This defaults to home folder. Also added check that the repository isn't empty when trying to clone.
Now after we press `clone` button, we firstly clone the specified repository to given folder. After cloning, we open folder picker for the user to pick folder to open the editor in. However this could be better if we straight up open the editor in the cloned folder, rather than giving user an option to choose the folder in between.
Added error handling for git related errors e.g. when trying to clone non existent repository
Changed GitClone to be module as discussed in CodeEditApp#232 (comment)
Switched the git clone view folder picking to use NSSavePanel instead of NSOpenPanel. NSSavePanel gives us kind of the same flow as Xcode has, as it's also using NSSavePanel to prompt the target folder for cloning. The view now consist of two separate modals that pop open, and it may seem cumbersome, but it now has kind of the same functionality as Xcode.
Also fix current implementation to use the new ShellClient
Repositioning buttons, input and text. Also added app icon to the view
Changed git clone view to be sheet instead of normal window. This is better for UX as you can't click anywhere else than the clone view until you either cancel or clone the repository
Naive Xcode-like check for the url implemented. For now if the url does not start with certain string, the clone button is disabled, just like in Xcode. Also added check for when user decides to press cancel on folder selection CodeEditApp#232 (comment)
If you have 'valid' git url in your clipboard when opening the clone view, it now automatically pastes it to the textfield
Fixed indentation in WelcomeView and moved the logic of cloning repository into it's own private function
Added modal to checkout to other branches after cloning the repository
|
Had to move some variables from @State var showCheckoutBranch = false
@State private var repoPath = "~/"Is this big no no as the number of |
|
@Pythonen : I tested it, some considerations:
Registrazione.schermo.2022-04-15.alle.13.00.28.mov
|
|
How are you seeing this dialog. I wasn't seeing it in my tests. |
|
@austincondiff : Can you make the video of when you try to clone a report? Senza.nome.mov |
|
Disregard my comment. I stand corrected. This dialogue is not shown if there is only a single branch available. Just make sure that is the case with yours. |
|
@Pythonen how you planning to handle private repos? |
|
Resolve conflicts and we can merge if there are no other outstanding items. |
Sure, just have to change the functionality to make sure it won't ask for checkout if there's only one branch present
For now just relying on the |
esthicodes
left a comment
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.
is it important to do branch checkout after cloning
nanashili
left a comment
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.
@austincondiff All looks good to me.
|
@Pythonen is this still a WIP? |
If you don't see it as a mandatory to convert it to Observable, then no. 👍 |
|
If it is not WIP, remove WIP from the title so reviewers know to review it. 🙂 |
austincondiff
left a comment
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.
LGTM ✅
|
@allcontributors add @Pythonen for code |
|
I've put up a pull request to add @Pythonen! 🎉 |

Description
Added branch checkout modal which shows after cloning from the welcome view
Related Issue
Checklist
Screenshots