Skip to content

feat(git): show notification hint when commit message editor opens#307640

Open
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c:feat/git-commit-editor-close-hint
Open

feat(git): show notification hint when commit message editor opens#307640
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c:feat/git-commit-editor-close-hint

Conversation

@yogeshwaran-c
Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Feature - UX improvement for the git commit message editor workflow.

What is the current behavior?

When the commit message editor opens (via git.useEditorAsCommitInput or git commit from terminal), users are given no guidance on how to proceed. The only way to finish the commit is to close the editor tab, but this is not obvious -- especially for new users. The "Commit" and "Cancel" buttons exist in the editor toolbar, but users often miss them.

Closes #199097
Closes #153509

What is the new behavior?

When the commit message editor opens, an information notification appears with:

  • A clear message: "Edit your commit message, then close this tab or use the toolbar Commit button to finish the commit."
  • A Commit action button that directly triggers the git.commitMessageAccept command

This makes the workflow discoverable for all users without requiring them to find documentation or toolbar buttons.

Additional context

This is the simplest possible solution to a long-standing usability issue (open since 2022). The maintainer @lszomoru suggested using a banner to provide guidance, and this notification serves that purpose.

Files changed: extensions/git/src/gitEditor.ts (1 file, +11/-1 lines)

Testing:

  1. Enable git.useEditorAsCommitInput (default)
  2. Stage some changes and click Commit
  3. Observe the notification message appears when the commit editor opens
  4. Click "Commit" in the notification to accept the commit, or close the editor tab manually

When the commit message editor opens, an information notification now
appears telling the user they can close the tab or use the toolbar
Commit button to finish their commit. This addresses the common
confusion where users don't realize they need to close the editor
to proceed with the commit.

The notification also includes a "Commit" action button for quick
access.

Closes microsoft#199097
Closes microsoft#153509
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Git - Docs for commiting via multi-line git are unclear on how to finish the commit Git - Show Banner To Close The File To Continue

2 participants