Fix Git toolbar button sizing - #62030
Closed
chirivelli wants to merge 1 commit into
Closed
Conversation
Contributor
|
Thank you for the PR. It talks about visual changes, but provides no screenshots despite https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#sending-changes |
Collaborator
Author
|
this is a fix for the issue I pointed out here #60464 (comment) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Fix Git diff toolbar buttons with longer labels, such as Unstage All, overflowing their fixed-width bounds at some font sizes and UI scaling settings.
Solution
Removed the fixed 80 px / 5 rem widths from the relevant Git toolbar buttons and allowed the existing button component to size itself based on its label.
This applies to the following actions across project, staged, unstaged, and single-file diff toolbars:
Testing
git diff --checksuccessfully.cargo check -p git_ui; it progressed without errors but did not complete within the two-minute command timeout.Reviewers can test this by opening the project, staged, unstaged, and single-file diff views, then staging or unstaging all changes. Verify that the toolbar buttons fit their complete labels at different UI font sizes and display scaling settings.
Self-Review Checklist:
Click to view showcase
Before:
618014578-d009e836-ce39-4997-995a-e59bf33fc2c9.mov
After:
Screen.Recording.2026-08-01.at.10.26.39.AM.mov
Release Notes: