More Git Dialog UI cleanup - #95
Merged
Merged
Conversation
* Make each diff file rounded-md * Rename stats chart * Don't display diff for a pure rename
Previously a tree component would display the full base path. Now the text to display is passed as a separate property.
* Show icon on the file whether it was added, changed or renamed * Show open / close folder icons
The API now only provides the following data:
```
struct Diff {
/// Patch between old and new
patch: String,
/// Stats of the diff
stats: DiffStats,
/// Map of old source paths to the old content
old_sources: hash_map::HashMap<Path, FileContent>,
}
```
This is easier to handle on the client side.
* Set text-sm on CardContent * Use font-mono for revision in status card * Add restore icon * Add gap if both panels are displayed
Owner
Author
|
|
jonasehrlich
force-pushed
the
je/ui-cleanup
branch
from
August 4, 2025 15:48
f8f4acb to
c5a8e9c
Compare
TobTheRock
reviewed
Aug 5, 2025
| diff_type, | ||
| ) | ||
| }; | ||
| pub fn try_from_repo_and_diff(repo: &git2::Repository, diff: &git2::Diff) -> Result<Self> { |
Collaborator
There was a problem hiding this comment.
This function got really long and hard to read. Can we split it down?
Possible subroutines:
- file path from diff
- file content from diff
- patch content from diffs
| find_opts.renames(true); | ||
| // Transform a diff marking file renames, copies, etc. | ||
| diff.find_similar(Some(&mut find_opts)) | ||
| .map_err(|e| Error::from_ctx_and_error("Failed to find similar files in diff", e))?; |
Collaborator
There was a problem hiding this comment.
Nit: same as in #92, i don't think we need to propagate the error to the user and can just ignore it
Merged
This was referenced Aug 5, 2025
Open
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.
This PR cleans-up more of the UI.
Summary of the changes:
sm