Skip to content

Feature request: focus mode that only show commits in current branch #855

Closed

Description

@hongbo-miao

(I found #253 , then I realize the colors are slightly different. The dark and light gray colors are very close right now. It would be great to make them a little more different.)

I am actually requesting another "focus" mode: meaning only show commits in current branch.

In SourceGit, you can see in this branch, the two commits in this branch are hard to locate, and also are not together:

image

To compare, in Tower, when I am on this branch, it only shows these two commits in this branch. And I hope to have something similar: basically hide all other commits in other branches which distract while I am working on specific branch, thanks! ☺️

image

Activity

  1. love-linger commented on Jan 1, 2025

    @love-linger
    Collaborator

    You can use Filter in commit graph
    image

  2. self-assigned this
    on Jan 1, 2025
  3. hongbo-miao commented on Jan 2, 2025

    @hongbo-miao
    Author

    Thank @love-linger for the tip! ☺️
    I just tried, I noticed when switch between branches, I need

    1. Check out new branch (one click)
    2. Unset filter on old branch (two clicks)
      image
    3. Filter on new branch (two clicks)
      image

    In Tower, it needs step 1 which is 1 click. In SourceGit, it needs 5 clicks.
    It would be great to further improve to have less clicks. Thanks!

  4. love-linger commented on Jan 2, 2025

    @love-linger
    Collaborator

    Try to change the sort order to Topologically
    image

  5. hongbo-miao commented on Jan 2, 2025

    @hongbo-miao
    Author

    Hmm still same, commits from other branches still show unless I hide them manually.
    image

  6. love-linger commented on Jan 2, 2025

    @love-linger
    Collaborator

    It will not hide any branch, but makes the commits those belong to the same branch next to each other.

  7. love-linger commented on Jan 2, 2025

    @love-linger
    Collaborator

    image

    For example: it re-orders the commits you just pointed out

  8. heartacker commented on Jan 2, 2025

    @heartacker
    Contributor

    The functionality might be looking for could be:
    Adding a mode that focuses on the current branch, regardless of which branch they switch to. It would automatically display only the current branch.

  9. love-linger commented on Jan 2, 2025

    @love-linger
    Collaborator

    I've pushed a new commit. You can download the latest CI build from Github Action.

  10. heartacker commented on Jan 2, 2025

    @heartacker
    Contributor

    after test:

    如果执行切换分支之后,在checkout 的分支取消过滤器,会导致视图节点空白

    After switching branches, if the filter is removed from the checked-out branch, it may cause the view nodes to be blank.

    注意,这里有一个bug

  11. heartacker commented on Jan 2, 2025

    @heartacker
    Contributor

    通过我的体验,我觉得这个聚焦模式,应该有别于过滤器模式。

    应该是两种模式。

    应该添加一个按钮,进入聚焦模式。

    • 当存在过滤器,要进去聚焦模式,则提示取消过滤器。
    • 当处于聚焦模式时,用户想要进去过滤器。则提示需要退出聚焦模式
  12. love-linger commented on Jan 2, 2025

    @love-linger
    Collaborator

    通过我的体验,我觉得这个聚焦模式,应该有别于过滤器模式。

    应该是两种模式。

    应该添加一个按钮,进入聚焦模式。

    • 当存在过滤器,要进去聚焦模式,则提示取消过滤器。
    • 当处于聚焦模式时,用户想要进去过滤器。则提示需要退出聚焦模式

    并不打算加入所谓的聚焦模式。即使我们在操作当前的分支,也有可能需要显示多个分支,比如cherry-pick/rebase/merge等常用操作。

    I do not want to introduce the Focus-Mode design from Tower. Even if we are focus some branch in the sidebar, we may still need to display commits from other branches for some actions, such as cherry-pick/rebase/merge, .etc. Therefore, it is necessary to explicitly choose the branches that need to be filtered.

  13. heartacker commented on Jan 2, 2025

    @heartacker
    Contributor

    after test:

    如果执行切换分支之后,在checkout 的分支取消过滤器,会导致视图节点空白

    After switching branches, if the filter is removed from the checked-out branch, it may cause the view nodes to be blank.

    注意,这里有一个bug

  14. love-linger commented on Jan 2, 2025

    @love-linger
    Collaborator

    已提交修复

    Fixed. You can download the latest CI build from Github Action.

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions