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

Sublime Merge UI #376

Open
marceltaeumel opened this issue Apr 20, 2022 · 3 comments
Open

Sublime Merge UI #376

marceltaeumel opened this issue Apr 20, 2022 · 3 comments

Comments

@marceltaeumel
Copy link
Contributor

I like the user interface of Sublime Merge. Especially the right side where you can stage or discard changes before the commit. It's not a series of dialogs but an integrated workflow with stable screen contents. The granularity of changed files and hunks within files matches the packages/classes/methods in Squeak.

The GitBrowser has such an overview already in the commit dialog text pane. Yet, you cannot ignore or discard anything in that view. Instead, you have to interact with the tree view on the left. Maybe we could use text actions to make that text box showing diffs more interactive?

@j4yk
Copy link
Collaborator

j4yk commented Apr 24, 2022

From what I can see it seems to offer similar features to those that SourceTree has already offered for several years, haha.

Here are the characteristics I noticed for the right side of Sublime Merge's main window:

  • Scrollable diff text grouped into hunks, with highlighted differences.
  • The hunks are grouped into "Working directory" changes (working tree <-> index) and "Staged files" (index <-> HEAD). The two groups are collapsible.
  • Can stage a whole diff hunk with a button attached to each hunk
  • Can select individual lines in the diff hunk, which gives you another button to stage only the selected lines
  • When something is staged, the diff text is updated to only show the remaining differences between the index and the working tree.
  • It is not shown in the demo on the homepage of Sublime Merge, but I assume that one can similarly unstage hunks and lines when you browse the "Staged files" group of hunks, rather than the "Working directory" group.
  • Commit message and commit button in the same window as the staging/diff hunks display.
  • Since the diff display is in the "main window", alongside a commit graph, committing does not close this view, so you can immediately continue to stage the next changes and create the next commit.

Please add any others that you find noteworthy.

Note that the Git Browser tools do not use the concept of staging. Instead it follows the Gitless way of life of "including" and "excluding" differences on demand and to include every change into new commits by default.

So in essence it is about being able to invoke the exclude and include actions from the text view on the right side of the commit dialog, rather than having to "go back" to the tree view on the left side after you have spotted a difference that you would like to exclude, correct?

@LinqLover
Copy link
Contributor

So in essence it is about being able to invoke the exclude and include actions from the text view on the right side of the commit dialog, rather than having to "go back" to the tree view on the left side after you have spotted a difference that you would like to exclude, correct?

Plus the option to revert/discard unintended changes from the save dialog, I think? Personally, I'm also still in favor of the unfinished approach in https://github.com/hpi-swa/Squot/tree/swa-chooseAnother which could allow you to just press cmd + s in the diff pane to accept a new source for the commit.

@j4yk
Copy link
Collaborator

j4yk commented Sep 11, 2022

But reverting from the save dialog is a different feature: #286
And so is the edit-merge-in-place feature in that pull request branch #339 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants