-
Notifications
You must be signed in to change notification settings - Fork 404
Conversation
docs/rfcs/001-recent-commits.md
Outdated
|
||
If the active repository has no commits yet, display a short panel with a background message: "Make your first commit". | ||
|
||
Otherwise, display a **recent commits** section containing a sequence of horizontal bars for each of the top three commits reachable from the current `HEAD`, with the most recently created commit on top. The user can resize the recent commits section. As it is expanded or shrunk, the number of visible commits is changed responsively. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After creating new branch, only display commit that was branched off of. This may be technically challenging to implement (how do we know when to do this? last reflog entry is a checkout?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh hey there's a StackOverflow question about this:
git log mybranch --not $(git for-each-ref --format='%(refname)' refs/heads/ | grep -v "refs/heads/mybranch")
docs/rfcs/001-recent-commits.md
Outdated
|
||
On the most recent commit, display an "undo" button. Clicking "undo" performs a `git reset` and re-populates the commit message editor with the existing message. | ||
|
||
If any of the recent commits have been pushed to a remote, display a divider after the most recently pushed commit that shows an octocat icon. On hover, show the name of the remote tracking branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally add dividers for other refs (branches and tags)
docs/rfcs/001-recent-commits.md
Outdated
2. List read-only commit information. | ||
3. Replace the amend checkbox with the "undo" control. | ||
4. Context menu with actions. | ||
5. Tooltip with action buttons and additional information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Show which commits have been pushed
- Surface info about other refs
docs/rfcs/001-recent-commits.md
Outdated
|
||
If the active repository has no commits yet, display a short panel with a background message: "Make your first commit". | ||
|
||
Otherwise, display a **recent commits** section containing a sequence of horizontal bars for each of the top three commits reachable from the current `HEAD`, with the most recently created commit on top. The user can resize the recent commits section. As it is expanded or shrunk, the number of visible commits is changed responsively. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just show last three commits? Or allow seeing more via scrolling or dragging to make view larger?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to @simurai magic ✨ scrolling is a go. If we can, I'd really like to make it resizable by dragging too. If it's too technically challenging we can drop it, just like the "only show commits reachable by the current HEAD" bit up above, but I want to leave it in the RFC as a behavior goal if that's okay. I think I just feel like it'd be too frustrating not to be able to do 😁
docs/rfcs/001-recent-commits.md
Outdated
|
||
If the active repository has no commits yet, display a short panel with a background message: "Make your first commit". | ||
|
||
Otherwise, display a **recent commits** section containing a sequence of horizontal bars for each of the top three commits reachable from the current `HEAD`, with the most recently created commit on top. The user can resize the recent commits section. As it is expanded or shrunk, the number of visible commits is changed responsively. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also show commits that are on remote branch but not local (as a result of auto-fetch). Punt to show in full-featured log and just link to that? Accordion style (expand/collapse). @simurai make mock-up to feel it out
docs/rfcs/001-recent-commits.md
Outdated
|
||
On the most recent commit, display an "undo" button. Clicking "undo" performs a `git reset` and re-populates the commit message editor with the existing message. | ||
|
||
If any of the recent commits have been pushed to a remote, display a divider after the most recently pushed commit that shows an octocat icon. On hover, show the name of the remote tracking branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simurai would you mind making some quick mockups showing the dividers for remote tracking branch, local branch, tag. Also show icon and ref name visible (ex ref names: origin/feature-branch, master, v1.0.0) 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider when there are multiple refs for a given commit
docs/rfcs/001-recent-commits.md
Outdated
* For the most recent commit only, an "Amend" option. "Amend" is enabled if changes have been staged or the commit message mini-editor contains text. Choosing this applies the staged changes and modified commit message to the most recent commit, in a direct analogue to using `git commit --amend` from the command line. | ||
* A "Revert" option. Choosing this performs a `git revert` on the chosen commit. | ||
* A "Hard reset" option. Choosing this performs a `git reset --hard` which moves `HEAD` and the working copy to the chosen commit. When chosen, display a modal explaining that this action will discard commits and unstaged working directory context. Extra security: If there are unstaged working directory contents, artificially perform a dangling commit, disabling GPG if configured, before enacting the reset. This will record the dangling commit in the reflog for `HEAD` but not the branch itself. | ||
* A "Soft reset" option. Choosing this performs a `git reset --soft` which moves `HEAD` to the chosen commit and populates the staged changes list with all of the cumulative changes from all commits between the chosen one and the previous `HEAD`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plus: "mixed reset," consistent with the tool-tip actions 🎶
docs/rfcs/001-recent-commits.md
Outdated
* A "Hard reset" option. Choosing this performs a `git reset --hard` which moves `HEAD` and the working copy to the chosen commit. When chosen, display a modal explaining that this action will discard commits and unstaged working directory context. Extra security: If there are unstaged working directory contents, artificially perform a dangling commit, disabling GPG if configured, before enacting the reset. This will record the dangling commit in the reflog for `HEAD` but not the branch itself. | ||
* A "Soft reset" option. Choosing this performs a `git reset --soft` which moves `HEAD` to the chosen commit and populates the staged changes list with all of the cumulative changes from all commits between the chosen one and the previous `HEAD`. | ||
|
||
On click, reveal a tool-tip containing: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future when we have a multi-file diff view, we can consider just opening a pane item with this information
- Providing a bridge to navigate to an expanded log view that allows more flexible and powerful history exploration. | ||
- Show an info icon and provide introductory information when no commits exist yet. | ||
- Add a "view diff from this commit" option to the recent commit context menu. | ||
- Integration with and navigation to "git log" or "git show" pane items when they exist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we surface that we've made a commit for you before doing a git reset --hard
? So you never actually lose any unstaged changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right-click context menu on history? "Undo reset" until next commit is made.
docs/rfcs/001-recent-commits.md
Outdated
2. List read-only commit information. | ||
3. Replace the amend checkbox with the "undo" control. | ||
4. Context menu with actions. | ||
5. Tooltip with action buttons and additional information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Balloon" instead of "tooltip" 🎈
Here a few dividers: With labelIcon onlyTagHmm.. not sure. They use quite some space for such a small area and it's not clear if they are referring to the commits above or below a divider. Might fit better for the more fully-featured history log panel. Alternatively we could have up/down arrows on the commits, matching the ahead/behind in the status-bar: And tags could also be attached to a commit: |
Ohh, fancy ✨ Looking over the options, some thoughts:
|
Hey all! @donokuda asked me to take a look here because of the overlap in problem space with some things we're working on at GHD. Taking a look at the options you have here, I really like the icons direction. I think it does the best job working within the small timeline here. But, I think there might be a clearer icon to use than the up/down arrow. To me at least, the up/down arrow is pretty strongly associated with the push/pull action, not necessarily with the commit itself in terms of "this commit is ahead of my branch" It would be awesome to come up with a new icon that we can use (here and in GHD!) to signal "this commit is ahead/behind your branch" Maybe something like Hope this is helpful! Let me know if I can clarify anything :) |
Here a few refs below and aligned with the message: If they would be above, it might look like they belong to the commit above. We could also add divider lines for each commit, but then it quickly looks more heavy. Hmm... also I think having these refs on a 2nd line makes messages less scannable because you get interrupted with something different when scrolling. How important is it to see these refs in the recent commits? I can see two options:
|
👍 Yeah, a hint of their meaning could come from how branches show the ahead/behind: The up/down arrows would be more from a local/remote perspective. Like this cheesy way of thinking that the remote is somewhere up in the cloud. Kinda like downloading and uploading.
Looking at the up/down arrows, people might try to click them to actually push/pull? 🤔 Here with clouds around the arrows: |
3. Replace the amend checkbox with the "undo" control. | ||
4. Context menu with actions. | ||
5. Balloon with action buttons and additional information. | ||
6. Show which commits have been pushed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should say have been "can be" pushed. And also show commits that can be pulled (after fetching).
And also move it up in the priority list, maybe as far as 3rd place?
Here more feedback from @ampinsk + @donokuda. ❤️
And here the 2nd suggestion visualized: |
We've completed Phases 1 and 2 with Phase 3 almost complete. With that we've reached our near-term goals for this feature 🎉 The rest is icing and we'll hold off until future quarters in order to prioritize progress on other roadmap items. I'll go ahead and merge this now so that we can save all of the goodness to refer to when we pick this back up again. Thanks everyone for your fabulous input! |
A more formal proposal of the "recent commits" view displayed beneath the mini commit editor.
Previous discussion and design ideating are available in #554.
Acceptance criteria
We will merge this RFC and begin work when we accumulate ✅ reviews from @smashwilson, @kuychaco, and @simurai.
Rendered
Implementation phases