Skip to content

ux: Add config option to show containing refs directly in the commit detail view#2365

Open
floriandammeyer wants to merge 5 commits into
sourcegit-scm:developfrom
floriandammeyer:commit-detail-show-contained-by
Open

ux: Add config option to show containing refs directly in the commit detail view#2365
floriandammeyer wants to merge 5 commits into
sourcegit-scm:developfrom
floriandammeyer:commit-detail-show-contained-by

Conversation

@floriandammeyer
Copy link
Copy Markdown

@floriandammeyer floriandammeyer commented May 20, 2026

Adds a new config option to show the containing refs directly in the commit detail view. The default is false so that the current behavior of the app stays the default.

When enabled, the tooltip "commit is contained by" is hidden and instead a new row "CONTAINED BY" is shown above the "REFS" in the commit detail view.

The containing refs are loaded asynchronously to not block the app.

New option in the app settings (red border is only to highlight what changed, not part of the app):
grafik

Updated commit details view:
grafik

…detail view

Adds a new config option to show the containing refs directly in the commit detail view. When enabled, the tooltip "commit is contained by" is hidden and instead a new row "CONTAINED BY" is shown above the "REFS" in the commit detail view. The containing refs are loaded asynchronously to not block the app.
@floriandammeyer floriandammeyer marked this pull request as ready for review May 20, 2026 12:38
@floriandammeyer floriandammeyer changed the base branch from master to develop May 20, 2026 12:42
@love-linger
Copy link
Copy Markdown
Collaborator

I do not like this idea.

  • It's not a primary (important) info of a commit.
  • It is displayed upon the REFS (which I think is more important than it). This has caused confusion of information to a certain extent.
  • SourceGit already provides a way to view the refs that contains selected commit.
image

What you can see in above screenshot is: when selects a commit that is contained by lots of refs, the whole area is used by CONTAINED BY. And this issue will affected all its parents. User can not see the REFS/MESSAGE/CHANGES (which I think is more important) without scrolling it.

I'd like to keep current design.

@love-linger love-linger self-assigned this May 21, 2026
@love-linger love-linger added the not-planned It's not planned in the future label May 21, 2026
The behavior of showing the containing refs in a separate row in the commit detail view instead of a tooltip can be configured on a per-repository basis. Default expansion/collapsed state can also be set globally and on a repository basis.
@floriandammeyer
Copy link
Copy Markdown
Author

I see your point and have incorporated your remarks into the PR:

  • switched order of the "REFS" and "CONTAINED BY" rows so that the direct refs are above the containing refs and so that the order of "parents", "children" and "refs" is left exactly the way it is now
  • the row "contained by" is now collapsed into a single row by default if there are too many refs. The row can be expanded using a chevron icon if needed
  • the feature is entirely configurable globally and on a per-repository basis: if app settings are not changed, the current behavior (using the tooltip for the containing refs) is used and completely unchanged. if enabled in the settings, the new row "containing refs" is being shown. by default this row is shown in a collapsed state. if the according option in the setting is changed, this can also default to the expanded state. this way this feature does not change anything for existing users which are happy with the tooltip. if a user wants to change the display only for a specific repository (for example because there is one repository with a lot of refs), it can also be overwritten in the repository settings in a new "General" tab.

I understand that it may not be helpful to all users, which is why I made the feature completely configurable and optional. Without changing the default settings, the app still behaves exactly as it did before. But for me, and maybe for others too, seeing the containing refs immediately can be helpful, so I ask you to think about it again.

Screenshots to outline the changes

Added configuration options in the app settings
Bildschirmfoto 2026-05-21 um 11 40 14

Possibility to overwrite the app settings per repository
Bildschirmfoto 2026-05-21 um 11 46 25

With default settings, this feature is disabled so the commit detail view looks exactly the same as it does now (= Tooltip icon and no "contained by" row):
Bildschirmfoto 2026-05-21 um 11 57 07

Collapsed state of the containing refs row with chevron icon:
Bildschirmfoto 2026-05-21 um 11 41 12

Expanded state of the containing refs row with chevron icon:
Bildschirmfoto 2026-05-21 um 11 44 03

Refs row is above containing refs row to keep the current order in the table:
Bildschirmfoto 2026-05-21 um 11 46 57

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

Labels

not-planned It's not planned in the future

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants