Closed yaira2 closed 1 year ago
Fyi @onein528
I think the bare minimum would be support for switching branches. This can be achieved by adding a button/flyout to the status bar.
You mean if you open the repository in Files, you will be able to perform Git operations, such as change branch, commit, push, sync?
Here's my thought
Minimum
Could
Push uncommitted changes
This requires UI for a commit message, not impossible but would require a lot of thought.
Git commit tree viewing in preview pane or something
A possibility but curious how it would fit into users workflow and how the UI could be integrated.
Pull Sync
I might add these to the minimum
I'll look what I can do and try to find what can be implemented.
Could show the changes of a file in the preview pane when selected. If it isn't too much having a separate "changes" pane to show them all would properly be good too. Ideally it would look like GitHub with the addition and removals of each line.
This would be very useful
We should probably enable/disable this in settings to not clog the app for non-devs
Properly wont need a setting since outside of a directory with a GitHub link it shouldn't be shown
Is it possible to use the one already installed on the system?
@onein528 instead of branch:
, maybe we can show an icon instead (similar to Visual Studio).
Files source code is very hard to understand... I couldn't implement.
FYI
Requirements:
I'm currently working on this feature. There are a couple of things we need to decide before I can continue my work.
How do you access the checkout menu?
Should we use a separate button? I think that clicking on the branch name should open the menu (like in VS)?What kind of menu should we use?
A flyout or a modal?What actions should be there?
I was thinking of choosing the branch and creating a new one (what about inlcuding delete and rename?)each time
they try to push or pull? Should we save a token
(GitHub Desktop, FluentHub) so that they don't need to log in each time?Checkout Menu
Phase 1 shouldn't have a checkout menu, I think we should wait for feedback on phase 1 before making these decisions.
So phase 1 will be:
There’s no need to be authorized by GitHub. We have to show a modal to prompt a user to enter username/password. And commit and push by using libgit2sharp.
https://stackoverflow.com/questions/25084890/how-to-commit-and-push-in-libgit2sharp
How do you access the checkout menu? Should we use a separate button? I think that clicking on the branch name should open the menu (like in VS)?
Should be like VS.
What kind of menu should we use? A flyout or a modal?
flyout. If we are going to implement branch management, should be a modal in managing such as deleting, renaming, checking out, cherry picking.
What actions should be there? I was thinking of choosing the branch and creating a new one (what about inlcuding delete and rename?)
On hovering, show delete glyph and rename glyph. Yes, on the top of the flyout, show textbox for creating a new branch.
Should we prompt users each time they try to push or pull? Should we save a token (GitHub Desktop, FluentHub) so that they don't need to log in each time?
One time, first time only(not first launch though).
If we choose the token option, how should we handle it? I think we might prompt users if they aren't logged in. We should also include a section in settings to allow them to log in and log out
I mistakenly understood that we have to implement authorization steps. But not.
Phase 1 shouldn't have a checkout menu, I think we should wait for feedback on phase 1 before making these decisions.
Since I've already written some of the code related to phase 2, should I comment that out in the PR? (Which means hiding push/pull/sync
buttons and commenting out ExecuteAsync()
bodies of these actions)
I updated the requirements for phase 2.
How should we differentiate the active branch in the menu? Should we put it on top? Should it be bold?
The ListView control has a selected state that would work for this.
What do you think @yaira2?
I still need to handle uncommited changes, but the basic checkout works!
Looks amazing! Can you add a fixed height and width to the flyout (200 x 200 is probably good)?
Amazing! Can you customize Flyout padding?
+--------------------+
| Branches |
| +----------------+ |
| | pr-202 | |
| +----------------+ |
| +----------------+ |
| | hotfix | |
| +----------------+ |
| ... |
+--------------------+
Branches
label is styled strong text block style.
Like this?
I updated the requirements for phase 3.
Support for creating new branches, the button is already implemented in the UI. Clicking the new branch button should open a content dialog that allows the user to enter the branch name.
I'll start to work on this part of the feature @yaira2 should the user be able to choose the base branch for the new one?
(what's the best way to display the list of changes?)
I highly recommend to use Preview Pane.
should the user be able to choose the base branch for the new one?
Yes
I'm wondering if we can implement the support for viewing the contents of a branch without actually checking out it. I always want to check the diff between two branches or copy a file from one branch to another, but git itself doesn't support it so I always end up duplicating the whole project directory and checking out them to different branches.
When we need to implement GitHub-like feature, we can use GitHub APIs such as 'compare'. https://stackoverflow.com/questions/64202547/how-to-compare-two-branches-in-github-with-graphql
I'm wondering if we can implement the support for viewing the contents of a branch without actually checking out it. I always want to check the diff between two branches or copy a file from one branch to another, but git itself doesn't support it so I always end up duplicating the whole project directory and checking out them to different branches.
I can see this being useful in multipane mode, the files would have to be read only as well but this is something we can look into once we finish with the fundamentals.
Phase 4 is ready to build, this is also the final stage before we are ready to release the changes to stable.
What about deleting local branches?
What about deleting local branches?
That could be one of the actions we display in #12440
What feature or improvement do you think would benefit Files?
Integration with git is something that may add value for developers. We're inviting the open-source community to share feedback on which git features they would find useful in a file manager and how it would enhance their workflow. Design concepts are welcome as well.
Requirements
Phase 1 (implemented)
Phase 2 (implemented)
Phase 3 (implemented)
Phase 4 (implemented)
Future planning
Files Version
v2.4.21
Windows Version
Windows 11
Comments
No response