Repository navigation
diff: Set the hunk header's enclosing scope apart from its line ranges - #4021
Closed
sam-phinizy wants to merge 1 commit into
Closed
sam-phinizy wants to merge 1 commit into
sam-phinizy wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
💡 Visual default change for the Head Design concerns: the 2px accent left edge plus a 50% accent tint changes the default look of every diff using |
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.
Description
With
DiffHunkSeparator::Metadata, the hunk header is drawn as one run of small muted text —@@ -120,6 +120,9 @@ impl Pool {— so it reads like another line of the patch, and the enclosing scope Git reports, the useful part, is as quiet as the line numbers.This splits the label at the last
@@:Only the
Metadataseparator changes;LineInfoandSimpleare as they were. Colors come from the theme (accent,accent_foreground,foreground,mono_font_family).This is a visual change, so it's yours to judge — happy to adjust the weight, tint or edge, or to drop the edge and keep only the split.
Screenshot
I don't have story screenshots attached yet; I can add before/after from the diff story if useful.
How to Test
cargo runthe diff story and look at a hunk header with a scope (any patch whose@@line has text after it), in light and dark themes.cargo test -p gpui-component --lib diff::passes unchanged.Checklist
cargo runfor story tests related to the changes.🤖 Generated with Claude Code