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

Feature-request: Make it easy to add a commit body #43585

Closed
Floriferous opened this issue Feb 13, 2018 · 4 comments
Closed

Feature-request: Make it easy to add a commit body #43585

Floriferous opened this issue Feb 13, 2018 · 4 comments
Assignees
Labels
git GIT issues

Comments

@Floriferous
Copy link

VSCode's source control side-bar has significantly improved my git workflow. However, the only missing piece for me is to be able to easily add a commit body to my commits.

Currently, the commit message box warns you when you go beyond x characters (#21144). To add a commit body, you have to use the terminal and write your commit message there, or copy-paste a formatted message in the small input, which isn't good UX.

It'd improve the habits of many developers if adding a commit body to commits was as easy as it is to add a simple commit right now.

Ideas have ranged from opening a new editor tab where you can freely write the commit message to making the single box have more features (#2718).

I'd like to propose a solution like GitHub, where you have 2 distinct text boxes, one for the subject (checking for length), and another for the body.

It could be added with a link that appears below the commit message box: "Add a commit body", which then reveals the larger text box.

@vscodebot vscodebot bot added the git GIT issues label Feb 13, 2018
@dougireton
Copy link

I'd also say that the commit message window is initially a single line encourages one line commit messages. Yes, you can hit ENTER and enter more lines, but it would be nice to encourage the git best practices of 50 char summary line and one to two paragraph of further explanation.

Ideally the initial commit message window would be 7-10 lines high when you open it.

@joaomoreno
Copy link
Member

Thanks for the issue.

To add a commit body, you have to use the terminal and write your commit message there, or copy-paste a formatted message in the small input, which isn't good UX.

As you said in the second post, Enter allows the user to create a commit body:

image

We don't need to educate users to follow git best practices, we just need them to get work done. Most people are just fine having a short commit message and they would be annoyed if we wasted UI real estate showing them a box they are not going to use.

The current solution seems fit for most use cases and adaptable to all.

If you still want to commit via a full blown text editor, you can always write an extension to support that.

@akrherz
Copy link

akrherz commented Feb 15, 2018

I just got started using vscode today(!!) and this issue is about the only thing truly annoying me at the moment.

It was not intuitive to me that the text entry box in the Source Control pane was a means to enter a commit message. I kept hitting the ✓ which popped up the 1 line entry box. I would then attempt to do permutations of control/shift-enter to get a linefeed in the message, only to fail :)

After finding this issue, I then noticed the "Message" box above the "STAGED CHANGES", but it is very confusing as to where line feeds are, my character counts, etc as the box isn't very wide for my "SOURCE CONTROL" pane.

So I am left with two mechanisms, neither of which are very useful to me. It seems a "simple" solution would be to require the same "ctrl+enter" to close the pop-up/floating git commit message and allow new lines to appear when enter is entered. Rewording, can't the same UI that exists within the "SOURCE CONTROL" panel simple exist in the popup/floating pane?

Thanks for listening to my two cents.

@poke
Copy link

poke commented Feb 16, 2018

We don't need to educate users to follow git best practices

Yet, the current release includes a warning message by default that educates users to wrap their lines at 72 characters.

The side effect will fortunately help people understand that they are able to press enter to start a new line. Although it does look very odd to break at a seemingly random point in an already wrapped text box there.

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
git GIT issues
Projects
None yet
Development

No branches or pull requests

5 participants