Skip to content

git_ui: Hide status icon when status_style is set to label_color#51947

Merged
Veykril merged 1 commit intozed-industries:mainfrom
Vastargazing:fix/git_panel_label_color_status_icon
Mar 24, 2026
Merged

git_ui: Hide status icon when status_style is set to label_color#51947
Veykril merged 1 commit intozed-industries:mainfrom
Vastargazing:fix/git_panel_label_color_status_icon

Conversation

@Vastargazing
Copy link
Copy Markdown
Contributor

Context

When git_panel.status_style is set to label_color, the git panel
should indicate file status through text color only, without showing
status icons. However, the icons were still being rendered regardless
of this setting.

The root cause: git_status_icon(status) was called unconditionally
in render_status_entry, with no check against the current
status_style value.

Closes #51714

How to Review

Single change in crates/git_ui/src/git_panel.rs
render_status_entry function. The icon render call is now wrapped
in .when(status_style != StatusStyle::LabelColor, ...).

Release Notes:

  • Fixed git panel status icons still showing when git_panel.status_style
    is set to label_color

Bug:
image

Fix:
image

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 19, 2026
@zed-codeowner-coordinator zed-codeowner-coordinator bot requested review from a team, Veykril and kubkon and removed request for a team March 19, 2026 15:56
@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Mar 19, 2026
@Veykril
Copy link
Copy Markdown
Member

Veykril commented Mar 19, 2026

Thanks!

@Veykril Veykril enabled auto-merge (squash) March 19, 2026 16:08
@Veykril
Copy link
Copy Markdown
Member

Veykril commented Mar 24, 2026

CI is unhappy

auto-merge was automatically disabled March 24, 2026 11:41

Head branch was pushed to by a user without write access

@Vastargazing Vastargazing force-pushed the fix/git_panel_label_color_status_icon branch from f21f6ee to 54fb05e Compare March 24, 2026 11:41
@Veykril Veykril enabled auto-merge (squash) March 24, 2026 11:44
@Veykril Veykril merged commit ce7cd7c into zed-industries:main Mar 24, 2026
31 checks passed
@Vastargazing Vastargazing deleted the fix/git_panel_label_color_status_icon branch March 24, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions size/S Size S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting git_panel.status_style to label_color does not remove Git status icons

2 participants