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

POC: Add a Git Panel #19877

Closed
wants to merge 4 commits into from
Closed

POC: Add a Git Panel #19877

wants to merge 4 commits into from

Conversation

Spoutnik97
Copy link

@Spoutnik97 Spoutnik97 commented Oct 29, 2024

This is a POC to add a git panel to see all git changes. It is highly plebiscite by the community. I think it could be a good starting point to have a better git panel with stash / commit / etc... git commands

It is my first Rust code, and my first gpui usage, so be kind, and help to understand how it works please 🙂 Claude and Zed helped me a lot to write this (unmergeable) code

I will be very interested in understanding how to finish this work, but I need some help to learn.

Enregistrement.de.l.ecran.2024-10-29.a.08.59.39.mov

Release Notes:

  • Add a Git Panel
  • List git changed files

Copy link

cla-bot bot commented Oct 29, 2024

We require contributors to sign our Contributor License Agreement, and we don't have @Spoutnik97 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@Spoutnik97
Copy link
Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Oct 29, 2024
Copy link

cla-bot bot commented Oct 29, 2024

The cla-bot has been summoned, and re-checked this pull request!

@Spoutnik97
Copy link
Author

Should start to fix #4367

@Angelk90
Copy link

Angelk90 commented Oct 29, 2024

@Spoutnik97 : Seems like a good place to start, I would remove it for now, you can already see the branch name above.

let header = if let Some(git_status) = &self.git_status {
            v_flex()
                .gap_2()
                .p_2()
                .child(h_flex().gap_1().child(Label::new(format!(
                    "Branch: {}",
                    git_status.branch.current_branch
                ))))
                .child(horizontal_separator(cx))

https://github.com/Spoutnik97/zed/blob/4cd19d5ec52bf7ac56670244da380cb4de956a2f/crates/git_panel/src/git_panel.rs#L923-L933

I would do this if it works like this, only print if no repository found.

let header = if self.git_status.is_none() {
    v_flex()
        .gap_2()
        .p_2()
        .child(Label::new("No Git repository found"))
        .child(horizontal_separator(cx))
}

If so I would bring up something like this that would allow you to initialize a repository.

Screenshot 2024-10-29 alle 10 35 23 Screenshot 2024-10-29 alle 10 35 59

Something like this would be nice:

Screenshot 2024-10-29 alle 12 48 26 Screenshot 2024-10-29 alle 12 47 50

@maxdeviant
Copy link
Member

Thanks for the PR, @Spoutnik97!

Just a heads-up that we already have existing designs for the Git experience in Zed, so it's not likely that we'll merge this implementation.

@Angelk90
Copy link

we already have existing designs for the Git experience in Zed

@maxdeviant : Where can I see them?

Since I don't see any pr at the moment from any Zed Staff that deals with this topic.
Can you indicate where to get this information?

At the moment we are stuck at Milestone1 from what I read and there is no trace of the current Milestone process, on which issues are to be addressed and which are not.

#8665 (comment)

@0x2CA
Copy link
Contributor

0x2CA commented Oct 30, 2024

Regarding git's interface design, I've seen it in the zed community on discord, but it doesn't exist anymore, zed is becoming less transparent now, and it's not clear what the team is doing, the only way to find out is the rp merge.

At the moment we are stuck at Milestone1 from what I read and there is no trace of the current Milestone process, on which issues are to be addressed and which are not.

From what I can tell, there was just simply a lack of time, the direction and design was already in place in the team, but there was no public disclosure of the appropriate information or a way for the community to contribute, so it led to git stagnation

@Angelk90
Copy link

zed is becoming less transparent now, and it's not clear what the team is doing, the only way to find out is the rp merge.

@0x2CA : I agree with you.
The problem is that there are many people who want to help, but the Zed team blocks them saying, it is not in accordance with our design.
But if they do not publish the design and keep it for themselves, a small group and there is no communication with the public, it gets to this point, eventually it will get to where people will get tired of doing pr because they know they will never be accepted.

Then regarding git, at least there was only one contributor (Zed staff) who took care of starting the work, at the moment everything is suspended there are thousands of users who request these features.

@0x2CA
Copy link
Contributor

0x2CA commented Oct 31, 2024

In general zed wants to grasp the core by itself, and wants the community to contribute edge features or extensions, but nothing is ready, and last time there was a live discussion about the interface extension feasibility. It's too slow, and based on the community contributions I've seen merged, it's usually some logic feature, or bug fix or some optimization. There is no interface redesign, new system interface

Without a solid underlying design, subsequent feature development could be disastrous, one can understand the zed team's concern about accepting community contributions, but it's really too bad that no information is made public and everything stops, forgive me for complaining

@Angelk90
Copy link

Angelk90 commented Oct 31, 2024

@0x2CA : I agree with what you say, so I would say it would be fair to open a discussion about the following concerns, I think you know the zed environment better than me, how about opening one:
https://github.com/zed-industries/zed/discussions

and talk about it there, so we can hear everyone's opinion.

I was able to find only this after much research:

https://x.com/PixelJanitor/status/1774561767961616584

image

@Spoutnik97
Copy link
Author

I understand that it is not needed I spend more time on this PR if it won't be merged.

Just for personal use while the Zed team has not prioritized the feature

@Angelk90
Copy link

Angelk90 commented Nov 1, 2024

@Spoutnik97 : it's a real shame, but it won't be the last pr that is not true accepted there have been many others.

Anyway if you want to learn to use rust, I would advise you to continue developing this feature for personal use, if you want.

@nervenes
Copy link
Contributor

nervenes commented Nov 4, 2024

Just a heads-up that we already have existing designs for the Git experience in Zed, so it's not likely that we'll merge this implementation.

Where can one find the design details @maxdeviant ?

@SomeoneToIgnore
Copy link
Contributor

so it's not likely that we'll merge this implementation.

Thinking of this and given that we have the wordy discussion open, let's close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants